diff options
Diffstat (limited to 'app/views/layouts/default.rhtml')
-rw-r--r-- | app/views/layouts/default.rhtml | 64 |
1 files changed, 20 insertions, 44 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 5c3499c93..e4022661f 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -10,40 +10,19 @@ </title> <link rel="shortcut icon" href="/favicon.ico"> - <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %> - <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %> - <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "print" %> - <% if !params[:print_stylesheet].nil? %> - <%= stylesheet_link_tag 'print', :rel => "stylesheet", :media => "all" %> - <% end %> - <% if is_admin? %> + <%= render :partial => 'general/stylesheet_includes' %> + <% if is_admin? %> <%= stylesheet_link_tag "/adminbootstraptheme/stylesheets/admin", :title => "Main", :rel => "stylesheet" %> - <% end %> - <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %> + <% end %> + <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %> <% if @profile_photo_javascript %> <script type="text/javascript" src="/javascripts/jquery.Jcrop.js"></script> <script type="text/javascript" src="/javascripts/profile_photo.js"></script> <link rel="stylesheet" href="/stylesheets/jquery.Jcrop.css" type="text/css" > <% end %> - <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> - <!--[if LT IE 7]> - <style type="text/css">@import url("/stylesheets/ie6.css");</style> - <![endif]--> - <!--[if LT IE 7]> - <style type="text/css">@import url("/stylesheets/ie6-custom.css");</style> - <![endif]--> - <!--[if LT IE 8]> - <style type="text/css">@import url("/stylesheets/ie7.css");</style> - <![endif]--> - <!-- the following method for customising CSS is deprecated; see `doc/THEMES.md` for detail --> - <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> - <% if force_registration_on_new_request %> - <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> - <% end %> - <% if @feed_autodetect %> <% for feed in @feed_autodetect %> <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>"> @@ -63,7 +42,6 @@ <%= render :partial => 'general/before_head_end' %> </head> <body class="<%= 'admin' if is_admin? %> <%= 'front' if params[:action] == 'frontpage' %>"> - <!-- XXX: move to a separate file --> <% if force_registration_on_new_request && !@user %> <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> <script type="text/javascript"> @@ -79,7 +57,7 @@ if (typeof modal_signin_successful != 'undefined' ) { window.location.href = '<%= select_authority_url %>'; } - } + } }); }); </script> @@ -89,20 +67,19 @@ <%= render :partial => 'admin_general/admin_navbar' %> <% end %> -<% # code for popup advert for a campaign etc. -=begin - <div id="everypage" class="jshide"> - <p style="float:right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;">Close</a></p> - [ message goes here ] - <p style="text-align: right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;">Close</a></p> - </div> -=end -%> +<% if !@popup_banner.blank? %> +<div id="everypage" class="jshide"> + <p style="float:right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;"><%= _('Close') %></a></p> + <%= @popup_banner %> + <p style="text-align: right"><a href="#top" onclick="$.cookie('seen_foi2', 1, { expires: 7, path: '/' }); $('#everypage').hide('slow'); return false;"><%= _('Close') %></a></p> +</div> +<% end %> + <div class="entirebody"> <div id="banner"> <div id="banner_inner"> <div class="lang"><%= render :partial => 'general/locale_switcher' %></div> - + <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %> <div id="logged_in_bar"> <% if @user %> @@ -120,19 +97,19 @@ <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %> <% end %> </div> - <% end %> + <% end %> <div id="navigation_search"> <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "navigation_search_form"}) do %> <p> <%= text_field_tag 'query', params[:query], { :size => 40, :id => "navigation_search_query" } %> - <%= image_submit_tag('search-button.png') %> + <%= submit_tag 'search', :id => "navigation_search_button" %> </p> <% end %> </div> - + <%= render :partial => 'general/orglink' %> - + <%= render :partial => 'general/topnav' %> </div> </div> @@ -163,7 +140,7 @@ </div> <% ga_code = MySociety::Config.get('GA_CODE', '') - + unless ga_code.empty? %> <script> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); @@ -173,10 +150,9 @@ var pageTracker = _gat._getTracker("<%=ga_code%>"); pageTracker._trackPageview(); </script> - + <% end %> <%= render :partial => 'general/before_body_end' %> </body> </html> - |