diff options
Diffstat (limited to 'app/views/layouts/default.rhtml')
-rw-r--r-- | app/views/layouts/default.rhtml | 148 |
1 files changed, 85 insertions, 63 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index e1e7a1e19..2af13f342 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -1,13 +1,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="<%= I18n.locale %>"> <head> - <% if @profile_photo_javascript %> - <script type="text/javascript" src="/javascripts/jquery.js"></script> - <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 %> - <title> <% if @title %> <%=@title%> - <%= site_name %> @@ -15,19 +8,38 @@ <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> <% end %> </title> - + <link rel="shortcut icon" href="/favicon.ico"> - <%= javascript_include_tag 'jquery.js', 'jquery-ui.min' %> + <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet", :media => "all" %> + <%= stylesheet_link_tag 'fonts', :rel => "stylesheet", :media => "all" %> + <%= stylesheet_link_tag 'theme', :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 %> + <%= 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'%> - <%= stylesheet_link_tag 'main', :title => "Main", :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]--> <%= 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]%>"> @@ -46,8 +58,30 @@ <%= render :partial => 'general/before_head_end' %> </head> - <body> + <body <%= "class='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"> + $(document).ready(function() { + $("#make-request-link").fancybox({ + 'modal': false, + 'width': 920, + 'height': 400, + 'type': 'iframe', + 'href': '/<%= I18n.locale %>/profile/sign_in?modal=1', + 'onClosed': function() { + // modal_signin_successful variable set by modal dialog box + if (typeof modal_signin_successful != 'undefined' ) { + window.location.href = '<%= select_authority_url %>'; + } + } + }); + }); + </script> + <% end %> + <% # code for popup advert for a campaign etc. =begin <div id="everypage" class="jshide"> @@ -58,59 +92,43 @@ =end %> <div class="entirebody"> - <div id="banner"></div> - <div id="header"> - <h1> - <%= link_to site_name, frontpage_url %> - </h1> + <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 %> + <%= _('Hello, {{username}}!', :username => h(@user.name))%> - <div id="tagline"> - <%= _('Make and explore Freedom of Information requests') %> - </div> + <% if @user %> + <%=link_to _("My profile"), user_url(@user) %> + <% end %> - </div> - <div id="orglogo"> - <%= render :partial => 'general/orglink' %> - </div> - <div class="lang"><%= render :partial => 'general/locale_switcher' %></div> - - <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" } %> - <%= submit_tag _("Search") %> - </p> - <% end %> - </div> - <div id="topnav"> - <ul id="navigation"> - <li><%= link_to _("Make request"), frontpage_url %></li> - <li><%= link_to _("View requests"), request_list_successful_url %></li> - <li><%= link_to _("View authorities"), list_public_bodies_default %></li> - <% if @user %> - <li><%=link_to _("My requests"), user_url(@user) %></li> - <% end %> - <li><%= link_to _("Read blog"), blog_url %></li> - <li><%= link_to _("Help"), help_about_url %></li> - </ul> - <% if not (controller.action_name == 'signin' or controller.action_name == 'signup') %> - <div id="logged_in_bar"> - <% if @user %> - <%= _('Hello, {{username}}!', :username => h(@user.name))%> - (<%= link_to _("Sign out"), signout_url(:r => request.request_uri) %>) - <% else %> - <%= _('Hello!') %> - (<%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %>) + <%= link_to _("Sign out"), signout_url(:r => request.request_uri) %> + <% else %> + <%= link_to _("Sign in or sign up"), signin_url(:r => request.request_uri) %> + <% end %> + </div> + <% 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') %> + </p> <% end %> - </div> - <% end %> + </div> + + <%= render :partial => 'general/orglink' %> + + <%= render :partial => 'general/topnav' %> + </div> </div> - <div id="wrapper"> - <div id="content"> - <% if flash[:notice] %> <div id="notice"><%= flash[:notice] %></div> <% end %> @@ -121,16 +139,20 @@ <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>"> <%= yield :layout %> </div> + <div style="clear:both"></div> </div> </div> - <div id="footer"> - <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %> - <%= render :partial => 'general/credits' %> - </div> - <div class="after-footer"> </div> + <%= render :partial => 'general/footer' %> <%= render :partial => 'general/before_body_end' %> </div> +<div id="other-country-notice"></div> +<div id="link_box"><span class="close-button">X</span> +<%= _("Paste this link into emails, tweets, and anywhere else:") %> +<br /> +<input type="text"> +</div> </body> </html> + |