diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_general/timeline.html.erb | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/import_csv.html.erb | 4 | ||||
-rw-r--r-- | app/views/general/_locale_switcher.html.erb | 2 | ||||
-rw-r--r-- | app/views/layouts/default.html.erb | 2 | ||||
-rw-r--r-- | app/views/public_body/_alphabet.html.erb | 2 | ||||
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb | 10 | ||||
-rw-r--r-- | app/views/public_body/show.html.erb | 43 | ||||
-rw-r--r-- | app/views/request/_sidebar.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/new.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/similar.html.erb | 15 |
10 files changed, 53 insertions, 31 deletions
diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb index 8fd8875b6..439ae1e68 100644 --- a/app/views/admin_general/timeline.html.erb +++ b/app/views/admin_general/timeline.html.erb @@ -88,7 +88,7 @@ <% elsif event.event_type == 'comment' %> had an annotation posted by <%=h event.comment.user.name %>. <% elsif event.event_type == 'status_update' %> - had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. + had its status updated by <%= event.params[:user_id] ? User.find(event.params[:user_id]).name : event.params[:script] %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. <% else %> had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. <% end %> diff --git a/app/views/admin_public_body/import_csv.html.erb b/app/views/admin_public_body/import_csv.html.erb index afda5a468..18341ecf1 100644 --- a/app/views/admin_public_body/import_csv.html.erb +++ b/app/views/admin_public_body/import_csv.html.erb @@ -31,8 +31,8 @@ <p> <label for="tag_behaviour">What to do with existing tags?</label> <%= select_tag 'tag_behaviour', - "<option value='add' selected>Add new tags to existing ones</option> - <option value='replace'>Replace existing tags with new ones</option>" + raw("<option value='add' selected>Add new tags to existing ones</option> + <option value='replace'>Replace existing tags with new ones</option>") %> </p> diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb index d0040bb0d..a318f61f3 100644 --- a/app/views/general/_locale_switcher.html.erb +++ b/app/views/general/_locale_switcher.html.erb @@ -2,7 +2,7 @@ <div id="user_locale_switcher"> <div class="btn-group"> <% for possible_locale in FastGettext.default_available_locales %> - <% if possible_locale == I18n.locale.to_s %> + <% if possible_locale == FastGettext.locale %> <a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a> <% else %> <a href="<%= url_for params.merge(:locale => possible_locale) %>" class="btn"><%= locale_name(possible_locale) %></a> diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb index 688816fa9..472fa8ec1 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -52,7 +52,7 @@ 'width': 920, 'height': 400, 'type': 'iframe', - 'href': '/<%= I18n.locale %>/profile/sign_in?modal=1', + 'href': '/<%= FastGettext.locale %>/profile/sign_in?modal=1', 'onClosed': function() { // modal_signin_successful variable set by modal dialog box if (typeof modal_signin_successful != 'undefined' ) { diff --git a/app/views/public_body/_alphabet.html.erb b/app/views/public_body/_alphabet.html.erb index 111da5b3b..63b24e0fb 100644 --- a/app/views/public_body/_alphabet.html.erb +++ b/app/views/public_body/_alphabet.html.erb @@ -1,3 +1,3 @@ -<%= "A".upto("Z") do |l| -%> +<%- "A".upto("Z") do |l| -%> <%= link_to_unless (@tag == l), l, list_public_bodies_path(:tag => l.downcase) %> <% end %> diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb index 8e0a64df7..91a07d09c 100644 --- a/app/views/public_body/_body_listing_single.html.erb +++ b/app/views/public_body/_body_listing_single.html.erb @@ -20,8 +20,14 @@ <span class="bottomline"> <%= n_('{{count}} request made.', '{{count}} requests made.', public_body.info_requests.size, :count => public_body.info_requests.size) %> - <% if !@include_request_link_in_authority_listing.nil? %> - <%= link_to _("Make your own request"), public_body_path(public_body) %>. + <% if !public_body.is_requestable? && public_body.not_requestable_reason != 'bad_contact' %> + <% if public_body.not_requestable_reason == 'defunct' %> + <%= _('Defunct.') %> + <% end %> + <% else %> + <% if !@include_request_link_in_authority_listing.nil? %> + <%= link_to _("Make your own request"), public_body_path(public_body) %>. + <% end %> <% end %> <br> <span class="date_added"> diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb index 47075a1f5..b35e29eea 100644 --- a/app/views/public_body/show.html.erb +++ b/app/views/public_body/show.html.erb @@ -46,12 +46,22 @@ <% end %> </p> - <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %> - <p><%= @public_body.notes_as_html.html_safe %></p> - <% end %> - - <% if @public_body.eir_only? %> - <p><%= _('You can only request information about the environment from this authority.')%></p> + <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> + <% if @public_body.has_notes? %> + <p><%= @public_body.notes_as_html.html_safe %></p> + <% end %> + <% if @public_body.eir_only? %> + <p><%= _('You can only request information about the environment from this authority.')%></p> + <% end %> + <% else %> + <% if @public_body.not_requestable_reason == 'not_apply' %> + <p><%= _('Freedom of Information law does not apply to this authority, so you cannot make + a request to it.')%></p> + <% elsif @public_body.not_requestable_reason == 'defunct' %> + <p><%= _('This authority no longer exists, so you cannot make a request to it.')%></p> + <% else %> + <p><%= _('For an unknown reason, it is not possible to make a request to this authority.')%></p> + <% end %> <% end %> <div id="stepwise_make_request"> @@ -59,13 +69,6 @@ <%= link_to _("Make a request to this authority"), new_request_to_body_path(:url_name => @public_body.url_name), :class => "link_button_green" %> <% elsif @public_body.has_notes? %> <%= @public_body.notes_as_html.html_safe %> - <% elsif @public_body.not_requestable_reason == 'not_apply' %> - <%= _('Freedom of Information law does not apply to this authority, so you cannot make - a request to it.')%> - <% elsif @public_body.not_requestable_reason == 'defunct' %> - <%= _('This authority no longer exists, so you cannot make a request to it.')%> - <% else %> - <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> <% end %> <% if @public_body.override_request_email %> @@ -78,12 +81,14 @@ <div id="foi_results_section"> <% if @public_body.info_requests.size == 0 %> - <% if @public_body.eir_only? %> - <h2><%= _('Environmental Information Regulations requests made using this site') %></h2> - <p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p> - <% else %> - <h2><%= _('Freedom of Information requests made using this site')%></h2> - <p><%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%></p> + <% if @public_body.is_requestable? or @public_body.not_requestable_reason != 'defunct' %> + <% if @public_body.eir_only? %> + <h2><%= _('Environmental Information Regulations requests made using this site') %></h2> + <p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p> + <% else %> + <h2><%= _('Freedom of Information requests made using this site')%></h2> + <p><%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%></p> + <% end %> <% end %> <% else %> <h2 class="foi_results"> diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb index aba5c2fb3..e08f43eaa 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -58,7 +58,7 @@ <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> <% end %> <% if @xapian_similar_more %> - <p><%= link_to _("More similar requests"), similar_request_path(@info_request) %></p> + <p><%= link_to _("More similar requests"), similar_request_path(@info_request.url_title) %></p> <% end %> <!-- Important terms: <%= @xapian_similar.important_terms.join(" ") %> --> <% end %> diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb index 8b7d38ac0..f8b97ffe3 100644 --- a/app/views/request/new.html.erb +++ b/app/views/request/new.html.erb @@ -141,7 +141,7 @@ <% if !@info_request.tag_string.empty? %> <p class="form_note"> - <!-- <label class="form_label" for="info_request_tag_string">Tags:</label> + <!-- <label class="form_label" for="info_request_tag_string"><%= _("Tags (separated by a space):") %></label> <%= f.text_field :tag_string, :size => 50 %> --> <%= f.hidden_field(:tag_string) %> diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb index 0d53f6919..eb7ff636d 100644 --- a/app/views/request/similar.html.erb +++ b/app/views/request/similar.html.erb @@ -1,5 +1,16 @@ -<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %> -<h1><%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %></h1> +<%- if @page > 1 %> + <%- @title = _("Requests similar to '{{request_title}}' (page {{page}})", {:page => @page, :request_title => @info_request.title}) %> +<%- else %> +<%- @title = _("Requests similar to '{{request_title}}'", {:request_title => @info_request.title}) %> +<%- end %> + +<h1> + <%- if @page > 1 %> + <%= _("Requests similar to '{{request_title}}' (page {{page}})", {:page => @page, :request_title => request_link(@info_request)}) %> + <%- else %> + <%= _("Requests similar to '{{request_title}}'", {:request_title => request_link(@info_request)}) %> + <%- end %> +</h1> <!-- Important terms: <%= @xapian_object.important_terms.join(" ") %> --> |