diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/views/layouts/default.rhtml | 216 | ||||
-rw-r--r-- | app/views/user/contact.rhtml | 28 |
2 files changed, 122 insertions, 122 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 876cf07c4..e4022661f 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -1,65 +1,65 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="<%= I18n.locale %>"> <head> - <title> - <% if @title %> - <%=@title%> - <%= site_name %> - <% else %> - <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> - <% end %> - </title> - - <link rel="shortcut icon" href="/favicon.ico"> - - <%= 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' %> - <% 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 %> - - <% if @feed_autodetect %> - <% for feed in @feed_autodetect %> - <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>"> - <% if feed[:has_json] %> - <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json"> - <% end %> - <% end %> - <% end %> - <% if @has_json %> - <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>"> - <% end %> - - <% if @no_crawl %> - <meta name="robots" content="noindex, nofollow"> - <% end %> - - <%= render :partial => 'general/before_head_end' %> + <title> + <% if @title %> + <%=@title%> - <%= site_name %> + <% else %> + <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> + <% end %> + </title> + + <link rel="shortcut icon" href="/favicon.ico"> + + <%= 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' %> + <% 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 %> + + <% if @feed_autodetect %> + <% for feed in @feed_autodetect %> + <link rel="alternate" type="application/atom+xml" title="<%=h feed[:title] %>" href="<%=h feed[:url]%>"> + <% if feed[:has_json] %> + <link rel="alternate" type="application/json" title="JSON version of <%=h feed[:title] %>" href="<%=h feed[:url]%>.json"> + <% end %> + <% end %> + <% end %> + <% if @has_json %> + <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>"> + <% end %> + + <% if @no_crawl %> + <meta name="robots" content="noindex, nofollow"> + <% end %> + + <%= render :partial => 'general/before_head_end' %> </head> <body class="<%= 'admin' if is_admin? %> <%= 'front' if params[:action] == 'frontpage' %>"> <% 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 %>'; - } - } - }); - }); + $(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 %> @@ -78,55 +78,55 @@ <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 %> - <%= _('Hello, {{username}}!', :username => h(@user.name))%> - - <% if @user %> - <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %> - <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %> - <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %> - <% end %> - - - <%= 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" } %> - <%= submit_tag 'search', :id => "navigation_search_button" %> - </p> - <% end %> - </div> - - <%= render :partial => 'general/orglink' %> - - <%= render :partial => 'general/topnav' %> + <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))%> + + <% if @user %> + <%=link_to _("My requests"), show_user_requests_path(:url_name => @user.url_name) %> + <%=link_to _("My profile"), show_user_profile_path(:url_name => @user.url_name) %> + <%=link_to _("My wall"), show_user_wall_path(:url_name => @user.url_name) %> + <% end %> + + + <%= 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" } %> + <%= submit_tag 'search', :id => "navigation_search_button" %> + </p> + <% 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 %> - <% if flash[:error] %> - <div id="error"><%= flash[:error] %></div> - <% end %> - - <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>"> - <%= yield :layout %> - </div> - <div style="clear:both"></div> - </div> + <div id="content"> + <% if flash[:notice] %> + <div id="notice"><%= flash[:notice] %></div> + <% end %> + <% if flash[:error] %> + <div id="error"><%= flash[:error] %></div> + <% end %> + + <div id="<%= controller.controller_name + "_" + controller.action_name %>" class="controller_<%= controller.controller_name %>"> + <%= yield :layout %> + </div> + <div style="clear:both"></div> + </div> </div> <%= render :partial => 'general/footer' %> @@ -142,14 +142,14 @@ ga_code = MySociety::Config.get('GA_CODE', '') unless ga_code.empty? %> - <script> - var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); - document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); - </script> - <script> - var pageTracker = _gat._getTracker("<%=ga_code%>"); - pageTracker._trackPageview(); - </script> + <script> + var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); + document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); + </script> + <script> + var pageTracker = _gat._getTracker("<%=ga_code%>"); + pageTracker._trackPageview(); + </script> <% end %> diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml index 3329ba6ca..333b72334 100644 --- a/app/views/user/contact.rhtml +++ b/app/views/user/contact.rhtml @@ -13,33 +13,33 @@ </div> <p> - <label class="form_label"><%= _("From") %>:</label> - <%= h(@user.name_and_email) %> + <label class="form_label"><%= _("From") %>:</label> + <%= h(@user.name_and_email) %> </p> <p> - <label class="form_label" for="contact_subject"><%= _("Subject") %>:</label> - <%= f.text_field :subject, :size => 50 %> + <label class="form_label" for="contact_subject"><%= _("Subject") %>:</label> + <%= f.text_field :subject, :size => 50 %> </p> <p> <label class="form_label" for="contact_message"><%= _("Message") %>:</label> - <%= f.text_area :message, :rows => 10, :cols => 50 %> + <%= f.text_area :message, :rows => 10, :cols => 50 %> </p> <p class="form_note"> - <% if @user == @recipient_user %> - <%= _('<strong>Note:</strong> You\'re sending a message to yourself, presumably - to try out how it works.')%> - <% else %> - <%= _(' <strong>Privacy note:</strong> Your email address will be given to')%> - <%= user_link(@recipient_user) %><%= _(' when you send this message.')%> - <% end %> + <% if @user == @recipient_user %> + <%= _('<strong>Note:</strong> You\'re sending a message to yourself, presumably + to try out how it works.')%> + <% else %> + <%= _(' <strong>Privacy note:</strong> Your email address will be given to')%> + <%= user_link(@recipient_user) %><%= _(' when you send this message.')%> + <% end %> </p> <div class="form_button"> - <%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %> - <%= submit_tag _("Send message") %> + <%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %> + <%= submit_tag _("Send message") %> </div> <% end %> |