From 835b51c1de0d49e652fe9c9a60f0974275de070c Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Wed, 27 Feb 2013 10:34:47 +1100 Subject: Rename ALL THE TEMPLATES!!1!!!one!!1!! .rhtml is deprecated in favour of .erb in Rails 3 --- app/views/general/_advanced_search_tips.html.erb | 49 +++++ app/views/general/_advanced_search_tips.rhtml | 49 ----- app/views/general/_before_body_end.html.erb | 1 + app/views/general/_before_body_end.rhtml | 1 - app/views/general/_before_head_end.html.erb | 1 + app/views/general/_before_head_end.rhtml | 1 - app/views/general/_credits.html.erb | 1 + app/views/general/_credits.rhtml | 1 - .../general/_custom_state_descriptions.html.erb | 1 + app/views/general/_custom_state_descriptions.rhtml | 1 - .../_custom_state_transitions_complete.html.erb | 0 .../_custom_state_transitions_complete.rhtml | 0 .../_custom_state_transitions_pending.html.erb | 0 .../_custom_state_transitions_pending.rhtml | 0 app/views/general/_footer.html.erb | 6 + app/views/general/_footer.rhtml | 6 - app/views/general/_frontpage_bodies_list.html.erb | 17 ++ app/views/general/_frontpage_bodies_list.rhtml | 17 -- .../general/_frontpage_intro_sentence.html.erb | 4 + app/views/general/_frontpage_intro_sentence.rhtml | 4 - app/views/general/_frontpage_new_request.html.erb | 7 + app/views/general/_frontpage_new_request.rhtml | 7 - .../general/_frontpage_requests_list.html.erb | 35 ++++ app/views/general/_frontpage_requests_list.rhtml | 35 ---- app/views/general/_frontpage_search_box.html.erb | 12 ++ app/views/general/_frontpage_search_box.rhtml | 12 -- app/views/general/_locale_switcher.html.erb | 13 ++ app/views/general/_locale_switcher.rhtml | 13 -- app/views/general/_localised_datepicker.html.erb | 18 ++ app/views/general/_localised_datepicker.rhtml | 18 -- app/views/general/_orglink.html.erb | 2 + app/views/general/_orglink.rhtml | 2 - app/views/general/_popup_banner.html.erb | 1 + app/views/general/_popup_banner.rhtml | 1 - app/views/general/_stylesheet_includes.html.erb | 21 +++ app/views/general/_stylesheet_includes.rhtml | 21 --- app/views/general/_topnav.html.erb | 10 + app/views/general/_topnav.rhtml | 10 - app/views/general/blog.html.erb | 44 +++++ app/views/general/blog.rhtml | 44 ----- app/views/general/custom_css.html.erb | 1 + app/views/general/custom_css.rhtml | 1 - app/views/general/exception_caught.html.erb | 24 +++ app/views/general/exception_caught.rhtml | 24 --- app/views/general/frontpage.html.erb | 19 ++ app/views/general/frontpage.rhtml | 19 -- app/views/general/search.html.erb | 210 +++++++++++++++++++++ app/views/general/search.rhtml | 210 --------------------- 48 files changed, 497 insertions(+), 497 deletions(-) create mode 100644 app/views/general/_advanced_search_tips.html.erb delete mode 100644 app/views/general/_advanced_search_tips.rhtml create mode 100644 app/views/general/_before_body_end.html.erb delete mode 100644 app/views/general/_before_body_end.rhtml create mode 100644 app/views/general/_before_head_end.html.erb delete mode 100644 app/views/general/_before_head_end.rhtml create mode 100644 app/views/general/_credits.html.erb delete mode 100644 app/views/general/_credits.rhtml create mode 100644 app/views/general/_custom_state_descriptions.html.erb delete mode 100644 app/views/general/_custom_state_descriptions.rhtml create mode 100644 app/views/general/_custom_state_transitions_complete.html.erb delete mode 100644 app/views/general/_custom_state_transitions_complete.rhtml create mode 100644 app/views/general/_custom_state_transitions_pending.html.erb delete mode 100644 app/views/general/_custom_state_transitions_pending.rhtml create mode 100644 app/views/general/_footer.html.erb delete mode 100644 app/views/general/_footer.rhtml create mode 100644 app/views/general/_frontpage_bodies_list.html.erb delete mode 100644 app/views/general/_frontpage_bodies_list.rhtml create mode 100644 app/views/general/_frontpage_intro_sentence.html.erb delete mode 100644 app/views/general/_frontpage_intro_sentence.rhtml create mode 100644 app/views/general/_frontpage_new_request.html.erb delete mode 100644 app/views/general/_frontpage_new_request.rhtml create mode 100644 app/views/general/_frontpage_requests_list.html.erb delete mode 100644 app/views/general/_frontpage_requests_list.rhtml create mode 100644 app/views/general/_frontpage_search_box.html.erb delete mode 100644 app/views/general/_frontpage_search_box.rhtml create mode 100644 app/views/general/_locale_switcher.html.erb delete mode 100644 app/views/general/_locale_switcher.rhtml create mode 100644 app/views/general/_localised_datepicker.html.erb delete mode 100644 app/views/general/_localised_datepicker.rhtml create mode 100644 app/views/general/_orglink.html.erb delete mode 100644 app/views/general/_orglink.rhtml create mode 100644 app/views/general/_popup_banner.html.erb delete mode 100644 app/views/general/_popup_banner.rhtml create mode 100644 app/views/general/_stylesheet_includes.html.erb delete mode 100644 app/views/general/_stylesheet_includes.rhtml create mode 100644 app/views/general/_topnav.html.erb delete mode 100644 app/views/general/_topnav.rhtml create mode 100644 app/views/general/blog.html.erb delete mode 100644 app/views/general/blog.rhtml create mode 100644 app/views/general/custom_css.html.erb delete mode 100644 app/views/general/custom_css.rhtml create mode 100644 app/views/general/exception_caught.html.erb delete mode 100644 app/views/general/exception_caught.rhtml create mode 100644 app/views/general/frontpage.html.erb delete mode 100644 app/views/general/frontpage.rhtml create mode 100644 app/views/general/search.html.erb delete mode 100644 app/views/general/search.rhtml (limited to 'app/views/general') diff --git a/app/views/general/_advanced_search_tips.html.erb b/app/views/general/_advanced_search_tips.html.erb new file mode 100644 index 000000000..914abc1af --- /dev/null +++ b/app/views/general/_advanced_search_tips.html.erb @@ -0,0 +1,49 @@ +
+ +

<%= _("Advanced search tips")%>

+ + +

<%= _('Table of statuses') %>

+

<%= _("All the options below can use status or latest_status before the colon. For example, status:not_held will match requests which have ever been marked as not held; latest_status:not_held will match only requests that are currently marked as not held.") %>

+ + + + + + + + + + + + + +
<%=search_link('status:waiting_response', nil, nil, true)%><%= _('Waiting for the public authority to reply') %>
<%=search_link('status:not_held', nil, nil, true)%><%= _('The public authority does not have the information requested') %>
<%=search_link('status:rejected', nil, nil, true)%><%= _('The request was refused by the public authority') %>
<%=search_link('status:partially_successful', nil, nil, true)%><%= _('Some of the information requested has been received') %>
<%=search_link('status:successful', nil, nil, true)%><%= _('All of the information requested has been received') %>
<%=search_link('status:waiting_clarification', nil, nil, true)%><%= _('The public authority would like part of the request explained') %>
<%=search_link('status:gone_postal', nil, nil, true)%><%= _('The public authority would like to / has responded by post') %>
<%=search_link('status:internal_review', nil, nil, true)%><%= _('Waiting for the public authority to complete an internal review of their handling of the request') %>
<%=search_link('status:error_message', nil, nil, true)%><%= _('Received an error message, such as delivery failure.') %>
<%=search_link('status:requires_admin', nil, nil, true)%><%= _('A strange reponse, required attention by the {{site_name}} team', :site_name=>site_name) %>
<%=search_link('status:user_withdrawn', nil, nil, true)%><%= _('The requester has abandoned this request for some reason') %>
+ +

<%= _('Table of varieties') %>

+

<%= _("All the options below can use variety or latest_variety before the colon. For example, variety:sent will match requests which have ever been sent; latest_variety:sent will match only requests that are currently marked as sent.") %>

+ + + + + + + +
<%=search_link('variety:sent', nil, nil, true)%><%= _('Original request sent') %>
<%=search_link('variety:followup_sent', nil, nil, true)%><%= _('Follow up message sent by requester') %>
<%=search_link('variety:response', nil, nil, true)%><%= _('Response from a public authority') %>
<%=search_link('variety:comment', nil, nil, true)%><%= _('Annotation added to request') %>
<%=search_link('variety:authority', nil, nil, true)%><%= _('A public authority') %>
<%=search_link('variety:user', nil, nil, true)%><%= _('A {{site_name}} user', :site_name=>site_name) %>
+
diff --git a/app/views/general/_advanced_search_tips.rhtml b/app/views/general/_advanced_search_tips.rhtml deleted file mode 100644 index 914abc1af..000000000 --- a/app/views/general/_advanced_search_tips.rhtml +++ /dev/null @@ -1,49 +0,0 @@ -
- -

<%= _("Advanced search tips")%>

- - -

<%= _('Table of statuses') %>

-

<%= _("All the options below can use status or latest_status before the colon. For example, status:not_held will match requests which have ever been marked as not held; latest_status:not_held will match only requests that are currently marked as not held.") %>

- - - - - - - - - - - - - -
<%=search_link('status:waiting_response', nil, nil, true)%><%= _('Waiting for the public authority to reply') %>
<%=search_link('status:not_held', nil, nil, true)%><%= _('The public authority does not have the information requested') %>
<%=search_link('status:rejected', nil, nil, true)%><%= _('The request was refused by the public authority') %>
<%=search_link('status:partially_successful', nil, nil, true)%><%= _('Some of the information requested has been received') %>
<%=search_link('status:successful', nil, nil, true)%><%= _('All of the information requested has been received') %>
<%=search_link('status:waiting_clarification', nil, nil, true)%><%= _('The public authority would like part of the request explained') %>
<%=search_link('status:gone_postal', nil, nil, true)%><%= _('The public authority would like to / has responded by post') %>
<%=search_link('status:internal_review', nil, nil, true)%><%= _('Waiting for the public authority to complete an internal review of their handling of the request') %>
<%=search_link('status:error_message', nil, nil, true)%><%= _('Received an error message, such as delivery failure.') %>
<%=search_link('status:requires_admin', nil, nil, true)%><%= _('A strange reponse, required attention by the {{site_name}} team', :site_name=>site_name) %>
<%=search_link('status:user_withdrawn', nil, nil, true)%><%= _('The requester has abandoned this request for some reason') %>
- -

<%= _('Table of varieties') %>

-

<%= _("All the options below can use variety or latest_variety before the colon. For example, variety:sent will match requests which have ever been sent; latest_variety:sent will match only requests that are currently marked as sent.") %>

- - - - - - - -
<%=search_link('variety:sent', nil, nil, true)%><%= _('Original request sent') %>
<%=search_link('variety:followup_sent', nil, nil, true)%><%= _('Follow up message sent by requester') %>
<%=search_link('variety:response', nil, nil, true)%><%= _('Response from a public authority') %>
<%=search_link('variety:comment', nil, nil, true)%><%= _('Annotation added to request') %>
<%=search_link('variety:authority', nil, nil, true)%><%= _('A public authority') %>
<%=search_link('variety:user', nil, nil, true)%><%= _('A {{site_name}} user', :site_name=>site_name) %>
-
diff --git a/app/views/general/_before_body_end.html.erb b/app/views/general/_before_body_end.html.erb new file mode 100644 index 000000000..25fdf4684 --- /dev/null +++ b/app/views/general/_before_body_end.html.erb @@ -0,0 +1 @@ +<%# This file may be overwritten by a local theme to add a site footer, analytics code, etc. %> diff --git a/app/views/general/_before_body_end.rhtml b/app/views/general/_before_body_end.rhtml deleted file mode 100644 index 25fdf4684..000000000 --- a/app/views/general/_before_body_end.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%# This file may be overwritten by a local theme to add a site footer, analytics code, etc. %> diff --git a/app/views/general/_before_head_end.html.erb b/app/views/general/_before_head_end.html.erb new file mode 100644 index 000000000..8886745ab --- /dev/null +++ b/app/views/general/_before_head_end.html.erb @@ -0,0 +1 @@ +<%# This file may be overwritten by a local theme to add scripts, Google Analytics code, etc. %> diff --git a/app/views/general/_before_head_end.rhtml b/app/views/general/_before_head_end.rhtml deleted file mode 100644 index 8886745ab..000000000 --- a/app/views/general/_before_head_end.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%# This file may be overwritten by a local theme to add scripts, Google Analytics code, etc. %> diff --git a/app/views/general/_credits.html.erb b/app/views/general/_credits.html.erb new file mode 100644 index 000000000..b1a9ce05e --- /dev/null +++ b/app/views/general/_credits.html.erb @@ -0,0 +1 @@ +| <%= _('Powered by Alaveteli') %> diff --git a/app/views/general/_credits.rhtml b/app/views/general/_credits.rhtml deleted file mode 100644 index b1a9ce05e..000000000 --- a/app/views/general/_credits.rhtml +++ /dev/null @@ -1 +0,0 @@ -| <%= _('Powered by Alaveteli') %> diff --git a/app/views/general/_custom_state_descriptions.html.erb b/app/views/general/_custom_state_descriptions.html.erb new file mode 100644 index 000000000..913a6d50a --- /dev/null +++ b/app/views/general/_custom_state_descriptions.html.erb @@ -0,0 +1 @@ + <% raise "unknown status " + status %> diff --git a/app/views/general/_custom_state_descriptions.rhtml b/app/views/general/_custom_state_descriptions.rhtml deleted file mode 100644 index 913a6d50a..000000000 --- a/app/views/general/_custom_state_descriptions.rhtml +++ /dev/null @@ -1 +0,0 @@ - <% raise "unknown status " + status %> diff --git a/app/views/general/_custom_state_transitions_complete.html.erb b/app/views/general/_custom_state_transitions_complete.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/general/_custom_state_transitions_complete.rhtml b/app/views/general/_custom_state_transitions_complete.rhtml deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/general/_custom_state_transitions_pending.html.erb b/app/views/general/_custom_state_transitions_pending.html.erb new file mode 100644 index 000000000..e69de29bb diff --git a/app/views/general/_custom_state_transitions_pending.rhtml b/app/views/general/_custom_state_transitions_pending.rhtml deleted file mode 100644 index e69de29bb..000000000 diff --git a/app/views/general/_footer.html.erb b/app/views/general/_footer.html.erb new file mode 100644 index 000000000..ab5ab2c47 --- /dev/null +++ b/app/views/general/_footer.html.erb @@ -0,0 +1,6 @@ + + diff --git a/app/views/general/_footer.rhtml b/app/views/general/_footer.rhtml deleted file mode 100644 index ab5ab2c47..000000000 --- a/app/views/general/_footer.rhtml +++ /dev/null @@ -1,6 +0,0 @@ - - diff --git a/app/views/general/_frontpage_bodies_list.html.erb b/app/views/general/_frontpage_bodies_list.html.erb new file mode 100644 index 000000000..503b38953 --- /dev/null +++ b/app/views/general/_frontpage_bodies_list.html.erb @@ -0,0 +1,17 @@ +<% if @popular_bodies.size > 0 %> +
+

<%= _("Who can I request information from?") %>

+ <%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:", + :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %> + +

+ <%= link_to _('Browse all authorities...'), list_public_bodies_default %> +

+
+<% end %> diff --git a/app/views/general/_frontpage_bodies_list.rhtml b/app/views/general/_frontpage_bodies_list.rhtml deleted file mode 100644 index 503b38953..000000000 --- a/app/views/general/_frontpage_bodies_list.rhtml +++ /dev/null @@ -1,17 +0,0 @@ -<% if @popular_bodies.size > 0 %> -
-

<%= _("Who can I request information from?") %>

- <%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:", - :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %> - -

- <%= link_to _('Browse all authorities...'), list_public_bodies_default %> -

-
-<% end %> diff --git a/app/views/general/_frontpage_intro_sentence.html.erb b/app/views/general/_frontpage_intro_sentence.html.erb new file mode 100644 index 000000000..70b47ad06 --- /dev/null +++ b/app/views/general/_frontpage_intro_sentence.html.erb @@ -0,0 +1,4 @@ +

+ Your Right to Know +

+

Every citizen has the right to access information held by public authorities. By law, they have to respond. Find out more about freedom of information.

diff --git a/app/views/general/_frontpage_intro_sentence.rhtml b/app/views/general/_frontpage_intro_sentence.rhtml deleted file mode 100644 index 70b47ad06..000000000 --- a/app/views/general/_frontpage_intro_sentence.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -

- Your Right to Know -

-

Every citizen has the right to access information held by public authorities. By law, they have to respond. Find out more about freedom of information.

diff --git a/app/views/general/_frontpage_new_request.html.erb b/app/views/general/_frontpage_new_request.html.erb new file mode 100644 index 000000000..499b60eb5 --- /dev/null +++ b/app/views/general/_frontpage_new_request.html.erb @@ -0,0 +1,7 @@ +

+ <%= _("Make a new
+ Freedom of
+ Information
+ request
") %> +

+<%= _("Start now »") %> diff --git a/app/views/general/_frontpage_new_request.rhtml b/app/views/general/_frontpage_new_request.rhtml deleted file mode 100644 index 499b60eb5..000000000 --- a/app/views/general/_frontpage_new_request.rhtml +++ /dev/null @@ -1,7 +0,0 @@ -

- <%= _("Make a new
- Freedom of
- Information
- request
") %> -

-<%= _("Start now »") %> diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb new file mode 100644 index 000000000..3b0efb65e --- /dev/null +++ b/app/views/general/_frontpage_requests_list.html.erb @@ -0,0 +1,35 @@ +
+

+ <% if @request_events_all_successful %> + <%= _("What information has been released?") %> + <% else %> + <%= _("What information has been requested?") %> + <% end %> +

+ <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", + :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %> + +

+ <% if @request_events_all_successful %> + <%=link_to _('More successful requests...'), request_list_successful_url %> + <% else %> + <%=link_to _('More requests...'), request_list_all_url %> + <% end %> +

+
diff --git a/app/views/general/_frontpage_requests_list.rhtml b/app/views/general/_frontpage_requests_list.rhtml deleted file mode 100644 index 3b0efb65e..000000000 --- a/app/views/general/_frontpage_requests_list.rhtml +++ /dev/null @@ -1,35 +0,0 @@ -
-

- <% if @request_events_all_successful %> - <%= _("What information has been released?") %> - <% else %> - <%= _("What information has been requested?") %> - <% end %> -

- <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", - :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %> - -

- <% if @request_events_all_successful %> - <%=link_to _('More successful requests...'), request_list_successful_url %> - <% else %> - <%=link_to _('More requests...'), request_list_all_url %> - <% end %> -

-
diff --git a/app/views/general/_frontpage_search_box.html.erb b/app/views/general/_frontpage_search_box.html.erb new file mode 100644 index 000000000..d2718b3a3 --- /dev/null +++ b/app/views/general/_frontpage_search_box.html.erb @@ -0,0 +1,12 @@ +

+ <%= _("Search over
+ {{number_of_requests}} requests and
+ {{number_of_authorities}} authorities", + :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %> +

+
+
+ + +
+
diff --git a/app/views/general/_frontpage_search_box.rhtml b/app/views/general/_frontpage_search_box.rhtml deleted file mode 100644 index d2718b3a3..000000000 --- a/app/views/general/_frontpage_search_box.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -

- <%= _("Search over
- {{number_of_requests}} requests and
- {{number_of_authorities}} authorities", - :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %> -

-
-
- - -
-
diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb new file mode 100644 index 000000000..2521b5eb5 --- /dev/null +++ b/app/views/general/_locale_switcher.html.erb @@ -0,0 +1,13 @@ + <% if FastGettext.default_available_locales.length > 1 && !params.empty? %> +
+
+ <% for possible_locale in FastGettext.default_available_locales %> + <% if possible_locale == I18n.locale.to_s %> + <%= locale_name(possible_locale) %> + <% else %> + <%= locale_name(possible_locale) %> + <% end %> + <% end %> +
+
+ <% end %> diff --git a/app/views/general/_locale_switcher.rhtml b/app/views/general/_locale_switcher.rhtml deleted file mode 100644 index 2521b5eb5..000000000 --- a/app/views/general/_locale_switcher.rhtml +++ /dev/null @@ -1,13 +0,0 @@ - <% if FastGettext.default_available_locales.length > 1 && !params.empty? %> -
-
- <% for possible_locale in FastGettext.default_available_locales %> - <% if possible_locale == I18n.locale.to_s %> - <%= locale_name(possible_locale) %> - <% else %> - <%= locale_name(possible_locale) %> - <% end %> - <% end %> -
-
- <% end %> diff --git a/app/views/general/_localised_datepicker.html.erb b/app/views/general/_localised_datepicker.html.erb new file mode 100644 index 000000000..ec6593ea0 --- /dev/null +++ b/app/views/general/_localised_datepicker.html.erb @@ -0,0 +1,18 @@ + + diff --git a/app/views/general/_localised_datepicker.rhtml b/app/views/general/_localised_datepicker.rhtml deleted file mode 100644 index ec6593ea0..000000000 --- a/app/views/general/_localised_datepicker.rhtml +++ /dev/null @@ -1,18 +0,0 @@ - - diff --git a/app/views/general/_orglink.html.erb b/app/views/general/_orglink.html.erb new file mode 100644 index 000000000..fbe688d85 --- /dev/null +++ b/app/views/general/_orglink.html.erb @@ -0,0 +1,2 @@ +<%# Put the link to your organisation here, or leave blank %> +<%= link_to image_tag('logo.png'), frontpage_url, :id=>'logo' %> diff --git a/app/views/general/_orglink.rhtml b/app/views/general/_orglink.rhtml deleted file mode 100644 index fbe688d85..000000000 --- a/app/views/general/_orglink.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -<%# Put the link to your organisation here, or leave blank %> -<%= link_to image_tag('logo.png'), frontpage_url, :id=>'logo' %> diff --git a/app/views/general/_popup_banner.html.erb b/app/views/general/_popup_banner.html.erb new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/app/views/general/_popup_banner.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/general/_popup_banner.rhtml b/app/views/general/_popup_banner.rhtml deleted file mode 100644 index 8b1378917..000000000 --- a/app/views/general/_popup_banner.rhtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/general/_stylesheet_includes.html.erb b/app/views/general/_stylesheet_includes.html.erb new file mode 100644 index 000000000..7a03680f8 --- /dev/null +++ b/app/views/general/_stylesheet_includes.html.erb @@ -0,0 +1,21 @@ + <%= 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 %> + <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> + + + + + <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> + <% if Configuration::force_registration_on_new_request %> + <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> + <% end %> diff --git a/app/views/general/_stylesheet_includes.rhtml b/app/views/general/_stylesheet_includes.rhtml deleted file mode 100644 index 7a03680f8..000000000 --- a/app/views/general/_stylesheet_includes.rhtml +++ /dev/null @@ -1,21 +0,0 @@ - <%= 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 %> - <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> - - - - - <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> - <% if Configuration::force_registration_on_new_request %> - <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> - <% end %> diff --git a/app/views/general/_topnav.html.erb b/app/views/general/_topnav.html.erb new file mode 100644 index 000000000..8ef928bba --- /dev/null +++ b/app/views/general/_topnav.html.erb @@ -0,0 +1,10 @@ +
+ +
diff --git a/app/views/general/_topnav.rhtml b/app/views/general/_topnav.rhtml deleted file mode 100644 index 8ef928bba..000000000 --- a/app/views/general/_topnav.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -
- -
diff --git a/app/views/general/blog.html.erb b/app/views/general/blog.html.erb new file mode 100644 index 000000000..07d6d2f14 --- /dev/null +++ b/app/views/general/blog.html.erb @@ -0,0 +1,44 @@ +<% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %> + +<% if !@twitter_user.empty? %> +
+ + <% if Configuration::twitter_widget_id %> +
+ + +
+ <% end %> +
+<% end %> + +
+

<%=@title %>

+ +
+ <% for item in @blog_items: %> +
+

<%=h item['title'] %>

+

<%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %>

+
+ <% if item['encoded'] %> + <%= raw item['encoded'] %> + <% elsif item['description'] %> + <%= raw item['description'] %> + <% end %> +
+

+ <% if item['comments'] %> + <%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %> + <% end %> + +

+
+ <% end %> +
+
+ diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml deleted file mode 100644 index 07d6d2f14..000000000 --- a/app/views/general/blog.rhtml +++ /dev/null @@ -1,44 +0,0 @@ -<% @title = _("{{site_name}} blog and tweets", :site_name => site_name) %> - -<% if !@twitter_user.empty? %> -
- - <% if Configuration::twitter_widget_id %> -
- - -
- <% end %> -
-<% end %> - -
-

<%=@title %>

- -
- <% for item in @blog_items: %> -
-

<%=h item['title'] %>

-

<%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %>

-
- <% if item['encoded'] %> - <%= raw item['encoded'] %> - <% elsif item['description'] %> - <%= raw item['description'] %> - <% end %> -
-

- <% if item['comments'] %> - <%= _("{{number_of_comments}} comments", :number_of_comments=>item['comments'][1]) %> - <% end %> - -

-
- <% end %> -
-
- diff --git a/app/views/general/custom_css.html.erb b/app/views/general/custom_css.html.erb new file mode 100644 index 000000000..0def82ed0 --- /dev/null +++ b/app/views/general/custom_css.html.erb @@ -0,0 +1 @@ +// this should be overridden in a local "theme" plugin diff --git a/app/views/general/custom_css.rhtml b/app/views/general/custom_css.rhtml deleted file mode 100644 index 0def82ed0..000000000 --- a/app/views/general/custom_css.rhtml +++ /dev/null @@ -1 +0,0 @@ -// this should be overridden in a local "theme" plugin diff --git a/app/views/general/exception_caught.html.erb b/app/views/general/exception_caught.html.erb new file mode 100644 index 000000000..94b0d0db7 --- /dev/null +++ b/app/views/general/exception_caught.html.erb @@ -0,0 +1,24 @@ +
+ <% if @status == 404 %> +

<%= _("Sorry, we couldn't find that page") %>

+ +

<%= _("The page doesn't exist. Things you can try now:")%>

+ + + <% else %> +

<%= _("Sorry, there was a problem processing this page") %>

+

<%= _('You have found a bug. Please contact us to tell us about the problem', :contact_url => help_contact_path) %>

+ + <% end %> +

<%= _('Technical details') %>

+

<%= h(@exception_class ? @exception_class : _("Unknown")) %>

+

<%= h(@exception_message) %>

+
diff --git a/app/views/general/exception_caught.rhtml b/app/views/general/exception_caught.rhtml deleted file mode 100644 index 94b0d0db7..000000000 --- a/app/views/general/exception_caught.rhtml +++ /dev/null @@ -1,24 +0,0 @@ -
- <% if @status == 404 %> -

<%= _("Sorry, we couldn't find that page") %>

- -

<%= _("The page doesn't exist. Things you can try now:")%>

- - - <% else %> -

<%= _("Sorry, there was a problem processing this page") %>

-

<%= _('You have found a bug. Please contact us to tell us about the problem', :contact_url => help_contact_path) %>

- - <% end %> -

<%= _('Technical details') %>

-

<%= h(@exception_class ? @exception_class : _("Unknown")) %>

-

<%= h(@exception_message) %>

-
diff --git a/app/views/general/frontpage.html.erb b/app/views/general/frontpage.html.erb new file mode 100644 index 000000000..bf5261d15 --- /dev/null +++ b/app/views/general/frontpage.html.erb @@ -0,0 +1,19 @@ +<% # TODO: Cache for 5 minutes %> +
+
+ <%= render :partial => "frontpage_new_request" %> +
+
+ +
+ <%= render :partial => 'frontpage_intro_sentence' %> +
+
+
+
+
+ <%= render :partial => "frontpage_bodies_list" %> + <%= render :partial => "frontpage_requests_list" %> +
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml deleted file mode 100644 index bf5261d15..000000000 --- a/app/views/general/frontpage.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<% # TODO: Cache for 5 minutes %> -
-
- <%= render :partial => "frontpage_new_request" %> -
-
- -
- <%= render :partial => 'frontpage_intro_sentence' %> -
-
-
-
-
- <%= render :partial => "frontpage_bodies_list" %> - <%= render :partial => "frontpage_requests_list" %> -
diff --git a/app/views/general/search.html.erb b/app/views/general/search.html.erb new file mode 100644 index 000000000..de42d3937 --- /dev/null +++ b/app/views/general/search.html.erb @@ -0,0 +1,210 @@ +<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %> + +<% @include_request_link_in_authority_listing = true %> + +<%= render :partial => 'localised_datepicker' %> + +<% if @query.nil? %> + <% @title = _("Search Freedom of Information requests, public authorities and users") %> +<% elsif @total_hits == 0 %> + <% @title = _('There were no results matching your query.') %> +<% else %> + <% @title = _("Results page {{page_number}}", :page_number => @page.to_s) %> +<% end%> + +
+ <% if @query.nil? %> +

<%= _("Search") %>

+ <% else %> +

<%= _("Search results") %>

+ <% end%> + + <% if @advanced %> + + <% else %> + <%= form_tag(request.url, {:method => "get", :id => "search_form"}) do %> +

+ <%= text_field_tag 'query', params[:query], { :size => 40 } %> + <%= hidden_field_tag 'sortby', @inputted_sortby %> + <% if @bodies %> + <%= hidden_field_tag 'bodies', 1 %> + <% end %> + <%= submit_tag _("Search") %> + <%= link_to(_("Advanced search"), advanced_search_url) %> +

+ +
+
+

<%= _("Showing") %>

+ <% labels = [ + ["requests", _("requests")], + ["users", _("users")], + ["bodies", _("authorities")], + ["all", _("everything")]]%> + <% for variety, label in labels %> + <% if @variety_postfix != variety %> + <%= link_to label, search_url([params[:query], variety, @sort_postfix]) %> + <% else %> + <%= label %> + <% end %> + <%= "|" unless variety == labels.last[0]%> + <% end %> +
+ + <% if false %> + <%-# Commented out for now as tags are of limited use when users can't see them. This will change in the future! -%> + <% if @variety_postfix != "users" %> +
+ <%= label_tag(:query, _("Tags (separated by a space):")) %><%= text_field_tag(:tags, params[:tags], { :size => 20 }) %> + <% for tag in InfoRequest.get_tags %> + <%= tag.name_and_value %> + <% end %> +
+ <% end %> + <% end %> +
+ + <% if @variety_postfix == "requests" %> +
+
+

<%= _("Restrict to") %>

+ <% [["successful", _("successful requests")], + ["unsuccessful", _("unsuccessful requests")], + ["awaiting", _("unresolved requests")], + ["internal_review", _("internal reviews")]].each_with_index do |item, index| + status, title = item %> + + <%= check_box_tag "latest_status[]", status, params[:latest_status].nil? ? false : params[:latest_status].include?(status), :id => "latest_status_#{index}" %> + <%= label_tag("latest_status_#{index}", title) %>
+ <% end %> +
+ +
+

<%= _("Search in") %>

+ <% [["sent", _("messages from users")], + ["response", _("messages from authorities")], + ["comment", _("comments")]].each_with_index do |item, index| + variety, title = item %> + + <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> + <%= label_tag("request_variety_#{index}", title) %>
+ <% end %> +
+ +
+ + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> + + <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> +
+
+ <% end %> + +
+ <%= submit_tag _("Filter") if @variety_postfix == "requests"%> +
+ <% end # Search form%> + + <% end # if @advanced %> + + <% if !@query.nil? %> +

+ <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url([params[:query], @variety_postfix, 'relevant'], params) %> + | + <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url([params[:query], @variety_postfix, 'newest'], params) %> + <% if @sortby == 'described' %> + | <%= _('Recently described results first') %> + <% end %> +

+ <% end %> +
+<% if !@track_thing.nil? %> +
+

<%= _('Track this search')%>

+ <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> +
+<% end %> + +
+ +<% if @total_hits == 0 %> +

<%=@title %>

+<% end %> + +<% if not @query.nil? %> +
+ <% if @xapian_bodies_hits > 0 %> + <% if @xapian_bodies_hits == 1 && @page == 1 %> +

<%= _('One public authority found') %>

+ <% else %> +

<%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s) %>

+ <% end %> + +
+ <% for result in @xapian_bodies.results %> + <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> + <% end %> +
+ + <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %> + <% elsif @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %> + <% if @spelling_correction %> +

<%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction, @postfix)) %>

+ <% end %> +

<%= raw(_('Browse all or ask us to add one.') % [list_public_bodies_default, help_requesting_path + '#missing_body']) %>

+ <% end %> +
+ +
+ <% if @xapian_users_hits > 0 %> + <% if @xapian_users_hits == 1 && @page == 1 %> +

<%= _("One person found") %>

+ <% else %> +

<%= _("People {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s) %>

+ <% end %> + +
+ <% for result in @xapian_users.results %> + <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %> + <% end %> +
+ <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %> + + <% end %> +
+ +
+ <% if @xapian_requests_hits > 0 %> + <% if @xapian_requests_hits == 1 && @page == 1 %> +

<%= _("One FOI request found") %>

+ <% else %> +

<%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s) %>

+ <% end %> + +
+ <% for result in @xapian_requests.results %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> +
+ + <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> + <% end %> +
+<% end %> + +<% if @advanced %> + <%= render :partial => 'general/advanced_search_tips' %> +<% end %> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml deleted file mode 100644 index de42d3937..000000000 --- a/app/views/general/search.rhtml +++ /dev/null @@ -1,210 +0,0 @@ -<% @show_tips = @xapian_requests.nil? || (@total_hits == 0) %> - -<% @include_request_link_in_authority_listing = true %> - -<%= render :partial => 'localised_datepicker' %> - -<% if @query.nil? %> - <% @title = _("Search Freedom of Information requests, public authorities and users") %> -<% elsif @total_hits == 0 %> - <% @title = _('There were no results matching your query.') %> -<% else %> - <% @title = _("Results page {{page_number}}", :page_number => @page.to_s) %> -<% end%> - -
- <% if @query.nil? %> -

<%= _("Search") %>

- <% else %> -

<%= _("Search results") %>

- <% end%> - - <% if @advanced %> - - <% else %> - <%= form_tag(request.url, {:method => "get", :id => "search_form"}) do %> -

- <%= text_field_tag 'query', params[:query], { :size => 40 } %> - <%= hidden_field_tag 'sortby', @inputted_sortby %> - <% if @bodies %> - <%= hidden_field_tag 'bodies', 1 %> - <% end %> - <%= submit_tag _("Search") %> - <%= link_to(_("Advanced search"), advanced_search_url) %> -

- -
-
-

<%= _("Showing") %>

- <% labels = [ - ["requests", _("requests")], - ["users", _("users")], - ["bodies", _("authorities")], - ["all", _("everything")]]%> - <% for variety, label in labels %> - <% if @variety_postfix != variety %> - <%= link_to label, search_url([params[:query], variety, @sort_postfix]) %> - <% else %> - <%= label %> - <% end %> - <%= "|" unless variety == labels.last[0]%> - <% end %> -
- - <% if false %> - <%-# Commented out for now as tags are of limited use when users can't see them. This will change in the future! -%> - <% if @variety_postfix != "users" %> -
- <%= label_tag(:query, _("Tags (separated by a space):")) %><%= text_field_tag(:tags, params[:tags], { :size => 20 }) %> - <% for tag in InfoRequest.get_tags %> - <%= tag.name_and_value %> - <% end %> -
- <% end %> - <% end %> -
- - <% if @variety_postfix == "requests" %> -
-
-

<%= _("Restrict to") %>

- <% [["successful", _("successful requests")], - ["unsuccessful", _("unsuccessful requests")], - ["awaiting", _("unresolved requests")], - ["internal_review", _("internal reviews")]].each_with_index do |item, index| - status, title = item %> - - <%= check_box_tag "latest_status[]", status, params[:latest_status].nil? ? false : params[:latest_status].include?(status), :id => "latest_status_#{index}" %> - <%= label_tag("latest_status_#{index}", title) %>
- <% end %> -
- -
-

<%= _("Search in") %>

- <% [["sent", _("messages from users")], - ["response", _("messages from authorities")], - ["comment", _("comments")]].each_with_index do |item, index| - variety, title = item %> - - <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> - <%= label_tag("request_variety_#{index}", title) %>
- <% end %> -
- -
- - <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %> - - <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> -
-
- <% end %> - -
- <%= submit_tag _("Filter") if @variety_postfix == "requests"%> -
- <% end # Search form%> - - <% end # if @advanced %> - - <% if !@query.nil? %> -

- <%=link_to_unless @sortby == 'relevant', _("Show most relevant results first"), search_url([params[:query], @variety_postfix, 'relevant'], params) %> - | - <%=link_to_unless @sortby == 'newest', _("Newest results first"), search_url([params[:query], @variety_postfix, 'newest'], params) %> - <% if @sortby == 'described' %> - | <%= _('Recently described results first') %> - <% end %> -

- <% end %> -
-<% if !@track_thing.nil? %> -
-

<%= _('Track this search')%>

- <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> -
-<% end %> - -
- -<% if @total_hits == 0 %> -

<%=@title %>

-<% end %> - -<% if not @query.nil? %> -
- <% if @xapian_bodies_hits > 0 %> - <% if @xapian_bodies_hits == 1 && @page == 1 %> -

<%= _('One public authority found') %>

- <% else %> -

<%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s) %>

- <% end %> - -
- <% for result in @xapian_bodies.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> - <% end %> -
- - <%= will_paginate WillPaginate::Collection.new(@page, @bodies_per_page, @xapian_bodies.matches_estimated) %> - <% elsif @bodies && !@query.nil? && @xapian_bodies.results.size == 0 && @page == 1 %> - <% if @spelling_correction %> -

<%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction, @postfix)) %>

- <% end %> -

<%= raw(_('Browse all or ask us to add one.') % [list_public_bodies_default, help_requesting_path + '#missing_body']) %>

- <% end %> -
- -
- <% if @xapian_users_hits > 0 %> - <% if @xapian_users_hits == 1 && @page == 1 %> -

<%= _("One person found") %>

- <% else %> -

<%= _("People {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s) %>

- <% end %> - -
- <% for result in @xapian_users.results %> - <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %> - <% end %> -
- <%= will_paginate WillPaginate::Collection.new(@page, @users_per_page, @xapian_users.matches_estimated) %> - - <% end %> -
- -
- <% if @xapian_requests_hits > 0 %> - <% if @xapian_requests_hits == 1 && @page == 1 %> -

<%= _("One FOI request found") %>

- <% else %> -

<%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s) %>

- <% end %> - -
- <% for result in @xapian_requests.results %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> -
- - <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> - <% end %> -
-<% end %> - -<% if @advanced %> - <%= render :partial => 'general/advanced_search_tips' %> -<% end %> -- cgit v1.2.3