diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/admin_censor_rule/_form.html.erb (renamed from app/views/admin_censor_rule/_form.rhtml) | 6 | ||||
-rw-r--r-- | app/views/admin_censor_rule/_show.html.erb (renamed from app/views/admin_censor_rule/_show.rhtml) | 6 | ||||
-rw-r--r-- | app/views/admin_censor_rule/edit.html.erb | 18 | ||||
-rw-r--r-- | app/views/admin_censor_rule/edit.rhtml | 16 | ||||
-rw-r--r-- | app/views/admin_censor_rule/new.html.erb (renamed from app/views/admin_censor_rule/new.rhtml) | 4 | ||||
-rw-r--r-- | app/views/admin_general/_admin_navbar.html.erb (renamed from app/views/admin_general/_admin_navbar.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_general/admin.coffee | 2 | ||||
-rw-r--r-- | app/views/admin_general/admin.js | 2 | ||||
-rw-r--r-- | app/views/admin_general/admin_js.erb | 4 | ||||
-rw-r--r-- | app/views/admin_general/debug.html.erb (renamed from app/views/admin_general/debug.rhtml) | 7 | ||||
-rw-r--r-- | app/views/admin_general/index.html.erb (renamed from app/views/admin_general/index.rhtml) | 37 | ||||
-rw-r--r-- | app/views/admin_general/stats.html.erb (renamed from app/views/admin_general/stats.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_general/timeline.html.erb (renamed from app/views/admin_general/timeline.rhtml) | 19 | ||||
-rw-r--r-- | app/views/admin_public_body/_form.html.erb (renamed from app/views/admin_public_body/_form.rhtml) | 5 | ||||
-rw-r--r-- | app/views/admin_public_body/_locale_selector.rhtml | 10 | ||||
-rw-r--r-- | app/views/admin_public_body/_one_list.html.erb (renamed from app/views/admin_public_body/_one_list.rhtml) | 4 | ||||
-rw-r--r-- | app/views/admin_public_body/_tag_help.html.erb (renamed from app/views/admin_public_body/_tag_help.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_public_body/_tags.html.erb (renamed from app/views/admin_public_body/_tags.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_public_body/edit.html.erb (renamed from app/views/admin_public_body/edit.rhtml) | 8 | ||||
-rw-r--r-- | app/views/admin_public_body/import_csv.html.erb (renamed from app/views/admin_public_body/import_csv.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/list.html.erb (renamed from app/views/admin_public_body/list.rhtml) | 9 | ||||
-rw-r--r-- | app/views/admin_public_body/missing_scheme.html.erb (renamed from app/views/admin_public_body/missing_scheme.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_public_body/new.html.erb (renamed from app/views/admin_public_body/new.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_public_body/show.html.erb (renamed from app/views/admin_public_body/show.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_request/_incoming_message_actions.html.erb (renamed from app/views/admin_request/_incoming_message_actions.rhtml) | 8 | ||||
-rw-r--r-- | app/views/admin_request/_some_requests.html.erb (renamed from app/views/admin_request/_some_requests.rhtml) | 4 | ||||
-rw-r--r-- | app/views/admin_request/_tags.html.erb (renamed from app/views/admin_request/_tags.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_request/edit.html.erb (renamed from app/views/admin_request/edit.rhtml) | 8 | ||||
-rw-r--r-- | app/views/admin_request/edit_comment.html.erb (renamed from app/views/admin_request/edit_comment.rhtml) | 6 | ||||
-rw-r--r-- | app/views/admin_request/edit_outgoing.html.erb (renamed from app/views/admin_request/edit_outgoing.rhtml) | 8 | ||||
-rw-r--r-- | app/views/admin_request/hidden_user_explanation.html.erb | 10 | ||||
-rw-r--r-- | app/views/admin_request/hidden_user_explanation.rhtml | 10 | ||||
-rw-r--r-- | app/views/admin_request/list.html.erb (renamed from app/views/admin_request/list.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_request/list_old_unclassified.rhtml | 15 | ||||
-rw-r--r-- | app/views/admin_request/show.html.erb (renamed from app/views/admin_request/show.rhtml) | 56 | ||||
-rw-r--r-- | app/views/admin_request/show_raw_email.html.erb (renamed from app/views/admin_request/show_raw_email.rhtml) | 0 | ||||
-rw-r--r-- | app/views/admin_track/_some_tracks.html.erb (renamed from app/views/admin_track/_some_tracks.rhtml) | 8 | ||||
-rw-r--r-- | app/views/admin_track/list.html.erb (renamed from app/views/admin_track/list.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_user/_form.html.erb (renamed from app/views/admin_user/_form.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_user/_user_table.html.erb (renamed from app/views/admin_user/_user_table.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_user/edit.html.erb | 11 | ||||
-rw-r--r-- | app/views/admin_user/edit.rhtml | 21 | ||||
-rw-r--r-- | app/views/admin_user/list.html.erb (renamed from app/views/admin_user/list.rhtml) | 4 | ||||
-rw-r--r-- | app/views/admin_user/list_banned.html.erb (renamed from app/views/admin_user/list_banned.rhtml) | 2 | ||||
-rw-r--r-- | app/views/admin_user/show.html.erb (renamed from app/views/admin_user/show.rhtml) | 10 | ||||
-rw-r--r-- | app/views/admin_user/show_bounce_message.html.erb (renamed from app/views/admin_user/show_bounce_message.rhtml) | 0 | ||||
-rw-r--r-- | app/views/comment/_comment_form.html.erb (renamed from app/views/comment/_comment_form.rhtml) | 4 | ||||
-rw-r--r-- | app/views/comment/_single_comment.html.erb (renamed from app/views/comment/_single_comment.rhtml) | 0 | ||||
-rw-r--r-- | app/views/comment/new.html.erb (renamed from app/views/comment/new.rhtml) | 0 | ||||
-rw-r--r-- | app/views/comment/preview.html.erb (renamed from app/views/comment/preview.rhtml) | 2 | ||||
-rw-r--r-- | app/views/contact_mailer/from_admin_message.text.erb (renamed from app/views/contact_mailer/from_admin_message.rhtml) | 0 | ||||
-rw-r--r-- | app/views/contact_mailer/to_admin_message.text.erb (renamed from app/views/contact_mailer/to_admin_message.rhtml) | 0 | ||||
-rw-r--r-- | app/views/contact_mailer/user_message.text.erb (renamed from app/views/contact_mailer/user_message.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_advanced_search_tips.html.erb (renamed from app/views/general/_advanced_search_tips.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_before_body_end.html.erb (renamed from app/views/general/_before_body_end.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_before_head_end.html.erb (renamed from app/views/general/_before_head_end.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_credits.html.erb (renamed from app/views/general/_credits.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_custom_state_descriptions.html.erb (renamed from app/views/general/_custom_state_descriptions.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_custom_state_transitions_complete.html.erb (renamed from app/views/general/_custom_state_transitions_complete.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_custom_state_transitions_pending.html.erb (renamed from app/views/general/_custom_state_transitions_pending.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_footer.html.erb (renamed from app/views/general/_footer.rhtml) | 2 | ||||
-rw-r--r-- | app/views/general/_frontpage_bodies_list.html.erb (renamed from app/views/general/_frontpage_bodies_list.rhtml) | 2 | ||||
-rw-r--r-- | app/views/general/_frontpage_intro_sentence.html.erb (renamed from app/views/general/_frontpage_intro_sentence.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_frontpage_new_request.html.erb (renamed from app/views/general/_frontpage_new_request.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_frontpage_requests_list.html.erb (renamed from app/views/general/_frontpage_requests_list.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_frontpage_search_box.html.erb (renamed from app/views/general/_frontpage_search_box.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_locale_switcher.html.erb (renamed from app/views/general/_locale_switcher.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_localised_datepicker.html.erb (renamed from app/views/general/_localised_datepicker.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_orglink.html.erb (renamed from app/views/general/_orglink.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_popup_banner.html.erb (renamed from app/views/general/_popup_banner.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/_stylesheet_includes.html.erb (renamed from app/views/general/_stylesheet_includes.rhtml) | 2 | ||||
-rw-r--r-- | app/views/general/_topnav.html.erb (renamed from app/views/general/_topnav.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/blog.html.erb (renamed from app/views/general/blog.rhtml) | 14 | ||||
-rw-r--r-- | app/views/general/custom_css.html.erb (renamed from app/views/general/custom_css.rhtml) | 0 | ||||
-rw-r--r-- | app/views/general/exception_caught.html.erb (renamed from app/views/general/exception_caught.rhtml) | 2 | ||||
-rw-r--r-- | app/views/general/frontpage.html.erb (renamed from app/views/general/frontpage.rhtml) | 2 | ||||
-rw-r--r-- | app/views/general/search.html.erb (renamed from app/views/general/search.rhtml) | 18 | ||||
-rw-r--r-- | app/views/help/_sidebar.html.erb (renamed from app/views/help/_sidebar.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/_why_they_should_reply_by_email.html.erb (renamed from app/views/help/_why_they_should_reply_by_email.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/about.html.erb (renamed from app/views/help/about.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/alaveteli.html.erb (renamed from app/views/help/alaveteli.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/api.html.erb (renamed from app/views/help/api.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/contact.html.erb (renamed from app/views/help/contact.rhtml) | 4 | ||||
-rw-r--r-- | app/views/help/credits.html.erb (renamed from app/views/help/credits.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/officers.html.erb (renamed from app/views/help/officers.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/privacy.html.erb (renamed from app/views/help/privacy.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/requesting.html.erb (renamed from app/views/help/requesting.rhtml) | 0 | ||||
-rw-r--r-- | app/views/help/unhappy.html.erb (renamed from app/views/help/unhappy.rhtml) | 0 | ||||
-rw-r--r-- | app/views/holiday/due_date.html.erb (renamed from app/views/holiday/due_date.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/admin.html.erb (renamed from app/views/layouts/admin.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/contact_mailer.html.erb (renamed from app/views/layouts/contact_mailer.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/default.html.erb (renamed from app/views/layouts/default.rhtml) | 10 | ||||
-rw-r--r-- | app/views/layouts/no_chrome.html.erb (renamed from app/views/layouts/no_chrome.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/outgoing_mailer.html.erb (renamed from app/views/layouts/outgoing_mailer.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/request_mailer.html.erb (renamed from app/views/layouts/request_mailer.rhtml) | 0 | ||||
-rw-r--r-- | app/views/layouts/user_mailer.html.erb (renamed from app/views/layouts/user_mailer.rhtml) | 0 | ||||
-rw-r--r-- | app/views/outgoing_mailer/_followup_footer.text.erb (renamed from app/views/outgoing_mailer/_followup_footer.rhtml) | 0 | ||||
-rw-r--r-- | app/views/outgoing_mailer/followup.text.erb (renamed from app/views/outgoing_mailer/followup.rhtml) | 0 | ||||
-rw-r--r-- | app/views/outgoing_mailer/initial_request.text.erb (renamed from app/views/outgoing_mailer/initial_request.rhtml) | 0 | ||||
-rw-r--r-- | app/views/public_body/_alphabet.html.erb (renamed from app/views/public_body/_alphabet.rhtml) | 2 | ||||
-rw-r--r-- | app/views/public_body/_body_listing.html.erb (renamed from app/views/public_body/_body_listing.rhtml) | 0 | ||||
-rw-r--r-- | app/views/public_body/_body_listing_single.html.erb (renamed from app/views/public_body/_body_listing_single.rhtml) | 3 | ||||
-rw-r--r-- | app/views/public_body/_list_sidebar_extra.html.erb | 6 | ||||
-rw-r--r-- | app/views/public_body/_list_sidebar_extra.rhtml | 6 | ||||
-rw-r--r-- | app/views/public_body/_search_ahead.html.erb (renamed from app/views/public_body/_search_ahead.rhtml) | 7 | ||||
-rw-r--r-- | app/views/public_body/list.html.erb (renamed from app/views/public_body/list.rhtml) | 18 | ||||
-rw-r--r-- | app/views/public_body/show.html.erb (renamed from app/views/public_body/show.rhtml) | 22 | ||||
-rw-r--r-- | app/views/public_body/view_email.html.erb (renamed from app/views/public_body/view_email.rhtml) | 6 | ||||
-rw-r--r-- | app/views/public_body/view_email_captcha.html.erb (renamed from app/views/public_body/view_email_captcha.rhtml) | 2 | ||||
-rw-r--r-- | app/views/reports/new.html.erb | 26 | ||||
-rw-r--r-- | app/views/request/_after_actions.html.erb (renamed from app/views/request/_after_actions.rhtml) | 2 | ||||
-rw-r--r-- | app/views/request/_bubble.html.erb (renamed from app/views/request/_bubble.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_correspondence.html.erb (renamed from app/views/request/_correspondence.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_describe_state.html.erb (renamed from app/views/request/_describe_state.rhtml) | 7 | ||||
-rw-r--r-- | app/views/request/_followup.html.erb (renamed from app/views/request/_followup.rhtml) | 17 | ||||
-rw-r--r-- | app/views/request/_hidden_correspondence.html.erb (renamed from app/views/request/_hidden_correspondence.rhtml) | 12 | ||||
-rw-r--r-- | app/views/request/_next_actions.html.erb (renamed from app/views/request/_next_actions.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_other_describe_state.html.erb (renamed from app/views/request/_other_describe_state.rhtml) | 3 | ||||
-rw-r--r-- | app/views/request/_request_filter_form.html.erb (renamed from app/views/request/_request_filter_form.rhtml) | 2 | ||||
-rw-r--r-- | app/views/request/_request_listing.html.erb (renamed from app/views/request/_request_listing.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_request_listing_short_via_event.html.erb (renamed from app/views/request/_request_listing_short_via_event.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_request_listing_single.html.erb (renamed from app/views/request/_request_listing_single.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_request_listing_via_event.html.erb (renamed from app/views/request/_request_listing_via_event.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_search_ahead.html.erb (renamed from app/views/request/_search_ahead.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_sidebar.html.erb (renamed from app/views/request/_sidebar.rhtml) | 35 | ||||
-rw-r--r-- | app/views/request/_sidebar_request_listing.html.erb (renamed from app/views/request/_sidebar_request_listing.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_summary_suggestion.html.erb (renamed from app/views/request/_summary_suggestion.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_view_html_prefix.html.erb (renamed from app/views/request/_view_html_prefix.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_view_html_stylesheet.html.erb (renamed from app/views/request/_view_html_stylesheet.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/_wall_listing.html.erb (renamed from app/views/request/_wall_listing.rhtml) | 2 | ||||
-rw-r--r-- | app/views/request/describe_state_message.html.erb | 30 | ||||
-rw-r--r-- | app/views/request/details.html.erb (renamed from app/views/request/details.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/followup_bad.html.erb (renamed from app/views/request/followup_bad.rhtml) | 12 | ||||
-rw-r--r-- | app/views/request/followup_preview.html.erb (renamed from app/views/request/followup_preview.rhtml) | 4 | ||||
-rw-r--r-- | app/views/request/hidden.html.erb | 19 | ||||
-rw-r--r-- | app/views/request/hidden.rhtml | 19 | ||||
-rw-r--r-- | app/views/request/list.html.erb (renamed from app/views/request/list.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/new.html.erb (renamed from app/views/request/new.rhtml) | 15 | ||||
-rw-r--r-- | app/views/request/new_bad_contact.html.erb (renamed from app/views/request/new_bad_contact.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/new_please_describe.html.erb (renamed from app/views/request/new_please_describe.rhtml) | 4 | ||||
-rw-r--r-- | app/views/request/preview.html.erb (renamed from app/views/request/preview.rhtml) | 18 | ||||
-rw-r--r-- | app/views/request/select_authority.html.erb (renamed from app/views/request/select_authority.rhtml) | 39 | ||||
-rw-r--r-- | app/views/request/show.html.erb (renamed from app/views/request/show.rhtml) | 10 | ||||
-rw-r--r-- | app/views/request/show_response.html.erb (renamed from app/views/request/show_response.rhtml) | 4 | ||||
-rw-r--r-- | app/views/request/similar.html.erb (renamed from app/views/request/similar.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request/simple_correspondence.html.erb (renamed from app/views/request/simple_correspondence.rhtml) | 2 | ||||
-rw-r--r-- | app/views/request/upload_response.html.erb (renamed from app/views/request/upload_response.rhtml) | 6 | ||||
-rw-r--r-- | app/views/request_game/play.html.erb (renamed from app/views/request_game/play.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/comment_on_alert.text.erb (renamed from app/views/request_mailer/comment_on_alert.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/comment_on_alert_plural.text.erb (renamed from app/views/request_mailer/comment_on_alert_plural.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/external_response.rhtml | 1 | ||||
-rw-r--r-- | app/views/request_mailer/external_response.text.erb | 1 | ||||
-rw-r--r-- | app/views/request_mailer/fake_response.rhtml | 1 | ||||
-rw-r--r-- | app/views/request_mailer/fake_response.text.erb | 1 | ||||
-rw-r--r-- | app/views/request_mailer/new_response.text.erb (renamed from app/views/request_mailer/new_response.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/new_response_reminder_alert.text.erb (renamed from app/views/request_mailer/new_response_reminder_alert.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/not_clarified_alert.text.erb (renamed from app/views/request_mailer/not_clarified_alert.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/old_unclassified_updated.text.erb (renamed from app/views/request_mailer/old_unclassified_updated.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/overdue_alert.text.erb (renamed from app/views/request_mailer/overdue_alert.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/requires_admin.text.erb (renamed from app/views/request_mailer/requires_admin.rhtml) | 2 | ||||
-rw-r--r-- | app/views/request_mailer/stopped_responses.text.erb (renamed from app/views/request_mailer/stopped_responses.rhtml) | 0 | ||||
-rw-r--r-- | app/views/request_mailer/very_overdue_alert.text.erb (renamed from app/views/request_mailer/very_overdue_alert.rhtml) | 0 | ||||
-rw-r--r-- | app/views/track/_tracking_links.html.erb (renamed from app/views/track/_tracking_links.rhtml) | 2 | ||||
-rw-r--r-- | app/views/track/atom_feed.atom.erb | 2 | ||||
-rw-r--r-- | app/views/track_mailer/event_digest.text.erb (renamed from app/views/track_mailer/event_digest.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/_change_receive_email.html.erb (renamed from app/views/user/_change_receive_email.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/_show_user_info.html.erb (renamed from app/views/user/_show_user_info.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/_signin.html.erb (renamed from app/views/user/_signin.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/_signup.html.erb (renamed from app/views/user/_signup.rhtml) | 14 | ||||
-rw-r--r-- | app/views/user/_user_listing_single.html.erb (renamed from app/views/user/_user_listing_single.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/bad_token.html.erb (renamed from app/views/user/bad_token.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/banned.html.erb (renamed from app/views/user/banned.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/confirm.html.erb (renamed from app/views/user/confirm.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/contact.html.erb (renamed from app/views/user/contact.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/no_cookies.html.erb (renamed from app/views/user/no_cookies.rhtml) | 4 | ||||
-rw-r--r-- | app/views/user/rate_limited.html.erb (renamed from app/views/user/rate_limited.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/river.html.erb (renamed from app/views/user/river.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/set_crop_profile_photo.html.erb (renamed from app/views/user/set_crop_profile_photo.rhtml) | 4 | ||||
-rw-r--r-- | app/views/user/set_draft_profile_photo.html.erb (renamed from app/views/user/set_draft_profile_photo.rhtml) | 4 | ||||
-rw-r--r-- | app/views/user/set_profile_about_me.html.erb (renamed from app/views/user/set_profile_about_me.rhtml) | 4 | ||||
-rw-r--r-- | app/views/user/show.html.erb (renamed from app/views/user/show.rhtml) | 20 | ||||
-rw-r--r-- | app/views/user/sign.html.erb (renamed from app/views/user/sign.rhtml) | 4 | ||||
-rw-r--r-- | app/views/user/signchangeemail.html.erb (renamed from app/views/user/signchangeemail.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/signchangeemail_confirm.html.erb (renamed from app/views/user/signchangeemail_confirm.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/signchangepassword.html.erb (renamed from app/views/user/signchangepassword.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/signchangepassword_confirm.html.erb (renamed from app/views/user/signchangepassword_confirm.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/signchangepassword_send_confirm.html.erb (renamed from app/views/user/signchangepassword_send_confirm.rhtml) | 2 | ||||
-rw-r--r-- | app/views/user/signin_successful.html.erb (renamed from app/views/user/signin_successful.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/wall.html.erb (renamed from app/views/user/wall.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/wrong_user.html.erb (renamed from app/views/user/wrong_user.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user/wrong_user_unknown_email.html.erb | 8 | ||||
-rw-r--r-- | app/views/user/wrong_user_unknown_email.rhtml | 8 | ||||
-rw-r--r-- | app/views/user_mailer/already_registered.text.erb (renamed from app/views/user_mailer/already_registered.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user_mailer/changeemail_already_used.text.erb (renamed from app/views/user_mailer/changeemail_already_used.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user_mailer/changeemail_confirm.text.erb (renamed from app/views/user_mailer/changeemail_confirm.rhtml) | 0 | ||||
-rw-r--r-- | app/views/user_mailer/confirm_login.text.erb (renamed from app/views/user_mailer/confirm_login.rhtml) | 0 |
196 files changed, 436 insertions, 432 deletions
diff --git a/app/views/admin_censor_rule/_form.rhtml b/app/views/admin_censor_rule/_form.html.erb index ac84935c5..5035238d6 100644 --- a/app/views/admin_censor_rule/_form.rhtml +++ b/app/views/admin_censor_rule/_form.html.erb @@ -3,13 +3,11 @@ <div class="well"> <%=_("Applies to")%> <% unless info_request.nil? %> - <%= request_link(info_request)%> - <%= request_admin_link(info_request, "(admin)", "btn btn-info")%> + <%= request_both_links(info_request) %> <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %> <% end %> <% unless user.nil? %> - <%= user_link(user) %> - <%= user_admin_link(user, "admin", "btn btn-info") %> + <%= user_both_links(user) %> <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %> <% end %> </div> diff --git a/app/views/admin_censor_rule/_show.rhtml b/app/views/admin_censor_rule/_show.html.erb index baa93e832..0d4cece93 100644 --- a/app/views/admin_censor_rule/_show.rhtml +++ b/app/views/admin_censor_rule/_show.html.erb @@ -16,7 +16,7 @@ <td><%=h censor_rule.send(column) %></td> <% end %> <td> - <%= link_to "Edit", '../../censor/edit/' + censor_rule.id.to_s %> + <%= link_to "Edit", admin_rule_edit_path(censor_rule) %> </td> </tr> <% end %> @@ -26,10 +26,10 @@ <% end %> <% if defined? info_request %> - <%= link_to "New censor rule (for this request only)", "../../censor/new?info_request_id=#{info_request.id}", :class => "btn btn-info" %> + <%= link_to "New censor rule (for this request only)", admin_rule_new_path(:info_request_id => info_request.id), :class => "btn btn-info" %> <% end %> <% if defined? user %> - <%= link_to "New censor rule", "../../censor/new?user_id=#{user.id}", :class => "btn btn-info" %> <span class="label label-info">for all requests by this user</span> + <%= link_to "New censor rule", admin_rule_new_path(:user_id => user.id), :class => "btn btn-info" %> <span class="label label-info">for all requests by this user</span> <% end %> diff --git a/app/views/admin_censor_rule/edit.html.erb b/app/views/admin_censor_rule/edit.html.erb new file mode 100644 index 000000000..230446ed3 --- /dev/null +++ b/app/views/admin_censor_rule/edit.html.erb @@ -0,0 +1,18 @@ +<% @title = 'Edit censor rule' %> + +<h1><%=@title%></h1> + +<%= form_tag admin_rule_update_path(@censor_rule), :class => "form form-horizontal" do %> + <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> + <div class="form-actions"> + <%= submit_tag 'Save', :accesskey => 's', :class => "btn btn-primary" %> + </div> +<% end %> + +<%= form_tag admin_rule_destroy_path(@censor_rule), :class => "form form-horizontal" do %> + <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> + <div class="form-actions"> + Permanent! --> <%= submit_tag "Destroy rule", :class => "btn btn-primary" %> + </div> +<% end %> + diff --git a/app/views/admin_censor_rule/edit.rhtml b/app/views/admin_censor_rule/edit.rhtml deleted file mode 100644 index e34e022a0..000000000 --- a/app/views/admin_censor_rule/edit.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% @title = 'Edit censor rule' %> - -<h1><%=@title%></h1> - -<% form_tag '../update/' + @censor_rule.id.to_s do %> - <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> - <p><%= submit_tag 'Save', :accesskey => 's' %></p> -<% end %> - -<% form_tag('../destroy/' + @censor_rule.id.to_s) do %> - <p> - <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> - Permanent! --> <%= submit_tag "Destroy rule" %> - </p> -<% end %> - diff --git a/app/views/admin_censor_rule/new.rhtml b/app/views/admin_censor_rule/new.html.erb index 6cac58b3b..77d22990c 100644 --- a/app/views/admin_censor_rule/new.rhtml +++ b/app/views/admin_censor_rule/new.html.erb @@ -2,8 +2,8 @@ <h1><%=@title%></h1> -<% form_tag 'create', :class => "form form-horizontal" do %> - <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @user } %> +<%= form_tag admin_rule_create_path, :class => "form form-horizontal" do %> + <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @censor_user } %> <div class="form-actions"> <%= submit_tag "Create", :class => "btn btn-primary" %> </div> diff --git a/app/views/admin_general/_admin_navbar.rhtml b/app/views/admin_general/_admin_navbar.html.erb index 5cc740f70..5cc740f70 100644 --- a/app/views/admin_general/_admin_navbar.rhtml +++ b/app/views/admin_general/_admin_navbar.html.erb diff --git a/app/views/admin_general/admin.coffee b/app/views/admin_general/admin.coffee index 8f9e879ae..3d39369a4 100644 --- a/app/views/admin_general/admin.coffee +++ b/app/views/admin_general/admin.coffee @@ -10,7 +10,7 @@ jQuery -> false) $('#request_hidden_user_explanation_reasons input').live('click', -> $('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show() - info_request_id = $('#hide_request_form').attr('info_request_id') + info_request_id = $('#hide_request_form').attr('data-info-request-id') reason = $(this).val() $('#request_hidden_user_explanation_field').attr("value", "[loading default text...]") $.ajax "/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id, diff --git a/app/views/admin_general/admin.js b/app/views/admin_general/admin.js index 61382dab3..9daa51459 100644 --- a/app/views/admin_general/admin.js +++ b/app/views/admin_general/admin.js @@ -14,7 +14,7 @@ return $('#request_hidden_user_explanation_reasons input').live('click', function() { var info_request_id, reason; $('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show(); - info_request_id = $('#hide_request_form').attr('info_request_id'); + info_request_id = $('#hide_request_form').attr('data-info-request-id'); reason = $(this).val(); $('#request_hidden_user_explanation_field').attr("value", "[loading default text...]"); return $.ajax("/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id, { diff --git a/app/views/admin_general/admin_js.erb b/app/views/admin_general/admin_js.erb index 61382dab3..c8788a452 100644 --- a/app/views/admin_general/admin_js.erb +++ b/app/views/admin_general/admin_js.erb @@ -1,4 +1,5 @@ (function() { + jQuery(function() { $('.locales a:first').tab('show'); $('.accordion-body').on('hidden', function() { @@ -14,7 +15,7 @@ return $('#request_hidden_user_explanation_reasons input').live('click', function() { var info_request_id, reason; $('#request_hidden_user_subject, #request_hidden_user_explanation, #request_hide_button').show(); - info_request_id = $('#hide_request_form').attr('info_request_id'); + info_request_id = $('#hide_request_form').attr('data-info-request-id'); reason = $(this).val(); $('#request_hidden_user_explanation_field').attr("value", "[loading default text...]"); return $.ajax("/hidden_user_explanation?reason=" + reason + "&info_request_id=" + info_request_id, { @@ -29,4 +30,5 @@ }); }); }); + }).call(this); diff --git a/app/views/admin_general/debug.rhtml b/app/views/admin_general/debug.html.erb index 7fd256025..bf984c2e1 100644 --- a/app/views/admin_general/debug.rhtml +++ b/app/views/admin_general/debug.html.erb @@ -21,16 +21,13 @@ RUBY_VERSION <%=h RUBY_VERSION %> <br> Rails::VERSION::STRING <%=h Rails::VERSION::STRING%> <br> -TMail::VERSION::STRING <%=h TMail::VERSION::STRING%> -<br> Xapian::version_string <%=h Xapian::version_string%> </p> <h2>Configuration</h2> -<p>environment: <%=h Rails::configuration.environment %> -<br>environment_path: <%=h Rails::configuration.environment_path %> -<br>framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %> +<p>Rails env: <%=h Rails.env %> +<br>Rails root: <%=h Rails.root %> </p> <h2>Environment variables</h2> diff --git a/app/views/admin_general/index.rhtml b/app/views/admin_general/index.html.erb index 74d0f92f8..b239a2b3f 100644 --- a/app/views/admin_general/index.rhtml +++ b/app/views/admin_general/index.html.erb @@ -28,7 +28,7 @@ <% if @holding_pen_messages.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#holding-pen" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@holding_pen_messages.size%></span><i class='icon-chevron-right'></i> Put misdelivered responses with the right request</a> + <a class="accordion-toggle" href="#holding-pen" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@holding_pen_messages.size%></span><%= chevron_right %> Put misdelivered responses with the right request</a> </div> <div id="holding-pen" class="accordion-body collapse"> <table class="table table-striped table-condensed"> @@ -37,9 +37,9 @@ <tr> <td> <% if message.get_body_for_quoting.strip.size == 0 %> - <%= link_to "(no body)", "request/show_raw_email/" + message.raw_email_id.to_s %> + <%= link_to "(no body)", admin_request_show_raw_email_path(message.raw_email_id) %> <% else %> - <%= link_to excerpt(message.get_body_for_quoting, "", 60), "request/show_raw_email/" + message.raw_email_id.to_s %> + <%= link_to excerpt(message.get_body_for_quoting, "", 60), admin_request_show_raw_email_path(message.raw_email_id) %> <% end %> </td> <td class="span2"> @@ -56,7 +56,7 @@ <% if @error_message_requests.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#error-messages" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@error_message_requests.size%></span> <i class='icon-chevron-right'></i>Fix these delivery and other errors</a> + <a class="accordion-toggle" href="#error-messages" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@error_message_requests.size%></span> <%= chevron_right %>Fix these delivery and other errors</a> </div> <div id="error-messages" class="accordion-body collapse"> <table class="table table-striped table-condensed"> @@ -64,11 +64,10 @@ <% for @request in @error_message_requests %> <tr> <td class="link"> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_request_show_path(@request))%> - <%= link_to(@request.title, request_path(@request)) %> + <%= request_both_links(@request) %> </td> <td class="span2"> - <%=simple_date(@request.get_last_event.created_at)%> + <%=simple_date(@request.info_request_events.last.created_at)%> </td> </tr> <% end %> @@ -81,7 +80,7 @@ <% if @attention_requests.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#attention-messages" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@attention_requests.size%></span><i class='icon-chevron-right'></i> Review requests marked by users as requiring your attention + <a class="accordion-toggle" href="#attention-messages" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@attention_requests.size%></span><%= chevron_right %> Review requests marked by users as requiring your attention </a> </div> <div id="attention-messages" class="accordion-body collapse"> @@ -90,11 +89,10 @@ <% for @request in @attention_requests %> <tr> <td class="link"> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_request_show_path(@request))%> - <%= link_to(@request.title, request_path(@request)) %> + <%= request_both_links(@request) %> </td> <td class="span2"> - <%=simple_date(@request.get_last_event.created_at)%> + <%=simple_date(@request.info_request_events.last.created_at)%> </td> </tr> <% end %> @@ -107,7 +105,7 @@ <% if @requires_admin_requests.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#requires-admin" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@requires_admin_requests.size%></span><i class='icon-chevron-right'></i> These require administrator attention</a> + <a class="accordion-toggle" href="#requires-admin" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@requires_admin_requests.size%></span><%= chevron_right %> These require administrator attention</a> </div> <div id="requires-admin" class="accordion-body collapse"> <table class="table table-striped table-condensed"> @@ -115,11 +113,10 @@ <% for @request in @requires_admin_requests %> <tr> <td class="link"> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_request_show_path(@request))%> - <%= link_to(@request.title, request_path(@request)) %> + <%= request_both_links(@request) %> </td> <td class="span2"> - <%=simple_date(@request.get_last_event.created_at)%> + <%=simple_date(@request.info_request_events.last.created_at)%> </td> </tr> <% end %> @@ -132,7 +129,7 @@ <% if @blank_contacts.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#blank-contacts" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@blank_contacts.size%></span><i class='icon-chevron-right'></i> Find missing FOI email for these public authorities (try phoning!)</a> + <a class="accordion-toggle" href="#blank-contacts" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@blank_contacts.size%></span><%= chevron_right %> Find missing FOI email for these public authorities (try phoning!)</a> </div> <div id="blank-contacts" class="accordion-body collapse"> <table class="table table-striped table-condensed"> @@ -140,8 +137,7 @@ <% for @blank_contact in @blank_contacts %> <tr> <td class="link"> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_body_show_path(@blank_contact))%> - <%= link_to h(@blank_contact.name), public_body_path(@blank_contact) %> + <%= public_body_both_links(@blank_contact) %> </td> <td class="span2"> <%=simple_date(@blank_contact.updated_at)%> @@ -157,7 +153,7 @@ <% if @old_unclassified.size > 0 %> <div class="accordion-group"> <div class="accordion-heading"> - <a class="accordion-toggle" href="#unclassified" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@old_unclassified.size%></span><i class='icon-chevron-right'></i> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response</a> + <a class="accordion-toggle" href="#unclassified" data-toggle="collapse" data-parent="things-to-do"><span class="label label-important"><%=@old_unclassified.size%></span><%= chevron_right %> Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response</a> </div> <div id="unclassified" class="accordion-body collapse"> <table class="table table-striped table-condensed"> @@ -165,8 +161,7 @@ <% for @request in @old_unclassified %> <tr> <td class="link"> - <%= link_to("<i class='icon-tags'></i>".html_safe, admin_request_show_path(@request)) %> - <%= link_to(@request.title, request_path(@request)) %> + <%= request_both_links(@request) %> </td> <td class="span2"> <%=simple_date(@request.get_last_response_event.created_at)%> diff --git a/app/views/admin_general/stats.rhtml b/app/views/admin_general/stats.html.erb index 27dc25ee0..27dc25ee0 100644 --- a/app/views/admin_general/stats.rhtml +++ b/app/views/admin_general/stats.html.erb diff --git a/app/views/admin_general/timeline.rhtml b/app/views/admin_general/timeline.html.erb index 0c5f24279..8fd8875b6 100644 --- a/app/views/admin_general/timeline.rhtml +++ b/app/views/admin_general/timeline.html.erb @@ -1,12 +1,12 @@ <% @title = "Timeline" %> <div class="btn-toolbar"> <div class="btn-group"> - <a class="btn" href="?hour=1">Hour</a> - <a class="btn" href="?day=1">Day</a> - <a class="btn" href="?">2 days</a> - <a class="btn" href="?week=1">Week</a> - <a class="btn" href="?month=1">Month</a> - <a class="btn" href="?all=1">All time</a> + <%= link_to "Hour", admin_timeline_path(:hour => 1), :class => "btn" %> + <%= link_to "Day", admin_timeline_path(:day => 1), :class => "btn" %> + <%= link_to "2 days", admin_timeline_path, :class => "btn" %> + <%= link_to "Week", admin_timeline_path(:week => 1), :class => "btn" %> + <%= link_to "Month", admin_timeline_path(:month => 1), :class => "btn" %> + <%= link_to "All time", admin_timeline_path(:all => 1), :class => "btn" %> </div> </div> <div class="row"> @@ -31,9 +31,7 @@ <%= simple_time(event_at) %> <% if event.is_a? InfoRequestEvent %> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_request_show_path(event.info_request), :title => "view full details")%> - <%= link_to(event.info_request.title, request_path(event.info_request), :title => "view request on public website")%> - + <%= request_both_links(event.info_request) %> <% if event.event_type == 'edit' %> was edited by administrator <strong><%=h event.params[:editor] %></strong>. <% for p in ['title', 'prominence', 'described_state', 'awaiting_description'] @@ -95,8 +93,7 @@ had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. <% end %> <% else %> - <%= link_to('<i class="icon-tags"></i>'.html_safe, admin_body_show_path(event.public_body), :title => "view full details")%> - <%= link_to(event.public_body.name, public_body_path(event.public_body), :title => "view authority on public website")%> + <%= public_body_both_links(event.public_body) %> was created/updated by administrator <strong><%=h event.last_edit_editor %></strong> <% end %> <% end %> diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.html.erb index 3f346842c..c577d1e18 100644 --- a/app/views/admin_public_body/_form.rhtml +++ b/app/views/admin_public_body/_form.html.erb @@ -18,11 +18,10 @@ prefix = "public_body[translated_versions][]" object = @public_body.new_record? ? PublicBody::Translation.new : - @public_body.translation(locale.to_s) || PublicBody::Translation.new + @public_body.find_translation_by_locale(locale.to_s) || PublicBody::Translation.new end - - fields_for prefix, object do |t| %> + <%= fields_for prefix, object do |t| %> <div class="tab-pane" id="div-locale-<%=locale.to_s%>"> <div class="control-group"> <%= t.hidden_field :locale, :value => locale.to_s %> diff --git a/app/views/admin_public_body/_locale_selector.rhtml b/app/views/admin_public_body/_locale_selector.rhtml deleted file mode 100644 index 5ef79f2df..000000000 --- a/app/views/admin_public_body/_locale_selector.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -<div id="locale_switcher"> -<%= _('Edit language version:') %> -<% for possible_locale in @locales %> - <% if possible_locale == @locale %> - <%= possible_locale %> - <% else %> - <a href="?show_locale=<%=possible_locale%>"><%= possible_locale %></a> - <% end %> -<% end %> -</div> diff --git a/app/views/admin_public_body/_one_list.rhtml b/app/views/admin_public_body/_one_list.html.erb index c867433a0..8f1d719ec 100644 --- a/app/views/admin_public_body/_one_list.rhtml +++ b/app/views/admin_public_body/_one_list.html.erb @@ -3,7 +3,7 @@ <div class="accordion-group"> <div class="accordion-heading accordion-toggle row"> <span class="item-title span6"> - <a href="#body_<%=public_body.id%>" data-toggle="collapse" data-parent="requests"><i class="icon-chevron-right"></i></a> + <a href="#body_<%=public_body.id%>" data-toggle="collapse" data-parent="requests"><%= chevron_right %></a> <%= link_to(public_body.name, admin_body_show_path(public_body), :title => "view full details")%> </span> <span class="item-metadata span6"> @@ -31,7 +31,7 @@ <% end %> </div> -<% form_tag(admin_body_mass_tag_add_url, :method => "post", :class => "form form-inline" ) do %> +<%= form_tag(admin_body_mass_tag_add_url, :method => "post", :class => "form form-inline" ) do %> <p> <%= text_field_tag 'new_tag', params[:new_tag], { :size => 15, :id => "mass_add_tag_new_tag_" + table_name } %> <%= hidden_field_tag(:query, params[:query], { :id => "mass_add_tag_query_" + table_name } ) %> diff --git a/app/views/admin_public_body/_tag_help.rhtml b/app/views/admin_public_body/_tag_help.html.erb index b64e65877..b64e65877 100644 --- a/app/views/admin_public_body/_tag_help.rhtml +++ b/app/views/admin_public_body/_tag_help.html.erb diff --git a/app/views/admin_public_body/_tags.rhtml b/app/views/admin_public_body/_tags.html.erb index 26526f304..26526f304 100644 --- a/app/views/admin_public_body/_tags.rhtml +++ b/app/views/admin_public_body/_tags.html.erb diff --git a/app/views/admin_public_body/edit.rhtml b/app/views/admin_public_body/edit.html.erb index 629f64257..a24122671 100644 --- a/app/views/admin_public_body/edit.rhtml +++ b/app/views/admin_public_body/edit.html.erb @@ -3,7 +3,7 @@ <div class="row"> <div class="span8"> <div id="public_body_form"> - <% form_for @public_body, :url => "../update/#{@public_body.id}", :html => { :class => "form form-horizontal" } do |f| %> + <% form_for @public_body, :url => admin_body_update_path(@public_body), :html => { :class => "form form-horizontal" } do |f| %> <%= render :partial => 'form', :locals => {:f => f} %> <div class="form-actions"> <%= f.submit 'Save', :accesskey => 's', :class => "btn btn-success" %></p> @@ -13,14 +13,14 @@ <div class="row"> <div class="span8"> <div class="well"> - <%= link_to 'Show', "../show/#{@public_body.id}", :class => "btn" %> - <%= link_to 'List all', '../list', :class => "btn" %> + <%= link_to 'Show', admin_body_show_path(@public_body), :class => "btn" %> + <%= link_to 'List all', admin_body_list_path, :class => "btn" %> </div> </div> </div> <% if @public_body.info_requests.empty? %> - <% form_tag("../destroy/#{@public_body.id}", :class => "form form-inline") do %> + <%= form_tag(admin_body_destroy_path(@public_body), :class => "form form-inline") do %> <%= hidden_field_tag(:public_body_id, { :value => @public_body.id } ) %> <%= submit_tag _("Destroy {{name}}", :name => @public_body.name), :class => "btn btn-danger" %> (this is permanent!) <% end %> diff --git a/app/views/admin_public_body/import_csv.rhtml b/app/views/admin_public_body/import_csv.html.erb index bfe1b0c3b..afda5a468 100644 --- a/app/views/admin_public_body/import_csv.rhtml +++ b/app/views/admin_public_body/import_csv.html.erb @@ -9,7 +9,7 @@ <pre id="error"><%=@errors %></pre> <% end %> -<% form_tag 'import_csv', :multipart => true do %> +<%= form_tag 'import_csv', :multipart => true do %> <p> <% if @original_csv_file && @temporary_csv_file %> CSV file: diff --git a/app/views/admin_public_body/list.rhtml b/app/views/admin_public_body/list.html.erb index b4328bcad..3d7d9c4cd 100644 --- a/app/views/admin_public_body/list.rhtml +++ b/app/views/admin_public_body/list.html.erb @@ -8,18 +8,18 @@ <div class="btn-toolbar"> <div class="btn-group"> - <%= link_to 'New public authority', 'new', :class => "btn btn-primary" %> + <%= link_to 'New public authority', admin_body_new_path, :class => "btn btn-primary" %> </div> <div class="btn-group"> - <%= link_to 'Import from CSV file', 'import_csv', :class => "btn btn-warning" %> + <%= link_to 'Import from CSV file', admin_body_import_csv_path, :class => "btn btn-warning" %> </div> </div> -<% form_tag({}, :method => "get", :class => "form form-search") do %> +<%= form_tag({}, :method => "get", :class => "form form-search") do %> <%= text_field_tag 'query', params[:query], { :size => 30, :class => "input-large search-query" } %> <%= submit_tag "Search", :class => "btn" %> <% if !@query.nil? %> - <%= link_to 'Show all', 'list', :class => "btn" %> + <%= link_to 'Show all', admin_body_list_path, :class => "btn" %> <% end %><br> (substring search in names and emails; exact match of tags) <% end %> @@ -35,7 +35,6 @@ <h2>All authorities</h2> <% else %> <h2>Substring search matches (<%= @public_bodies.total_entries %> total)</h2> - <% end %> <%= render :partial => 'one_list', :locals => { :bodies => @public_bodies, :table_name => 'substring' } %> <% end %> diff --git a/app/views/admin_public_body/missing_scheme.rhtml b/app/views/admin_public_body/missing_scheme.html.erb index 2ea55ae00..2ea55ae00 100644 --- a/app/views/admin_public_body/missing_scheme.rhtml +++ b/app/views/admin_public_body/missing_scheme.html.erb diff --git a/app/views/admin_public_body/new.rhtml b/app/views/admin_public_body/new.html.erb index e03ebab00..13e8238d6 100644 --- a/app/views/admin_public_body/new.rhtml +++ b/app/views/admin_public_body/new.html.erb @@ -4,7 +4,7 @@ <div class="row"> <div class="span8"> <div id="public_body_form"> - <% form_for :public_body, @public_body, :url => "create", :html => {:class => "form form-horizontal"} do |f| %> + <%= form_for @public_body, :as => :public_body, :url => admin_body_create_path, :html => {:class => "form form-horizontal"} do |f| %> <%= render :partial => 'form', :locals => {:f => f} %> <div class="form-actions"> <%= f.submit "Create", :class => "btn btn-primary" %> diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.html.erb index c59b90697..cfb10b24e 100644 --- a/app/views/admin_public_body/show.rhtml +++ b/app/views/admin_public_body/show.html.erb @@ -45,7 +45,7 @@ </tr> </tbody> </table> -<%= link_to _("Edit"), "../edit/#{@public_body.id}", :class => "btn btn-primary" %> +<%= link_to _("Edit"), admin_body_edit_path(@public_body), :class => "btn btn-primary" %> <% unless @public_body.url_name.nil? %> <%=link_to _("Public page"), public_body_path(@public_body), :class => "btn" %> <% else %> diff --git a/app/views/admin_request/_incoming_message_actions.rhtml b/app/views/admin_request/_incoming_message_actions.html.erb index 0ebeb5f9b..653e73337 100644 --- a/app/views/admin_request/_incoming_message_actions.rhtml +++ b/app/views/admin_request/_incoming_message_actions.html.erb @@ -1,6 +1,6 @@ <fieldset class="form-horizontal"> <legend>Actions</legend> - <% form_tag '../redeliver_incoming', :class => "form form-inline" do %> + <%= form_tag admin_request_redeliver_incoming_path, :class => "form form-inline" do %> <div class="control-group"> <label class="control-label" for="url_title_<%= incoming_message.id %>">Redeliver message to one or more other requests</label> <div class="controls"> @@ -18,11 +18,11 @@ <div class="control-group"> <label class="control-label">Generate FOI officer upload URL</label> <div class="controls"> - <%= link_to 'Generate and take me there', "../generate_upload_url/#{incoming_message.info_request.id}?incoming_message_id=#{incoming_message.id}", :class => "btn" %> + <%= link_to 'Generate and take me there', admin_request_generate_upload_url_path(incoming_message.info_request, :incoming_message_id => incoming_message.id), :class => "btn" %> </div> </div> - <% form_tag '../destroy_incoming', :class => "form form-inline" do %> + <%= form_tag admin_request_destroy_incoming_path, :class => "form form-inline" do %> <div class="control-group"> <label class="control-label" for="destroy_message_<%= incoming_message.id %>">Destroy message</label> <div class="controls"> @@ -37,7 +37,7 @@ <div class="control-group"> <label class="control-label">Inspect email</label> <div class="controls"> - <%= link_to "View raw email", "../show_raw_email/#{incoming_message.raw_email_id}", :class => "btn" %> + <%= link_to "View raw email", admin_request_show_raw_email_path(incoming_message.raw_email_id), :class => "btn" %> </div> </div> <% end %> diff --git a/app/views/admin_request/_some_requests.rhtml b/app/views/admin_request/_some_requests.html.erb index 03a77dd0b..cff94956d 100644 --- a/app/views/admin_request/_some_requests.rhtml +++ b/app/views/admin_request/_some_requests.html.erb @@ -3,11 +3,11 @@ <div class="accordion-group"> <div class="accordion-heading accordion-toggle row"> <span class="item-title span6"> - <a href="#request_<%=info_request.id%>" data-toggle="collapse" data-parent="requests"><i class="icon-chevron-right"></i></a> + <a href="#request_<%=info_request.id%>" data-toggle="collapse" data-parent="requests"><%= chevron_right %></a> <%= link_to(info_request.title, admin_request_show_path(info_request), :title => "view full details") %> </span> <span class="item-metadata span6"> - <%= user_admin_link_for_request(info_request) %> <i class="icon-arrow-right"></i> <%= link_to("#{info_request.public_body.name}", admin_body_show_path(info_request.public_body)) %>, <%= time_ago_in_words(info_request.updated_at) %> ago + <%= user_admin_link_for_request(info_request) %> <%= arrow_right %> <%= link_to("#{info_request.public_body.name}", admin_body_show_path(info_request.public_body)) %>, <%= time_ago_in_words(info_request.updated_at) %> ago </span> </div> <div id="request_<%=info_request.id%>" class="item-detail accordion-body collapse row"> diff --git a/app/views/admin_request/_tags.rhtml b/app/views/admin_request/_tags.html.erb index 22fbf13c8..22fbf13c8 100644 --- a/app/views/admin_request/_tags.rhtml +++ b/app/views/admin_request/_tags.html.erb diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.html.erb index 11c017aab..0e9c68aea 100644 --- a/app/views/admin_request/edit.rhtml +++ b/app/views/admin_request/edit.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'info_request' %> -<% form_tag '../update/' + @info_request.id.to_s do %> +<%= form_tag admin_request_update_path(@info_request) do %> <p><label for="info_request_title"><strong>Title</strong></label> (warning: editing this will break URLs right now)<br/> <%= text_field 'info_request', 'title', :size => 50 %></p> @@ -43,13 +43,13 @@ <% end %> <p> -<%= link_to 'Show', '../show/' + @info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> +<%= link_to 'Show', admin_request_show_path(@info_request) %> | +<%= link_to 'List all', admin_request_list_path %> </p> <hr> -<% form_tag '../destroy/' + @info_request.id.to_s do %> +<%= form_tag admin_request_destroy_path(@info_request) do %> <p> <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely' %> <br>Use it mainly if someone posts private information, e.g. made a Data Protection request. It diff --git a/app/views/admin_request/edit_comment.rhtml b/app/views/admin_request/edit_comment.html.erb index a79c096e3..2cf49a4a8 100644 --- a/app/views/admin_request/edit_comment.rhtml +++ b/app/views/admin_request/edit_comment.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'comment' %> -<% form_tag '../update_comment/' + @comment.id.to_s do %> +<%= form_tag admin_request_update_comment_path(@comment) do %> <p><label for="comment_body">Body of annotation</label><br/> <%= text_area 'comment', 'body', :rows => 10, :cols => 60 %></p> @@ -16,7 +16,7 @@ <% end %> <p> -<%= link_to 'Show', '../show/' + @comment.info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> +<%= link_to 'Show', admin_request_show_path(@comment.info_request) %> | +<%= link_to 'List all', admin_request_list_path %> </p> diff --git a/app/views/admin_request/edit_outgoing.rhtml b/app/views/admin_request/edit_outgoing.html.erb index 4932cb52f..a0c60520a 100644 --- a/app/views/admin_request/edit_outgoing.rhtml +++ b/app/views/admin_request/edit_outgoing.html.erb @@ -2,7 +2,7 @@ <%= error_messages_for 'outgoing_message' %> -<% form_tag '../update_outgoing/' + @outgoing_message.id.to_s do %> +<%= form_tag admin_request_update_outgoing_path(@outgoing_message) do %> <p><label for="outgoing_message_body">Body of message</label><br/> <%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60 %></p> @@ -18,11 +18,11 @@ <% end %> <p> -<%= link_to 'Show', '../show/' + @outgoing_message.info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> +<%= link_to 'Show', admin_request_show_path(@outgoing_message.info_request) %> | +<%= link_to 'List all', admin_request_list_path %> </p> -<% form_tag '../destroy_outgoing' do %> +<%= form_tag admin_request_destroy_outgoing_path do %> <div> <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %> Warning, this is permanent! ---> diff --git a/app/views/admin_request/hidden_user_explanation.html.erb b/app/views/admin_request/hidden_user_explanation.html.erb new file mode 100644 index 000000000..d0a5d727d --- /dev/null +++ b/app/views/admin_request/hidden_user_explanation.html.erb @@ -0,0 +1,10 @@ +<%= _("Dear {{name}},", :name => name_to) %> + +<%= _("Your request '{{request}}' at {{url}} has been reviewed by moderators.", :request => info_request.title.html_safe, :url => info_request_url) %> + +<%= reason == 'not_foi' ? _("We consider it is not a valid FOI request, and have therefore hidden it from other users.") : _("We consider it to be vexatious, and have therefore hidden it from other users.") %> <%= _("You will still be able to view it while logged in to the site. Please reply to this email if you would like to discuss this decision further.") %> + +<%= _("Yours,") %> + +<%= _("The {{site_name}} team.", :site_name => site_name) %> + diff --git a/app/views/admin_request/hidden_user_explanation.rhtml b/app/views/admin_request/hidden_user_explanation.rhtml deleted file mode 100644 index 7084e986f..000000000 --- a/app/views/admin_request/hidden_user_explanation.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -Dear <%= name_to %>, - -Your request '<%= info_request.title.html_safe %>' at <%= info_request_url %> has been reviewed by moderators. - -We consider it <% if reason == 'not_foi' %>is not a valid FOI request<% else %>to be vexatious<% end%>, and have therefore hidden it from other users. You will still be able to view it while logged in to the site. Please reply to this email if you would like to discuss this decision further. - -Yours, - -The <%= site_name %> team. - diff --git a/app/views/admin_request/list.rhtml b/app/views/admin_request/list.html.erb index 10b39d3a2..2bd3e3326 100644 --- a/app/views/admin_request/list.rhtml +++ b/app/views/admin_request/list.html.erb @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<% form_tag({}, :method => "get", :class => "form form-search") do %> +<%= form_tag({}, :method => "get", :class => "form form-search") do %> <%= text_field_tag 'query', params[:query], { :size => 30, :class => "input-large search-query" } %> <%= submit_tag "Search", :class => "btn" %> (substring search, titles only) <% end %> diff --git a/app/views/admin_request/list_old_unclassified.rhtml b/app/views/admin_request/list_old_unclassified.rhtml deleted file mode 100644 index 2bdfcf7f4..000000000 --- a/app/views/admin_request/list_old_unclassified.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -<% @title = "Unclassified responses" %> - -<h1><%=@title%></h1> - -<p>Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response:</p> -<ul> -<% for @request in @info_requests %> - <li> - <%= request_both_links(@request) %> - – <%=simple_date(@request.get_last_response_event.created_at)%> - </li> -<% end %> -</ul> - -<%= will_paginate(@info_requests, :class => "paginator") %> diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.html.erb index 72552a588..e18e319be 100644 --- a/app/views/admin_request/show.rhtml +++ b/app/views/admin_request/show.html.erb @@ -2,13 +2,13 @@ <h1><%=@title%></h1> -<% form_tag '../move_request', { :class => "form form-horizontal" } do %> +<%= form_tag admin_request_move_request_path, { :class => "form form-horizontal" } do %> <%= hidden_field_tag 'info_request_id', @info_request.id %> <div class="accordion" id="info_request"> <div class="accordion-group"> <div class="accordion-heading"> <span class="item-title"> - <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request"><i class="icon-chevron-down"></i></a>Request metadata + <a href="#metadata_<%=@info_request.id%>" data-toggle="collapse" data-parent="#info_request"><%= chevron_down %></a>Request metadata </span> </div> <div id="metadata_<%=@info_request.id%>" class="accordion-body collapse in"> @@ -16,7 +16,7 @@ <thead> <tr> <td colspan="2"> - <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %> + <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %> </td> </tr> </thead> @@ -47,18 +47,17 @@ <% end %> </td> </tr> - <% end %> + <% end %> <tr> <td> <b>Created by</b> </td> <td> <% if @info_request.is_external? %> - <%= link_to("<i class='icon-eye-open'></i>".html_safe, @info_request.external_url, :title => "view URL of original request on external website") %> + <%= link_to(eye, @info_request.external_url, :title => "view URL of original request on external website") %> <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API) <% else %> - <%= link_to("<i class='icon-eye-open'></i>".html_safe, user_path(@info_request.user), :title => "view user's page on public website") %> - <%= user_admin_link_for_request(@info_request) %> + <%= user_both_links(@info_request.user) %> <%= link_to _("move..."), "#", :class => "btn btn-mini btn-warning toggle-hidden" %> <div style="display:none;"> <strong>url_name of new user:</strong> @@ -73,8 +72,7 @@ <b>Public authority:</b> </td> <td> - <%= link_to("<i class='icon-eye-open'></i>".html_safe, public_body_path(@info_request.public_body), :title => "view authority on public website") %> - <%= link_to(@info_request.public_body.name, admin_body_show_path(@info_request.public_body)) %> + <%= public_body_both_links(@info_request.public_body) %> <%= link_to "move...", "#", :class => "btn btn-mini btn-warning toggle-hidden" %> <div style="display:none;"> <strong>url_name of new authority:</strong> @@ -103,7 +101,7 @@ <tfoot> <tr> <td colspan="2"> - <%= link_to 'Edit metadata', '../edit/' + @info_request.id.to_s, :class => "btn" %> + <%= link_to 'Edit metadata', admin_request_edit_path(@info_request), :class => "btn" %> </td> </tr> </tfoot> @@ -119,11 +117,11 @@ FOI officer upload URL </label> <div class="controls"> - <%= link_to 'Generate URL', '../generate_upload_url/' + @info_request.id.to_s, :class => "btn" %> + <%= link_to 'Generate URL', admin_request_generate_upload_url_path(@info_request), :class => "btn" %> <p class="help-block">(see also option to general URLs for individual incoming messages below)</p> </div> </div> - <% form_tag '../hide/' + @info_request.id.to_s, :class => "form form-inline", :id => "hide_request_form" do %> + <%= form_tag admin_request_hide_path(@info_request), :class => "form form-inline", :id => "hide_request_form", 'data-info-request-id' => @info_request.id.to_s do %> <div class="control-group"> <% if @info_request.is_external? %> <label class="control-label">Hide the request:</label> @@ -151,7 +149,7 @@ <div class="control-group" id="request_hidden_user_subject"> <label for="request_hidden_user_subject_field" class="control-label">Subject of email:</label> <div class="controls"> - <%= text_field_tag "subject", "Your request on WhatDoTheyKnow.com hidden", {:id => "request_hidden_user_subject_field", :cols => 100} %> + <%= text_field_tag "subject", _("Your request on {{site_name}} hidden", :site_name => site_name), {:id => "request_hidden_user_subject_field", :cols => 100} %> </div> </div> @@ -177,7 +175,7 @@ <div class="accordion-group"> <div class="accordion-heading"> <span class="item-title"> - <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events"><i class="icon-chevron-right"></i></a> + <a href="#event_<%=info_request_event.id%>" data-toggle="collapse" data-parent="#events"><%= chevron_right %></a> <%= _("Event {{id}}", :id => info_request_event.id) %>: <strong> <%=h info_request_event.event_type.humanize %><% if !info_request_event.calculated_state.nil? %>; state: <%= info_request_event.calculated_state %><% end %> @@ -193,7 +191,7 @@ <tr> <td> <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %> - <% form_tag '../mark_event_as_clarification', :class => "form form-inline admin-table-form admin-inline-form" do %> + <%= form_tag admin_request_clarification_path, :class => "form form-inline admin-table-form admin-inline-form" do %> <%= hidden_field_tag 'info_request_event_id', info_request_event.id, :id => nil %> <%= submit_tag "Was clarification request", :class => "btn btn-mini btn-primary" %> <% end %> @@ -209,7 +207,7 @@ </td> <td> <% if column_name == 'params_yaml' %> - <%= info_request_event.params_yaml_as_html %> + <%= info_request_event.params_yaml_as_html.html_safe %> <% elsif value.nil? %> nil <% elsif %w(text string).include?(type) %> @@ -234,10 +232,10 @@ <% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %> <div class="accordion-group"> <div class="accordion-heading"> - <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages"><i class="icon-chevron-right"></i></a> - <a href="../edit_outgoing/<%= outgoing_message.id %>"> + <a href="#outgoing_<%=outgoing_message.id%>" data-toggle="collapse" data-parent="#outgoing_messages"><%= chevron_right %></a> + <%= link_to admin_request_edit_outgoing_path(outgoing_message) do %> #<%= outgoing_message.id %> -- <%= outgoing_message.status.humanize %> <%= outgoing_message.message_type.humanize %> - </a> + <% end %> <blockquote> <%= truncate(outgoing_message.body, :length => 400) %> </blockquote> @@ -247,7 +245,7 @@ <tbody> <tr> <td colspan="2"> - <% form_tag '../resend', :class => "admin-table-form" do %> + <%= form_tag admin_request_resend_path, :class => "admin-table-form" do %> <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %> <%= submit_tag "Resend", :class => "btn" %> <% end %> @@ -260,7 +258,7 @@ </td> <td> <% if column_name == 'body' %> - <%= simple_format(truncate(outgoing_message.body, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" ))) %> + <%= simple_format(truncate(h(outgoing_message.body), :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden" )).html_safe) %> <div style="display:none;"><%= simple_format( outgoing_message.body ) %></div> <% else %> <%= admin_value(value) %> @@ -280,7 +278,7 @@ <% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %> <div class="accordion-group"> <div class="accordion-heading"> - <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages"><i class="icon-chevron-right"></i></a> + <a href="#incoming_<%=incoming_message.id%>" data-toggle="collapse" data-parent="#incoming_messages"><%= chevron_right %></a> <%=incoming_message.id%> -- <%= h(incoming_message.mail_from) %> <%=_("at")%> <%=admin_value(incoming_message.sent_at)%> <blockquote class="incoming-message"> <% if !incoming_message.cached_main_body_text_folded.nil? %> @@ -305,10 +303,10 @@ </td> <td> <% if column_name =~ /^cached_.*?$/ %> - <%= simple_format( truncate(value, :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden"))) %> + <%= simple_format( truncate(h(value), :length => 400, :omission => link_to("...", "#", :class => "toggle-hidden")).html_safe) %> <div style="display:none;"><%= simple_format(value) %></div> <% else %> - <%= simple_format(value) %> + <%= simple_format(value.to_s) %> <% end %> </td> </tr> @@ -327,13 +325,13 @@ <% for comment in @info_request.comments %> <div class="accordion-group"> <div class="accordion-heading"> - <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><i class="icon-chevron-right"></i></a> - <a href="../edit_comment/<%= comment.id %>"> + <a href="#comment_<%=comment.id%>" data-toggle="collapse" data-parent="#comments"><%= chevron_right %></a> + <%= link_to admin_request_edit_comment_path(comment) do %> #<%=comment.id%> -- <%=h(comment.user.name)%> <%=admin_value(comment.created_at)%> - </a> + <% end %> <blockquote class="incoming-message"> <%= truncate(comment.body, :length => 400) %> </blockquote> @@ -343,9 +341,7 @@ <tbody> <tr> <td colspan="2"> - By <%= link_to("<i class='icon-eye-open'></i>".html_safe, user_path(comment.user), :title => "view user's page on public website") %> - - <%= link_to(h(comment.user.name), admin_user_show_path(comment.user)) %> + By <%= user_both_links(comment.user) %> </td> </tr> <% comment.for_admin_column do |name, value, type, column_name |%> diff --git a/app/views/admin_request/show_raw_email.rhtml b/app/views/admin_request/show_raw_email.html.erb index 72c782ad6..72c782ad6 100644 --- a/app/views/admin_request/show_raw_email.rhtml +++ b/app/views/admin_request/show_raw_email.html.erb diff --git a/app/views/admin_track/_some_tracks.rhtml b/app/views/admin_track/_some_tracks.html.erb index 8ae7bd5c1..e9facfb5d 100644 --- a/app/views/admin_track/_some_tracks.rhtml +++ b/app/views/admin_track/_some_tracks.html.erb @@ -10,7 +10,7 @@ <% for track_thing in track_things %> <div class="accordion-group"> <div class="accordion-heading"> - <a href="#track_<%=track_thing.id%>" data-toggle="collapse" data-parent="requests"><i class="icon-chevron-right"></i></a> + <a href="#track_<%=track_thing.id%>" data-toggle="collapse" data-parent="requests"><%= chevron_right %></a> <%=track_thing.id%>: <% if track_thing.public_body_id %> <%= link_to "<code>#{h track_thing.track_query}</code>".html_safe, public_body_path(track_thing.public_body) %> @@ -23,7 +23,7 @@ <% end %> <% if @admin_user.nil? %> <%# Do not show this on the list of tracks on the user page, because it’s rather repetitive there %> - tracked by <%=link_to '<i class="icon-eye-open"></i>'.html_safe, admin_user_show_path(track_thing.tracking_user) %> <%=link_to h(track_thing.tracking_user.name), user_path(track_thing.tracking_user) %> + tracked by <%= user_both_links track_thing.tracking_user %> <% end %> </div> <div id="track_<%=track_thing.id%>" class="accordion-body collapse"> @@ -32,7 +32,7 @@ <% if include_destroy %> <tr> <td colspan="2"> - <% form_tag '../../user/destroy_track', :class => "form form-inline admin-table-form" do %> + <%= form_tag admin_user_destroy_track_path, :class => "form form-inline admin-table-form" do %> <div> <%= hidden_field_tag 'track_id', track_thing.id %> <%= submit_tag "Destroy track", :class => "btn btn-warning" %> @@ -70,3 +70,5 @@ <% end %> </div> <% end %> +</table> + diff --git a/app/views/admin_track/list.rhtml b/app/views/admin_track/list.html.erb index 9cff5635b..5e967a926 100644 --- a/app/views/admin_track/list.rhtml +++ b/app/views/admin_track/list.html.erb @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<% form_tag({}, :method => "get", :class => "form form-search") do %> +<%= form_tag({}, :method => "get", :class => "form form-search") do %> <%= text_field_tag 'query', params[:query], { :size => 30, :class => "input-large search-query" } %> <%= submit_tag "Search", :class => "btn" %> (substring search the query – so use url_names_for_a_particular_request_or_authority_or_person) <% end %> diff --git a/app/views/admin_user/_form.rhtml b/app/views/admin_user/_form.html.erb index 756806d2a..e7175d09c 100644 --- a/app/views/admin_user/_form.rhtml +++ b/app/views/admin_user/_form.html.erb @@ -41,7 +41,7 @@ user from filing new requests, making annotations or messaging other users; the text is shown in public on the user's page and when they try to do a forbidden action; write in the second person (you); see - <%= link_to 'banned users', '../banned' %> for examples</small> + <%= link_to 'banned users', admin_user_list_banned_path %> for examples</small> </div> </div> </div> diff --git a/app/views/admin_user/_user_table.rhtml b/app/views/admin_user/_user_table.html.erb index a4227e017..57066bf3f 100644 --- a/app/views/admin_user/_user_table.rhtml +++ b/app/views/admin_user/_user_table.html.erb @@ -3,7 +3,7 @@ <div class="accordion-group"> <div class="accordion-heading accordion-toggle"> <span class="item-title"> - <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="requests"><i class="icon-chevron-right"></i></a> + <a href="#user_<%=user.id%>" data-toggle="collapse" data-parent="requests"><%= chevron_right %></a> <% if user.admin_level == "super" %> <span class="label">superuser</span> <% end %> diff --git a/app/views/admin_user/edit.html.erb b/app/views/admin_user/edit.html.erb new file mode 100644 index 000000000..e641a13d6 --- /dev/null +++ b/app/views/admin_user/edit.html.erb @@ -0,0 +1,11 @@ +<h1><%=@title%></h1> + +<%= form_tag admin_user_update_path(@admin_user), :class => "form form-horizontal" do %> + <%= render :partial => 'form' %> + <div class="form-actions"> + <%= submit_tag 'Save', :accesskey => 's', :class => "btn btn-primary" %> + </div> +<% end %> + +<%= link_to 'Show', admin_user_show_path(@admin_user), :class => "btn" %> +<%= link_to 'List all', admin_user_list_path, :class => "btn" %> diff --git a/app/views/admin_user/edit.rhtml b/app/views/admin_user/edit.rhtml deleted file mode 100644 index c3ee3012b..000000000 --- a/app/views/admin_user/edit.rhtml +++ /dev/null @@ -1,21 +0,0 @@ -<h1><%=@title%></h1> - -<% form_tag "../update/#{@admin_user.id}", :class => "form form-horizontal" do %> - <%= render :partial => 'form' %> - <div class="form-actions"> - <%= submit_tag 'Save', :accesskey => 's', :class => "btn btn-primary" %> - </div> -<% end %> - -<%= link_to 'Show', "../show/#{@admin_user.id}", :class => "btn" %> -<%= link_to 'List all', '../list', :class => "btn" %> - -<% if false #@admin_user.info_requests.size == 0 %> - <% form_tag('../destroy/' + @admin_user.id.to_s) do %> - <p> - <%= hidden_field_tag(:admin_user_id, { :value => @admin_user.id } ) %> - <%= submit_tag "Destroy " + @admin_user.name %> (this is permanent!) - </p> - <% end %> -<% end %> - diff --git a/app/views/admin_user/list.rhtml b/app/views/admin_user/list.html.erb index afe166f1f..b1238f87a 100644 --- a/app/views/admin_user/list.rhtml +++ b/app/views/admin_user/list.html.erb @@ -2,10 +2,10 @@ <h1><%=@title%></h1> -<% form_tag({}, :method => "get", :class => "form form-search") do %> +<%= form_tag({}, :method => "get", :class => "form form-search") do %> <%= text_field_tag 'query', params[:query], { :size => 30, :class => "input-large search-query"} %> <%= submit_tag "Search", :class => "btn" %> (substring search, names and emails) - <%= link_to 'Banned users', 'banned', :class => "btn btn-info" %> + <%= link_to 'Banned users', admin_user_list_banned_path, :class => "btn btn-info" %> <% end %> <%= render :partial => 'user_table', :locals => { :users => @admin_users, :banned_column => false } %> diff --git a/app/views/admin_user/list_banned.rhtml b/app/views/admin_user/list_banned.html.erb index be2d45399..e535415e6 100644 --- a/app/views/admin_user/list_banned.rhtml +++ b/app/views/admin_user/list_banned.html.erb @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<p><%= link_to 'List all', 'list' %></p> +<p><%= link_to 'List all', admin_user_list_path %></p> <%= render :partial => 'user_table', :locals => { :users => @banned_users, :banned_column => true } %> diff --git a/app/views/admin_user/show.rhtml b/app/views/admin_user/show.html.erb index ccf2694b9..c93c08e50 100644 --- a/app/views/admin_user/show.rhtml +++ b/app/views/admin_user/show.html.erb @@ -4,7 +4,7 @@ <% if @admin_user.profile_photo %> <div class="user_photo_on_admin"> - <% form_tag "../clear_profile_photo/#{@admin_user.id}", :multipart => true, :class => "form" do %> + <%= form_tag admin_clear_profile_photo_path(@admin_user), :multipart => true, :class => "form" do %> <img src="<%= get_profile_photo_url(:url_name => @admin_user.url_name) %>"> <br> <%= submit_tag "Clear photo", :class => "btn btn-info" %> @@ -32,13 +32,13 @@ <%=link_to @admin_user.email, "mailto:#{h @admin_user.email}"%> <% elsif column_name == 'email_bounce_message' %> <% unless @admin_user.email_bounce_message.empty? %> - <%= link_to _("See bounce message"), admin_user_show_bounce(@admin_user.id) %> + <%= link_to _("See bounce message"), admin_user_show_bounce_path(@admin_user.id) %> <% end %> <% else %> <%=h admin_value(value)%> <% end %> <% if column_name == 'email_bounced_at' && !@admin_user.email_bounced_at.nil? %> - <% form_tag "../clear_bounce/#{@admin_user.id}", :class => "form form-inline" do %> + <%= form_tag admin_user_clear_bounce_path(@admin_user), :class => "form form-inline" do %> <input type="submit" name="action" value="Clear bounce" class="btn btn-info"> <% end %> <% end %> @@ -49,9 +49,9 @@ </table> -<%= link_to 'Edit', '../edit/' + @admin_user.id.to_s, :class => "btn btn-primary" %> +<%= link_to 'Edit', admin_user_edit_path(@admin_user), :class => "btn btn-primary" %> <%= link_to 'Public page', user_path(@admin_user), :class => "btn" %> -<%= link_to "Log in as #{@admin_user.name} (also confirms their email)", "../login_as/#{@admin_user.id}", :class => "btn btn-info" %> +<%= link_to "Log in as #{@admin_user.name} (also confirms their email)", admin_user_login_as_path(@admin_user), :class => "btn btn-info" %> <hr> diff --git a/app/views/admin_user/show_bounce_message.rhtml b/app/views/admin_user/show_bounce_message.html.erb index ad643a13e..ad643a13e 100644 --- a/app/views/admin_user/show_bounce_message.rhtml +++ b/app/views/admin_user/show_bounce_message.html.erb diff --git a/app/views/comment/_comment_form.rhtml b/app/views/comment/_comment_form.html.erb index 120929643..b78532768 100644 --- a/app/views/comment/_comment_form.rhtml +++ b/app/views/comment/_comment_form.html.erb @@ -1,4 +1,4 @@ -<% form_for(:comment, @comment, :url => { :controller => "comment", :action => "new", :type => "request" }, :html => { :id => 'comment_form' } ) do |f| %> +<%= form_for(@comment, :as => :comment, :url => { :controller => "comment", :action => "new", :type => "request" }, :html => { :id => 'comment_form' } ) do |f| %> <p> <%= f.text_area :body, :rows => 10, :cols => 55 %> </p> @@ -13,7 +13,7 @@ <%= hidden_field_tag 'submitted_comment', 1 %> <%= hidden_field_tag 'preview', 1 %> <%= submit_tag _('Preview your annotation') %> - <%= raw(_(' (<strong>no ranty</strong> politics, read our <a href="%s">moderation policy</a>)') % [help_requesting_path+'#moderation']) %> + <%= _(' (<strong>no ranty</strong> politics, read our <a href="{{url}}">moderation policy</a>)', :url => (help_requesting_path+'#moderation').html_safe) %> </p> <% end %> diff --git a/app/views/comment/_single_comment.rhtml b/app/views/comment/_single_comment.html.erb index 421a9d4ba..421a9d4ba 100644 --- a/app/views/comment/_single_comment.rhtml +++ b/app/views/comment/_single_comment.html.erb diff --git a/app/views/comment/new.rhtml b/app/views/comment/new.html.erb index 578732cdb..578732cdb 100644 --- a/app/views/comment/new.rhtml +++ b/app/views/comment/new.html.erb diff --git a/app/views/comment/preview.rhtml b/app/views/comment/preview.html.erb index 702bd9a9b..cd966e6a5 100644 --- a/app/views/comment/preview.rhtml +++ b/app/views/comment/preview.html.erb @@ -1,6 +1,6 @@ <% @title = _("Preview new annotation on '{{info_request_title}}'",:info_request_title=>h(@info_request.title)) %> -<% form_for(:comment, @comment, :html => { :id => 'preview_form' }, :url => { :controller => "comment", :action => "new", :type => "request" } ) do |f| %> +<%= form_for(@comment, :html => { :id => 'preview_form' }, :url => { :controller => "comment", :action => "new", :type => "request" } ) do |f| %> <h1><%= _('Now preview your annotation') %></h1> diff --git a/app/views/contact_mailer/from_admin_message.rhtml b/app/views/contact_mailer/from_admin_message.text.erb index 4169d8d3a..4169d8d3a 100644 --- a/app/views/contact_mailer/from_admin_message.rhtml +++ b/app/views/contact_mailer/from_admin_message.text.erb diff --git a/app/views/contact_mailer/to_admin_message.rhtml b/app/views/contact_mailer/to_admin_message.text.erb index dc9b1090b..dc9b1090b 100644 --- a/app/views/contact_mailer/to_admin_message.rhtml +++ b/app/views/contact_mailer/to_admin_message.text.erb diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.text.erb index afa1494db..afa1494db 100644 --- a/app/views/contact_mailer/user_message.rhtml +++ b/app/views/contact_mailer/user_message.text.erb diff --git a/app/views/general/_advanced_search_tips.rhtml b/app/views/general/_advanced_search_tips.html.erb index 08ce04439..08ce04439 100644 --- a/app/views/general/_advanced_search_tips.rhtml +++ b/app/views/general/_advanced_search_tips.html.erb diff --git a/app/views/general/_before_body_end.rhtml b/app/views/general/_before_body_end.html.erb index 25fdf4684..25fdf4684 100644 --- a/app/views/general/_before_body_end.rhtml +++ b/app/views/general/_before_body_end.html.erb diff --git a/app/views/general/_before_head_end.rhtml b/app/views/general/_before_head_end.html.erb index 8886745ab..8886745ab 100644 --- a/app/views/general/_before_head_end.rhtml +++ b/app/views/general/_before_head_end.html.erb diff --git a/app/views/general/_credits.rhtml b/app/views/general/_credits.html.erb index b1a9ce05e..b1a9ce05e 100644 --- a/app/views/general/_credits.rhtml +++ b/app/views/general/_credits.html.erb diff --git a/app/views/general/_custom_state_descriptions.rhtml b/app/views/general/_custom_state_descriptions.html.erb index 913a6d50a..913a6d50a 100644 --- a/app/views/general/_custom_state_descriptions.rhtml +++ b/app/views/general/_custom_state_descriptions.html.erb diff --git a/app/views/general/_custom_state_transitions_complete.rhtml b/app/views/general/_custom_state_transitions_complete.html.erb index e69de29bb..e69de29bb 100644 --- a/app/views/general/_custom_state_transitions_complete.rhtml +++ b/app/views/general/_custom_state_transitions_complete.html.erb diff --git a/app/views/general/_custom_state_transitions_pending.rhtml b/app/views/general/_custom_state_transitions_pending.html.erb index e69de29bb..e69de29bb 100644 --- a/app/views/general/_custom_state_transitions_pending.rhtml +++ b/app/views/general/_custom_state_transitions_pending.html.erb diff --git a/app/views/general/_footer.rhtml b/app/views/general/_footer.html.erb index 36f3919f0..990093694 100644 --- a/app/views/general/_footer.rhtml +++ b/app/views/general/_footer.html.erb @@ -1,6 +1,6 @@ <div id="footer"> <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_path %> -| <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %></a> +| <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>"><%= _("Follow us on twitter") %></a> <%= render :partial => 'general/credits' %> </div> <div class="after-footer"> </div> diff --git a/app/views/general/_frontpage_bodies_list.rhtml b/app/views/general/_frontpage_bodies_list.html.erb index 54400602b..75daea41d 100644 --- a/app/views/general/_frontpage_bodies_list.rhtml +++ b/app/views/general/_frontpage_bodies_list.html.erb @@ -6,7 +6,7 @@ <ul> <% for popular_body in @popular_bodies %> <li><%=public_body_link(popular_body)%> - <%= n_('%d request', '%d requests', popular_body.info_requests_count) % popular_body.info_requests_count %> + <%= n_('{{count}} request', '{{count}} requests', popular_body.info_requests_count, :count => popular_body.info_requests_count) %> </li> <% end%> </ul> diff --git a/app/views/general/_frontpage_intro_sentence.rhtml b/app/views/general/_frontpage_intro_sentence.html.erb index 74b849fc9..74b849fc9 100644 --- a/app/views/general/_frontpage_intro_sentence.rhtml +++ b/app/views/general/_frontpage_intro_sentence.html.erb diff --git a/app/views/general/_frontpage_new_request.rhtml b/app/views/general/_frontpage_new_request.html.erb index 499b60eb5..499b60eb5 100644 --- a/app/views/general/_frontpage_new_request.rhtml +++ b/app/views/general/_frontpage_new_request.html.erb diff --git a/app/views/general/_frontpage_requests_list.rhtml b/app/views/general/_frontpage_requests_list.html.erb index fa498dfa7..fa498dfa7 100644 --- a/app/views/general/_frontpage_requests_list.rhtml +++ b/app/views/general/_frontpage_requests_list.html.erb diff --git a/app/views/general/_frontpage_search_box.rhtml b/app/views/general/_frontpage_search_box.html.erb index 890602416..890602416 100644 --- a/app/views/general/_frontpage_search_box.rhtml +++ b/app/views/general/_frontpage_search_box.html.erb diff --git a/app/views/general/_locale_switcher.rhtml b/app/views/general/_locale_switcher.html.erb index d0040bb0d..d0040bb0d 100644 --- a/app/views/general/_locale_switcher.rhtml +++ b/app/views/general/_locale_switcher.html.erb diff --git a/app/views/general/_localised_datepicker.rhtml b/app/views/general/_localised_datepicker.html.erb index ec6593ea0..ec6593ea0 100644 --- a/app/views/general/_localised_datepicker.rhtml +++ b/app/views/general/_localised_datepicker.html.erb diff --git a/app/views/general/_orglink.rhtml b/app/views/general/_orglink.html.erb index 66002c021..66002c021 100644 --- a/app/views/general/_orglink.rhtml +++ b/app/views/general/_orglink.html.erb diff --git a/app/views/general/_popup_banner.rhtml b/app/views/general/_popup_banner.html.erb index 8b1378917..8b1378917 100644 --- a/app/views/general/_popup_banner.rhtml +++ b/app/views/general/_popup_banner.html.erb diff --git a/app/views/general/_stylesheet_includes.rhtml b/app/views/general/_stylesheet_includes.html.erb index 7a03680f8..5b6e12258 100644 --- a/app/views/general/_stylesheet_includes.rhtml +++ b/app/views/general/_stylesheet_includes.html.erb @@ -16,6 +16,6 @@ <![endif]--> <!-- the following method for customising CSS is deprecated; see `doc/THEMES.md` for detail --> <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> - <% if Configuration::force_registration_on_new_request %> + <% if AlaveteliConfiguration::force_registration_on_new_request %> <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> <% end %> diff --git a/app/views/general/_topnav.rhtml b/app/views/general/_topnav.html.erb index c7f2cedea..c7f2cedea 100644 --- a/app/views/general/_topnav.rhtml +++ b/app/views/general/_topnav.html.erb diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.html.erb index d42b32282..7146aab5d 100644 --- a/app/views/general/blog.rhtml +++ b/app/views/general/blog.html.erb @@ -7,9 +7,9 @@ <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= @twitter_user %>"><%= _("Follow us on twitter") %></a><br/><br/> <img src="/images/feed-16.png" alt="RSS icon"> <a href="<%= @feed_url %>"><%= _("Subscribe to blog") %></a> </div> - <% if Configuration::twitter_widget_id %> + <% if AlaveteliConfiguration::twitter_widget_id %> <div id="twitter"> - <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= Configuration::twitter_username %>" data-widget-id="<%= Configuration::twitter_widget_id %>">Tweets by @<%= Configuration::twitter_username %></a> + <a class="twitter-timeline" data-dnt=true href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>" data-widget-id="<%= AlaveteliConfiguration::twitter_widget_id %>">Tweets by @<%= AlaveteliConfiguration::twitter_username %></a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </div> <% end %> @@ -20,15 +20,15 @@ <h1><%=@title %></h1> <div id="blog"> - <% for item in @blog_items: %> + <% @blog_items.each do |item| %> <div class="blog_post"> - <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link']%>"><%=h item['title'] %></a></h2> - <p class="subtitle"><%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator']) %></p> + <h2 id="<%= Time.parse(item['pubDate'][0]).to_i %>"><a href="<%=item['link'][0]%>"><%=h item['title'][0] %></a></h2> + <p class="subtitle"><%= _("Posted on {{date}} by {{author}}", :date=>simple_date(Time.parse(item['pubDate'][0])), :author=>item['creator'][0]) %></p> <div> <% if item['encoded'] %> - <%= raw item['encoded'] %> + <%= raw item['encoded'][0] %> <% elsif item['description'] %> - <%= raw item['description'] %> + <%= raw item['description'][0] %> <% end %> </div> <p><em> diff --git a/app/views/general/custom_css.rhtml b/app/views/general/custom_css.html.erb index 0def82ed0..0def82ed0 100644 --- a/app/views/general/custom_css.rhtml +++ b/app/views/general/custom_css.html.erb diff --git a/app/views/general/exception_caught.rhtml b/app/views/general/exception_caught.html.erb index f8fe4343b..8d78e2e92 100644 --- a/app/views/general/exception_caught.rhtml +++ b/app/views/general/exception_caught.html.erb @@ -7,7 +7,7 @@ <ul> <li><%= _("Check for mistakes if you typed or copied the address.")%></li> <li><%= _("Search the site to find what you were looking for.")%> - <% form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form" }) do %> + <%= form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form" }) do %> <%= text_field_tag 'query', params[:query], { :size => 30, :title => "type your search term here" } %> <%= submit_tag _("Search") %> <% end %> diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.html.erb index 6eceb3b28..bf5261d15 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.html.erb @@ -1,4 +1,4 @@ -<%# TODO: Cache for 5 minutes %> +<% # TODO: Cache for 5 minutes %> <div id="frontpage_splash"> <div id="left_column"> <%= render :partial => "frontpage_new_request" %> diff --git a/app/views/general/search.rhtml b/app/views/general/search.html.erb index 50f9f9286..6234687f2 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.html.erb @@ -16,13 +16,13 @@ <% if @query.nil? %> <h1><%= _("Search") %></h1> <% else %> - <h1><%= _("Search results") %></h1> + <h1><%= _("Search results") %></h1> <% end%> <% if @advanced %> <div id="advanced-search"> <p><%= _('To use the advanced search, combine phrases and labels as described in the search tips below.') %></p> - <% form_tag(advanced_search_url, :method => "get") do %> + <%= form_tag(advanced_search_url, :method => "get") do %> <p> <%= text_field_tag :query, @query, { :size => 60 } %> <%= hidden_field_tag 'sortby', @inputted_sortby %> @@ -35,7 +35,7 @@ <% end %> </div> <% else %> - <% form_tag(request.url, {:method => "get", :id => "search_form"}) do %> + <%= form_tag(request.url, {:method => "get", :id => "search_form"}) do %> <p> <%= text_field_tag 'query', params[:query], { :size => 40, :title => "type your search term here" } %> <%= hidden_field_tag 'sortby', @inputted_sortby %> @@ -56,7 +56,7 @@ ["all", _("everything")]]%> <% for variety, label in labels %> <% if @variety_postfix != variety %> - <%= link_to label, search_path([params[:query], variety, @sort_postfix]) %> + <%= link_to label, search_path([params[:query], variety, @sort_postfix]) %> <% else %> <%= label %> <% end %> @@ -94,7 +94,7 @@ <div> <h3 class="title"><%= _("Search in") %></h3> - <% [["sent", _("messages from users")], + <% [["sent", _("messages from users")], ["response", _("messages from authorities")], ["comment", _("comments")]].each_with_index do |item, index| variety, title = item %> @@ -110,14 +110,14 @@ <label class="form_label" for="query"> <%= _("and") %></label> <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> </div> - </div> + </div> <% end %> - + <div> <%= submit_tag _("Filter") if @variety_postfix == "requests"%> </div> <% end # Search form%> - + <% end # if @advanced %> <% if !@query.nil? %> @@ -164,7 +164,7 @@ <% if @spelling_correction %> <p id="did_you_mean"><%= _('Did you mean: {{correction}}', :correction => search_link(@spelling_correction)) %></p> <% end %> - <p><%= raw(_('<a href="%s">Browse all</a> or <a href="%s">ask us to add one</a>.') % [list_public_bodies_default_url, help_requesting_path + '#missing_body']) %></p> + <p><%= raw(_('<a href="{{browse_url}}">Browse all</a> or <a href="{{add_url}}">ask us to add one</a>.', :browse_url => list_public_bodies_default_path.html_safe, :add_url => (help_requesting_path + '#missing_body').html_safe)) %></p> <% end %> </div> diff --git a/app/views/help/_sidebar.rhtml b/app/views/help/_sidebar.html.erb index 2b7ed5647..2b7ed5647 100644 --- a/app/views/help/_sidebar.rhtml +++ b/app/views/help/_sidebar.html.erb diff --git a/app/views/help/_why_they_should_reply_by_email.rhtml b/app/views/help/_why_they_should_reply_by_email.html.erb index faaa2b2e2..faaa2b2e2 100644 --- a/app/views/help/_why_they_should_reply_by_email.rhtml +++ b/app/views/help/_why_they_should_reply_by_email.html.erb diff --git a/app/views/help/about.rhtml b/app/views/help/about.html.erb index 477f0e750..477f0e750 100644 --- a/app/views/help/about.rhtml +++ b/app/views/help/about.html.erb diff --git a/app/views/help/alaveteli.rhtml b/app/views/help/alaveteli.html.erb index 6210f9f24..6210f9f24 100644 --- a/app/views/help/alaveteli.rhtml +++ b/app/views/help/alaveteli.html.erb diff --git a/app/views/help/api.rhtml b/app/views/help/api.html.erb index 57390d65a..57390d65a 100644 --- a/app/views/help/api.rhtml +++ b/app/views/help/api.html.erb diff --git a/app/views/help/contact.rhtml b/app/views/help/contact.html.erb index b1b5d4f24..ad89db9ec 100644 --- a/app/views/help/contact.rhtml +++ b/app/views/help/contact.html.erb @@ -40,13 +40,13 @@ <% end %> </div> -<% form_for :contact do |f| %> +<%= form_for :contact do |f| %> <% if not @user %> <p> <label class="form_label" for="contact_name">Your name:</label> <%= f.text_field :name, :size => 20 %> - (or <%= link_to "sign in", signin_path(:r => request.request_uri) %>) + (or <%= link_to "sign in", signin_path(:r => request.fullpath) %>) </p> <p> diff --git a/app/views/help/credits.rhtml b/app/views/help/credits.html.erb index 02f1e40e8..02f1e40e8 100644 --- a/app/views/help/credits.rhtml +++ b/app/views/help/credits.html.erb diff --git a/app/views/help/officers.rhtml b/app/views/help/officers.html.erb index 6db706f78..6db706f78 100644 --- a/app/views/help/officers.rhtml +++ b/app/views/help/officers.html.erb diff --git a/app/views/help/privacy.rhtml b/app/views/help/privacy.html.erb index 8e5293892..8e5293892 100644 --- a/app/views/help/privacy.rhtml +++ b/app/views/help/privacy.html.erb diff --git a/app/views/help/requesting.rhtml b/app/views/help/requesting.html.erb index e7cfdd199..e7cfdd199 100644 --- a/app/views/help/requesting.rhtml +++ b/app/views/help/requesting.html.erb diff --git a/app/views/help/unhappy.rhtml b/app/views/help/unhappy.html.erb index 79e3f8273..79e3f8273 100644 --- a/app/views/help/unhappy.rhtml +++ b/app/views/help/unhappy.html.erb diff --git a/app/views/holiday/due_date.rhtml b/app/views/holiday/due_date.html.erb index 6f8c2e51a..6f8c2e51a 100644 --- a/app/views/holiday/due_date.rhtml +++ b/app/views/holiday/due_date.html.erb diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.html.erb index a58913892..a58913892 100644 --- a/app/views/layouts/admin.rhtml +++ b/app/views/layouts/admin.html.erb diff --git a/app/views/layouts/contact_mailer.rhtml b/app/views/layouts/contact_mailer.html.erb index 3cdc75009..3cdc75009 100644 --- a/app/views/layouts/contact_mailer.rhtml +++ b/app/views/layouts/contact_mailer.html.erb diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.html.erb index a66b85e02..023a93138 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.html.erb @@ -43,7 +43,7 @@ <%= render :partial => 'general/before_head_end' %> </head> <body class="<%= 'front' if params[:action] == 'frontpage' %>"> - <% if Configuration::force_registration_on_new_request && !@user %> + <% if AlaveteliConfiguration::force_registration_on_new_request && !@user %> <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> <script type="text/javascript"> $(document).ready(function() { @@ -93,9 +93,9 @@ <% end %> - <%= link_to _("Sign out"), signout_path(:r => request.request_uri) %> + <%= link_to _("Sign out"), signout_path(:r => request.fullpath) %> <% else %> - <%= link_to _("Sign in or sign up"), signin_path(:r => request.request_uri) %> + <%= link_to _("Sign in or sign up"), signin_path(:r => request.fullpath) %> <% end %> </div> <% end %> @@ -140,13 +140,13 @@ <input type="text"> </div> <% - unless Configuration::ga_code.empty? || (@user && @user.super?) %> + unless AlaveteliConfiguration::ga_code.empty? || (@user && @user.super?) %> <script type="text/javascript"> 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 type="text/javascript"> - var pageTracker = _gat._getTracker("<%= Configuration::ga_code %>"); + var pageTracker = _gat._getTracker("<%= AlaveteliConfiguration::ga_code %>"); pageTracker._trackPageview(); </script> diff --git a/app/views/layouts/no_chrome.rhtml b/app/views/layouts/no_chrome.html.erb index 120ba6f28..120ba6f28 100644 --- a/app/views/layouts/no_chrome.rhtml +++ b/app/views/layouts/no_chrome.html.erb diff --git a/app/views/layouts/outgoing_mailer.rhtml b/app/views/layouts/outgoing_mailer.html.erb index 8bf8ef216..8bf8ef216 100644 --- a/app/views/layouts/outgoing_mailer.rhtml +++ b/app/views/layouts/outgoing_mailer.html.erb diff --git a/app/views/layouts/request_mailer.rhtml b/app/views/layouts/request_mailer.html.erb index 3cdc75009..3cdc75009 100644 --- a/app/views/layouts/request_mailer.rhtml +++ b/app/views/layouts/request_mailer.html.erb diff --git a/app/views/layouts/user_mailer.rhtml b/app/views/layouts/user_mailer.html.erb index 3cdc75009..3cdc75009 100644 --- a/app/views/layouts/user_mailer.rhtml +++ b/app/views/layouts/user_mailer.html.erb diff --git a/app/views/outgoing_mailer/_followup_footer.rhtml b/app/views/outgoing_mailer/_followup_footer.text.erb index d7bc7c5aa..d7bc7c5aa 100644 --- a/app/views/outgoing_mailer/_followup_footer.rhtml +++ b/app/views/outgoing_mailer/_followup_footer.text.erb diff --git a/app/views/outgoing_mailer/followup.rhtml b/app/views/outgoing_mailer/followup.text.erb index 049ebc881..049ebc881 100644 --- a/app/views/outgoing_mailer/followup.rhtml +++ b/app/views/outgoing_mailer/followup.text.erb diff --git a/app/views/outgoing_mailer/initial_request.rhtml b/app/views/outgoing_mailer/initial_request.text.erb index 5c418ecc7..5c418ecc7 100644 --- a/app/views/outgoing_mailer/initial_request.rhtml +++ b/app/views/outgoing_mailer/initial_request.text.erb diff --git a/app/views/public_body/_alphabet.rhtml b/app/views/public_body/_alphabet.html.erb index 46b345c2a..111da5b3b 100644 --- a/app/views/public_body/_alphabet.rhtml +++ 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.rhtml b/app/views/public_body/_body_listing.html.erb index 864ab8c9b..864ab8c9b 100644 --- a/app/views/public_body/_body_listing.rhtml +++ b/app/views/public_body/_body_listing.html.erb diff --git a/app/views/public_body/_body_listing_single.rhtml b/app/views/public_body/_body_listing_single.html.erb index d0496fbb8..8e0a64df7 100644 --- a/app/views/public_body/_body_listing_single.rhtml +++ b/app/views/public_body/_body_listing_single.html.erb @@ -18,7 +18,8 @@ <% end %> </span> <span class="bottomline"> - <%= n_('%d request made.', '%d requests made.', public_body.info_requests.size) % public_body.info_requests.size %> + <%= 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) %>. <% end %> diff --git a/app/views/public_body/_list_sidebar_extra.html.erb b/app/views/public_body/_list_sidebar_extra.html.erb new file mode 100644 index 000000000..290593d6a --- /dev/null +++ b/app/views/public_body/_list_sidebar_extra.html.erb @@ -0,0 +1,6 @@ +<p> + <%= link_to _('Are we missing a public authority?'), help_requesting_path + '#missing_body' %> +</p> +<p> + <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_path %> +</p> diff --git a/app/views/public_body/_list_sidebar_extra.rhtml b/app/views/public_body/_list_sidebar_extra.rhtml deleted file mode 100644 index d3d65fec8..000000000 --- a/app/views/public_body/_list_sidebar_extra.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<p> - <%= raw(_('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body']) %> -</p> -<p> - <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_path %> -</p> diff --git a/app/views/public_body/_search_ahead.rhtml b/app/views/public_body/_search_ahead.html.erb index 7ade89b8e..3d1dc8f93 100644 --- a/app/views/public_body/_search_ahead.rhtml +++ b/app/views/public_body/_search_ahead.html.erb @@ -1,4 +1,4 @@ -<div> + <% if !@xapian_requests.nil? %> <% if @xapian_requests.results.size > 0 %> <h3><%= _('Top search results:') %></h3> @@ -10,12 +10,11 @@ <% end %> <div id="authority_search_ahead_results"> <% for result in @xapian_requests.results %> - <%= render :partial => 'body_listing_single', :locals => { :public_body => result[:model] } %> + <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> <% end %> </div> - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %> + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated), :params => {:controller=>"request", :action => "select_authority"} %> <% end %> -</div> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.html.erb index ea5cd9613..ce24daaf9 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.html.erb @@ -10,7 +10,7 @@ <% for row in PublicBodyCategories::get().with_headings() %> <% if row.instance_of?(Array) %> <li> - <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_path(:tag => row[0]) %> + <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_path(:tag => row[0]) %> </li> <% else %> <% if not first_row %> @@ -23,7 +23,7 @@ <% end %> <% end %> <% if not first_row %> - </ul> + </ul> <% end %> <%= render :partial => "list_sidebar_extra" %> </div> @@ -32,16 +32,22 @@ <div id="left_column_flip"> <h1><%= _('Public authorities') %></h1> -<% form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> +<%= form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> <div> - <%= text_field_tag(:public_body_query, params[:public_body_query], { :title => "type your search term here" } ) %> + <%= text_field_tag(:public_body_query, params[:public_body_query], { :title => "type your search term here" } ) %> <%= submit_tag(_("Search")) %> </div> <% end %> -<h2 class="publicbody_results"><%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %></h2> +<h2 class="publicbody_results"> + <%= n_('Found {{count}} public authority {{description}}', + 'Found {{count}} public authorities {{description}}', + @public_bodies.total_entries, + :count => @public_bodies.total_entries, + :description => @description) %> +</h2> <%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> <%= will_paginate(@public_bodies) %><br/> - <%= raw _('<a href="%s">Can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %> + <%= link_to _("Can't find the one you want?"), help_requesting_path + '#missing_body' %> </div> diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.html.erb index df6346e4f..47075a1f5 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.html.erb @@ -4,7 +4,12 @@ <h2><%= _('Follow this authority')%></h2> <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %> - <p><%= raw(n_("<span id='follow_count'>%d</span> person is following this authority", "<span id='follow_count'>%d</span> people are following this authority", follower_count) % follower_count) %></p> + <p> + <%= n_("{{count}} person is following this authority", + "{{count}} people are following this authority", + follower_count, + :count => content_tag(:span, follower_count, :id => "follow_count")) %> + </p> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> <h2><%= _('More about this authority')%></h2> @@ -51,12 +56,7 @@ <div id="stepwise_make_request"> <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <% if @public_body.eir_only? %> - <%= _('Make a new <strong>Environmental Information</strong> request')%> - <% else %> - <%= _('Make a new <strong>Freedom of Information</strong> request to {{public_body}}', :public_body => h(@public_body.name))%> - <% end %> - <%= _('<a class="link_button_green" href="{{url}}">{{text}}</a>', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> + <%= 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' %> @@ -91,9 +91,13 @@ <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %> <% else %> <% if @public_body.info_requests.size > 4 %> - <%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <%= n_('Search within the {{count}} Freedom of Information requests to {{public_body_name}}', 'Search within the {{count}} Freedom of Information requests made to {{public_body_name}}', @public_body.info_requests.size, :count => @public_body.info_requests.size, :public_body_name => @public_body.name) %> <% else %> - <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <%= n_('{{count}} Freedom of Information request to {{public_body_name}}', + '{{count}} Freedom of Information requests to {{public_body_name}}', + @public_body.info_requests.size, + :count => @public_body.info_requests.size, + :public_body_name => @public_body.name) %> <% end %> <% end %> <%= @page_desc %> diff --git a/app/views/public_body/view_email.rhtml b/app/views/public_body/view_email.html.erb index 3799d227b..3f0a558c7 100644 --- a/app/views/public_body/view_email.rhtml +++ b/app/views/public_body/view_email.html.erb @@ -25,10 +25,10 @@ <p> <% if @public_body.is_requestable? || @public_body.not_requestable_reason != 'bad_contact' %> - <%= raw _('If the address is wrong, or you know a better address, please <a href="%s">contact us</a>.')% [help_contact_path]%> + <%= raw(_('If the address is wrong, or you know a better address, please <a href="{{url}}">contact us</a>.', :url => help_contact_path.html_safe)) %> <% else %> - <%= raw _(' If you know the address to use, then please <a href="%s">send it to us</a>. - You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %> + <%= raw(_(' If you know the address to use, then please <a href="{{url}}">send it to us</a>. + You may be able to find the address on their website, or by phoning them up and asking.', :url =>help_contact_path.html_safe)) %> <% end %> </p> diff --git a/app/views/public_body/view_email_captcha.rhtml b/app/views/public_body/view_email_captcha.html.erb index 6f301e055..4f6db5b67 100644 --- a/app/views/public_body/view_email_captcha.rhtml +++ b/app/views/public_body/view_email_captcha.html.erb @@ -4,7 +4,7 @@ <p><%= _('To view the email address that we use to send FOI requests to {{public_body_name}}, please enter these words.', :public_body_name => h(@public_body.name))%></p> -<% form_for :contact do |f| %> +<%= form_for :contact do |f| %> <%= recaptcha_tags %> <%= hidden_field_tag(:submitted_view_email, { :value => 1 } ) %> diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb new file mode 100644 index 000000000..7d558ab4e --- /dev/null +++ b/app/views/reports/new.html.erb @@ -0,0 +1,26 @@ +<h1>Report request: <%= @info_request.title %></h1> + +<% if @info_request.attention_requested %> + <p><%= _("This request has already been reported for administrator attention") %></p> +<% else %> + <p> + Reporting a request notifies the site administrators. They will respond as soon as possible. + </p> + <p>Why specifically do you consider this request unsuitable?</p> + + <%= form_tag request_report_path(:request_id => @info_request.url_title) do %> + <p> + <label class="form_label" for="reason">Reason:</label> + <%= select_tag :reason, options_for_select(@info_request.report_reasons, @reason), :prompt => "Choose a reason" %> + </p> + <p> + <label class="form_label" for="message">Please tell us more:</label> + <%= text_area_tag :message, @message, :rows => 10, :cols => 60 %> + </p> + + <div class="form_button"> + <%= submit_tag _("Report request") %> + </div> + + <% end %> +<% end %> diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.html.erb index d3ddb981b..b54a8f5fb 100644 --- a/app/views/request/_after_actions.rhtml +++ b/app/views/request/_after_actions.html.erb @@ -7,7 +7,7 @@ <ul> <% if @info_request.comments_allowed? %> <li> - <%= raw(_('<a href="%s">Add an annotation</a> (to help the requester or others)') % [new_comment_path(:url_title => @info_request.url_title)]) %> + <%= raw(_('<a href="{{url}}">Add an annotation</a> (to help the requester or others)', :url => new_comment_url(:url_title => @info_request.url_title).html_safe)) %> </li> <% end %> <% if @old_unclassified %> diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.html.erb index 94498612a..94498612a 100644 --- a/app/views/request/_bubble.rhtml +++ b/app/views/request/_bubble.html.erb diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.html.erb index 68711b259..68711b259 100644 --- a/app/views/request/_correspondence.rhtml +++ b/app/views/request/_correspondence.html.erb diff --git a/app/views/request/_describe_state.rhtml b/app/views/request/_describe_state.html.erb index fde1cdfa7..05cce013e 100644 --- a/app/views/request/_describe_state.rhtml +++ b/app/views/request/_describe_state.html.erb @@ -1,6 +1,6 @@ <% if @is_owning_user %> - <% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> + <%= form_for(@info_request, :as => :incoming_message, :url => describe_state_url(:id => @info_request.id), :html => {:id => "describe_form_#{id_suffix}"}) do |f| %> <h2><%= _('What best describes the status of this request now?') %></h2> <hr> @@ -97,18 +97,17 @@ <p> <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %> - <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %> <%= submit_tag _("Submit status") %> (<%= _('and we\'ll suggest <strong>what to do next</strong>') %>) </p> <% end %> <% elsif @old_unclassified %> - <%= render :partial => 'other_describe_state', :locals => {:id_suffix => id_suffix } %> + <%= render :partial => 'request/other_describe_state', :locals => {:id_suffix => id_suffix } %> <% else %> <% if !@info_request.is_external? %> <%= _('We don\'t know whether the most recent response to this request contains information or not – - if you are {{user_link}} please <a href="{{url}}">sign in</a> and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.request_uri)) %> + if you are {{user_link}} please <a href="{{url}}">sign in</a> and let everyone know.',:user_link=>user_link(@info_request.user), :url=>signin_url(:r => request.fullpath)) %> <% end %> <% end %> diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.html.erb index bccfccca7..bb099ff15 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.html.erb @@ -49,9 +49,9 @@ <% else %> <% if @internal_review %> <p> - <%= raw(_('If you are dissatisfied by the response you got from + <%= _('If you are dissatisfied by the response you got from the public authority, you have the right to - complain (<a href="%s">details</a>).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %> + complain (<a href="{{url}}">details</a>).', :url => "http://foiwiki.com/foiwiki/index.php/Internal_reviews".html_safe) %> </p> <% end %> @@ -61,25 +61,24 @@ <% status = @info_request.calculate_status %> <% if status == 'waiting_response_overdue' %> - <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, + <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, by law, the authority should normally have responded <strong>promptly</strong> and') %> <% if @info_request.public_body.is_school? %> <%= _('in term time') %> <% end %> <%= _('by <strong>{{date}}</strong>',:date=>simple_date(@info_request.date_response_required_by)) %> - (<%= raw(_('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"]) %>). - + (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). </p> <% elsif status == 'waiting_response_very_overdue' %> <p> - <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by + <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by law, under all circumstances, the authority should have responded - by now') %> (<%= raw(_('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"]) %>). + by now') %> (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). </p> <% end %> - <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %> + <%= form_for(@outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %> <p> <%= o.text_area :body, :rows => 15, :cols => 55 %> </p> @@ -103,7 +102,7 @@ <div> <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> <label for="internal_review"><%= _('I am requesting an <strong>internal review</strong>') %> - <%= raw(_('<a href="%s">what\'s that?</a>') % ["/help/unhappy"]) %> + <%= link_to _("what's that?"), "/help/unhappy" %> </label> </div> <div> diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.html.erb index 0873b312f..4c06f1f48 100644 --- a/app/views/request/_hidden_correspondence.rhtml +++ b/app/views/request/_hidden_correspondence.html.erb @@ -7,21 +7,21 @@ %> <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>"> <p> - <%= raw(_('This response has been hidden. See annotations to find out why. - If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)]) %> + <%= _('This response has been hidden. See annotations to find out why. + If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>"> <p> - <%= raw(_('This outgoing message has been hidden. See annotations to - find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)]) %> + <%= _('This outgoing message has been hidden. See annotations to + find out why. If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% elsif info_request_event.event_type == 'comment' %> <div class="comment_in_request" id="comment-<%=comment.id.to_s%>"> - <p><%= raw(_('This comment has been hidden. See annotations to - find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.request_uri)]) %> + <p><%= _('This comment has been hidden. See annotations to + find out why. If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% end %> diff --git a/app/views/request/_next_actions.rhtml b/app/views/request/_next_actions.html.erb index f318df6e4..f318df6e4 100644 --- a/app/views/request/_next_actions.rhtml +++ b/app/views/request/_next_actions.html.erb diff --git a/app/views/request/_other_describe_state.rhtml b/app/views/request/_other_describe_state.html.erb index e274fe8c9..e49f9ecb3 100644 --- a/app/views/request/_other_describe_state.rhtml +++ b/app/views/request/_other_describe_state.html.erb @@ -1,6 +1,6 @@ -<% form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> +<%= form_for(@info_request, :as => :incoming_message, :url => describe_state_url(:id => @info_request.id), :html => {:id => "describe_form_#{id_suffix}"}) do |f| %> <h2><%= _('Hi! We need your help. The person who made the following request hasn\'t told us whether or not it was successful. Would you mind taking a moment to read it and help us keep the place tidy for everyone? @@ -75,7 +75,6 @@ <p> <%= hidden_field_tag 'last_info_request_event_id', @last_info_request_event_id, :id => 'last_info_request_event_id' + id_suffix %> - <%= hidden_field_tag 'submitted_describe_state', 1, :id => 'submitted_describe_state' + id_suffix %> <%= submit_tag "Submit status" %> </p> <% end %> diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.html.erb index 0c215a9b6..090db01df 100644 --- a/app/views/request/_request_filter_form.rhtml +++ b/app/views/request/_request_filter_form.html.erb @@ -1,7 +1,7 @@ <%= render :partial => 'general/localised_datepicker' %> <div id="list-filter"> - <% form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> + <%= form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> <div class="list-filter-item"> <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> <%= text_field_tag(:query, params[:query]) %> diff --git a/app/views/request/_request_listing.rhtml b/app/views/request/_request_listing.html.erb index 492f874f3..492f874f3 100644 --- a/app/views/request/_request_listing.rhtml +++ b/app/views/request/_request_listing.html.erb diff --git a/app/views/request/_request_listing_short_via_event.rhtml b/app/views/request/_request_listing_short_via_event.html.erb index c2f6474a1..c2f6474a1 100644 --- a/app/views/request/_request_listing_short_via_event.rhtml +++ b/app/views/request/_request_listing_short_via_event.html.erb diff --git a/app/views/request/_request_listing_single.rhtml b/app/views/request/_request_listing_single.html.erb index 56737fd3e..56737fd3e 100644 --- a/app/views/request/_request_listing_single.rhtml +++ b/app/views/request/_request_listing_single.html.erb diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.html.erb index cc8bae8a9..cc8bae8a9 100644 --- a/app/views/request/_request_listing_via_event.rhtml +++ b/app/views/request/_request_listing_via_event.html.erb diff --git a/app/views/request/_search_ahead.rhtml b/app/views/request/_search_ahead.html.erb index 1e65a5458..1e65a5458 100644 --- a/app/views/request/_search_ahead.rhtml +++ b/app/views/request/_search_ahead.html.erb diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.html.erb index af33d31a2..aba5c2fb3 100644 --- a/app/views/request/_sidebar.rhtml +++ b/app/views/request/_sidebar.html.erb @@ -3,7 +3,12 @@ <h2><%= _('Follow this request') %></h2> <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %> - <p><%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %></p> + <p> + <%= n_("There is {{count}} person following this request", + "There are {{count}} people following this request", + follower_count, + :count => follower_count) %> + </p> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user && @info_request.user == @user, :location => 'sidebar' } %> </div> <% if @info_request.described_state != "attention_requested" %> @@ -11,40 +16,37 @@ <% if @info_request.attention_requested %> <% if @info_request.prominence == 'hidden' %> <%# The eccentric formatting of the following string is in order that it be identical - to the corresponding string in request/show.rhtml %> + to the corresponding string in request/show.html.erb %> <p><%= _('This request has prominence \'hidden\'. You can only see it because you are logged in as a super user.') %></p> <% elsif @info_request.prominence == 'requester_only' %> <%# The eccentric formatting of the following string is in order that it be identical - to the corresponding string in request/show.rhtml %> - <p><%= raw(_('This request is hidden, so that only you the requester can see it. Please - <a href="%s">contact us</a> if you are not sure why.') % [help_requesting_path]) %></p> + to the corresponding string in request/show.html.erb %> + <p><%= _('This request is hidden, so that only you the requester can see it. Please + <a href="{{url}}">contact us</a> if you are not sure why.', :url => help_requesting_path.html_safe) %></p> <% else %> - <p><%= raw(_('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please <a href="%s">contact us</a>.') % [help_requesting_path]) %></p> + <p><%= _('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please <a href="{{url}}">contact us</a>.', :url => help_requesting_path.html_safe) %></p> <% end %> <% else %> <p><%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (<a href="/help/about">read more</a>).') %></p> <p><%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %></p> - <%= button_to _("Report this request"), report_path, :class => "link_button_green" %> + <%= link_to _("Report this request"), new_request_report_path(:request_id => @info_request.url_title) %> <% end %> <% end %> <h2><%= _("Act on what you've learnt") %></h2> <div class="act_link"> - <% - # Cast "related" to normal string because html safe string (from rails_xss gem) and CGI::escape - # interact badly with ':' character. Go figure! Might go away in rails 3 - %> - <% link_to "https://twitter.com/share?" + {:url => request.url, :via => Configuration::twitter_username, :text => @info_request.title, :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name).to_str}.to_query do %> + <% tweet_link = "https://twitter.com/share?" + {:url => request.url, :via => AlaveteliConfiguration::twitter_username, :text => "'#{@info_request.title}'", :related => _('alaveteli_foi:The software that runs {{site_name}}', :site_name => site_name)}.to_query %> + <% link_to tweet_link do %> <%= image_tag "twitter-16.png", :alt => "twitter icon" %> - <%= _("Tweet this request") %> <% end %> + <%= link_to _("Tweet this request"), tweet_link %> </div> <div class="act_link"> - <% link_to "http://wordpress.com/" do %> + <%= link_to "http://wordpress.com/" do %> <%= image_tag "wordpress.png", :class => "rss" %> - <%= _("Start your own blog") %> <% end %> + <%= link_to _("Start your own blog"), "http://wordpress.com/"%> </div> <%= render :partial => 'request/next_actions' %> @@ -65,7 +67,6 @@ <!-- this link with this wording is here for legal reasons, discuss with board and our lawyer before changing or removing it --> - <p><small><%= raw(_('<a href="%s">Are you the owner of - any commercial copyright on this page?</a>') % [help_officers_path+"#copyright"]) %></small></p> + <p><small><%= link_to _('Are you the owner of any commercial copyright on this page?'), help_officers_path+"#copyright" %></small></p> </div> diff --git a/app/views/request/_sidebar_request_listing.rhtml b/app/views/request/_sidebar_request_listing.html.erb index ec5a5813d..ec5a5813d 100644 --- a/app/views/request/_sidebar_request_listing.rhtml +++ b/app/views/request/_sidebar_request_listing.html.erb diff --git a/app/views/request/_summary_suggestion.rhtml b/app/views/request/_summary_suggestion.html.erb index a5da09cda..a5da09cda 100644 --- a/app/views/request/_summary_suggestion.rhtml +++ b/app/views/request/_summary_suggestion.html.erb diff --git a/app/views/request/_view_html_prefix.rhtml b/app/views/request/_view_html_prefix.html.erb index 3a9946745..3a9946745 100644 --- a/app/views/request/_view_html_prefix.rhtml +++ b/app/views/request/_view_html_prefix.html.erb diff --git a/app/views/request/_view_html_stylesheet.rhtml b/app/views/request/_view_html_stylesheet.html.erb index d6cb932a8..d6cb932a8 100644 --- a/app/views/request/_view_html_stylesheet.rhtml +++ b/app/views/request/_view_html_stylesheet.html.erb diff --git a/app/views/request/_wall_listing.rhtml b/app/views/request/_wall_listing.html.erb index 4a76b09bf..b6b4b38b1 100644 --- a/app/views/request/_wall_listing.rhtml +++ b/app/views/request/_wall_listing.html.erb @@ -8,7 +8,7 @@ end %> <% if event.event_type == 'sent' %> <%= _('A new request, <em><a href="{{request_url}}">{{request_title}}</a></em>, was sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>request_path(info_request),:request_title=>info_request.title) %> <% elsif event.event_type == 'followup_sent' %> - <%= _('A <a href="{{request_url}}">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>outgoing_message_url(event.outgoing_message),:request_title=>info_request.title) %> + <%= _('A <a href="{{request_url}}">follow up</a> to <em>{{request_title}}</em> was sent to {{public_body_name}} by {{info_request_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>outgoing_message_path(event.outgoing_message),:request_title=>info_request.title) %> <% elsif event.event_type == 'response' %> <%= _('A <a href="{{request_url}}">response</a> to <em>{{request_title}}</em> was sent by {{public_body_name}} to {{info_request_user}} on {{date}}. The request status is: {{request_status}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:date=>simple_date(event.created_at),:request_url=>incoming_message_path(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %> <% elsif event.event_type == 'comment' %> diff --git a/app/views/request/describe_state_message.html.erb b/app/views/request/describe_state_message.html.erb new file mode 100644 index 000000000..73237759f --- /dev/null +++ b/app/views/request/describe_state_message.html.erb @@ -0,0 +1,30 @@ +<h1><%= @title %></h1> + + +<p> + <% if @described_state == "error_message" %> + <%= _("If the error was a delivery failure, and you can find an up to date FOI email address for the authority, please tell us using the form below.") %> + <% else %> + <%= _("Just one more thing") %> + <% end %> +</p> + +<%= form_for :incoming_message, :url => describe_state_url(:id => @info_request.id) do |f| %> + + <p> + <label class="form_label" for="incoming_message_message">Please tell us more:</label> + <%= f.text_area :message, :rows => 10, :cols => 60 %> + </p> + + <div> + <%= hidden_field_tag "incoming_message[described_state]", @described_state %> + <%= hidden_field_tag :last_info_request_event_id, @last_info_request_event_id %> + </div> + + <div class="form_button"> + <%= submit_tag _("Submit status and send message") %> + </div> + +<% end %> + + diff --git a/app/views/request/details.rhtml b/app/views/request/details.html.erb index 3cb2f5afe..3cb2f5afe 100644 --- a/app/views/request/details.rhtml +++ b/app/views/request/details.html.erb diff --git a/app/views/request/followup_bad.rhtml b/app/views/request/followup_bad.html.erb index c892263e6..ea2400c5d 100644 --- a/app/views/request/followup_bad.rhtml +++ b/app/views/request/followup_bad.html.erb @@ -9,21 +9,21 @@ <% if @reason == 'not_apply' %> <!-- we should never get here, but just in case give a sensible message --> <p><%= _('Freedom of Information law no longer applies to') %> <%=h @info_request.public_body.name %>. - <%= raw(_('From the request page, try replying to a particular message, rather than sending + <%= _('From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + an email which will go to the right place, please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'defunct' %> <!-- we should never get here, but just in case give a sensible message --> - <p><%=h @info_request.public_body.name %> <%= raw(_('no longer exists. If you are trying to make + <p><%=h @info_request.public_body.name %> <%= _('no longer exists. If you are trying to make From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + an email which will go to the right place, please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'bad_contact' %> - <p><%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= raw(_('You may be able to find + <p><%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= _('You may be able to find one on their website, or by phoning them up and asking. If you manage - to find one, then please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + to find one, then please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'external' %> <p><%= _("Followups cannot be sent for this request, as it was made externally, and published here by {{public_body_name}} on the requester's behalf.", :public_body_name => h(@info_request.public_body.name)) %> diff --git a/app/views/request/followup_preview.rhtml b/app/views/request/followup_preview.html.erb index 50c64138f..55afc0245 100644 --- a/app/views/request/followup_preview.rhtml +++ b/app/views/request/followup_preview.html.erb @@ -2,7 +2,7 @@ <div id="followup"> -<% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'preview_form' }, :url => (@incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => @incoming_message.id)) + "#followup" ) do |o| %> +<%= form_for(@outgoing_message, :html => { :id => 'preview_form' }, :url => (@incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => @incoming_message.id)) + "#followup" ) do |o| %> <% if @internal_review %> <h1><%= _('Now preview your message asking for an internal review') %></h1> @@ -15,7 +15,7 @@ <li><%= _('Your message will appear in <strong>search engines</strong>') %></li> </ul> - <% fields_for :outgoing_message do |o| %> + <%= fields_for :outgoing_message do |o| %> <div class="correspondence" id="outgoing-0"> <p class="preview_subject"> diff --git a/app/views/request/hidden.html.erb b/app/views/request/hidden.html.erb new file mode 100644 index 000000000..f2f76a817 --- /dev/null +++ b/app/views/request/hidden.html.erb @@ -0,0 +1,19 @@ +<% @title = _("Request has been removed") %> + +<h1><%=@title%></h1> + +<p> +<%=@details%> +</p> + +<p><%= _('The request you have tried to view has been removed. There are +various reasons why we might have done this, sorry we can\'t be more specific here. Please <a + href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe) %> +</p> +<% if @info_request.prominence == 'requester_only' %> + <p> + <%= _('If you are the requester, then you may <a href="{{url}}">sign in</a> to view the request.', :url => signin_url(:r => request.fullpath).html_safe) %> + </p> +<% end %> + + diff --git a/app/views/request/hidden.rhtml b/app/views/request/hidden.rhtml deleted file mode 100644 index 2d038a663..000000000 --- a/app/views/request/hidden.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<% @title = _("Request has been removed") %> - -<h1><%=@title%></h1> - -<p> -<%=@details%> -</p> - -<p><%= raw(_('The request you have tried to view has been removed. There are -various reasons why we might have done this, sorry we can\'t be more specific here. Please <a - href="%s">contact us</a> if you have any questions.') % [help_contact_path]) %> -</p> -<% if @info_request.prominence == 'requester_only' %> - <p> - <%= raw(_('If you are the requester, then you may <a href="%s">sign in</a> to view the request.') % [signin_url(:r => request.request_uri)]) %> - </p> -<% end %> - - diff --git a/app/views/request/list.rhtml b/app/views/request/list.html.erb index 062b77c3e..062b77c3e 100644 --- a/app/views/request/list.rhtml +++ b/app/views/request/list.html.erb diff --git a/app/views/request/new.rhtml b/app/views/request/new.html.erb index 4766c981b..8b7d38ac0 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.html.erb @@ -33,7 +33,7 @@ <%= foi_error_messages_for :info_request, :outgoing_message %> - <% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> + <%= form_for(@info_request, :url => new_request_path, :html => { :id => 'write_form' } ) do |f| %> <div id="request_header"> <div id="request_header_body"> @@ -98,12 +98,12 @@ <ul> <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> - <li><%= raw(_('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused']) %></li> + <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="{{url}}">why?</a>).', :url => (help_requesting_path + '#focused').html_safe) %></li> </ul> </div> <div id="request_form"> - <% fields_for :outgoing_message do |o| %> + <%= fields_for :outgoing_message do |o| %> <p> <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> <%= o.text_area :body, :rows => 20, :cols => 60 %> @@ -112,23 +112,24 @@ <% if !@user %> <p class="form_note"> + <%= raw(_('Everything that you enter on this page, including <strong>your name</strong>, will be <strong>displayed publicly</strong> on - this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"]) %> + this website forever (<a href="{{url}}">why?</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> <%= raw(_('If you are thinking of using a pseudonym, - please <a href="%s">read this first</a>.') % [help_privacy_path+"#real_name"]) %> + please <a href="{{url}}">read this first</a>.', :url => (help_privacy_path+"#real_name").html_safe)) %> </p> <% else %> <p class="form_note"> <%= raw(_('Everything that you enter on this page will be <strong>displayed publicly</strong> on - this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"]) %> + this website forever (<a href="{{url}}">why?</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> </p> <% end %> <p class="form_note"> <%= raw(_("<strong> Can I request information about myself?</strong>\n" + - "\t\t\t<a href=\"%s\">No! (Click here for details)</a>") % [help_requesting_path+"#data_protection"]) %> + "\t\t\t<a href=\"{{url}}\">No! (Click here for details)</a>", :url => (help_requesting_path+"#data_protection").html_safe)) %> </p> <div class="form_button"> diff --git a/app/views/request/new_bad_contact.rhtml b/app/views/request/new_bad_contact.html.erb index 56f3f4168..56f3f4168 100644 --- a/app/views/request/new_bad_contact.rhtml +++ b/app/views/request/new_bad_contact.html.erb diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.html.erb index ff27405b8..8da4eb555 100644 --- a/app/views/request/new_please_describe.rhtml +++ b/app/views/request/new_please_describe.html.erb @@ -1,4 +1,4 @@ -<% @title = "First, did your other requests succeed?" %> +<% @title = _("First, did your other requests succeed?") %> <h1><%=@title%></h1> @@ -13,7 +13,7 @@ if they are successful yet or not.') %> </ul> <p> - <%= raw(_('When you\'re done, <strong>come back here</strong>, <a href="%s">reload this page</a> and file your new request.') % [request.request_uri]) %> + <%= _('When you\'re done, <strong>come back here</strong>, <a href="{{url}}">reload this page</a> and file your new request.', :url => request.fullpath.html_safe) %> </p> <p> diff --git a/app/views/request/preview.rhtml b/app/views/request/preview.html.erb index 8d1fd753e..243dc90a9 100644 --- a/app/views/request/preview.rhtml +++ b/app/views/request/preview.html.erb @@ -1,16 +1,16 @@ <% @title = "Preview new " + h(@info_request.law_used_short) + " request to '" + h(@info_request.public_body.name) + "'" %> -<% form_for(:info_request, @info_request, :html => { :id => 'preview_form' } ) do |f| %> - +<%= form_for(@info_request, :url => new_request_path, :html => { :id => 'preview_form' } ) do |f| %> + <h1><%= _('3. Now check your request') %></h1> <ul> <li><%= _('Check you haven\'t included any <strong>personal information</strong>.') %></li> <li><%= raw(_('Your name, request and any responses will appear in <strong>search engines</strong> - (<a href="%s">details</a>).') % [help_privacy_path+"#public_request"]) %> + (<a href="{{url}}">details</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> </li> </ul> - <% fields_for :outgoing_message do |o| %> + <%= fields_for :outgoing_message do |o| %> <div class="correspondence" id="outgoing-0"> <p class="preview_subject"> @@ -23,13 +23,13 @@ <%= o.hidden_field(:body) %> </div> - <p class="event_actions"> + <p class="event_actions"> </p> </div> <% end %> - <p><%= raw(_('<strong>Privacy note:</strong> If you want to request private information about - yourself then <a href="%s">click here</a>.') % [help_requesting_path+"#data_protection"]) %> + <p><%= _('<strong>Privacy note:</strong> If you want to request private information about + yourself then <a href="{{url}}">click here</a>.', :url => (help_requesting_path+"#data_protection").html_safe) %> <p> <%= f.hidden_field(:title) %> @@ -38,11 +38,11 @@ <%= hidden_field_tag(:submitted_new_request, 1) %> <%= hidden_field_tag(:preview, 0 ) %> <%= submit_tag _("Edit this request"), :name => 'reedit', :id => 'reedit_button' %> - <%= submit_tag _("Send request"), :name => 'submit', :id => 'submit_button' %> + <%= submit_tag _("Send request"), :name => 'submit', :id => 'submit_button' %> </p> <% if !@info_request.tag_string.empty? %> <p><strong><%= _('Tags:') %></strong> <%=h @info_request.tag_string %></p> <% end %> -<% end %>
\ No newline at end of file +<% end %> diff --git a/app/views/request/select_authority.rhtml b/app/views/request/select_authority.html.erb index 94e690e64..75c51fc57 100644 --- a/app/views/request/select_authority.rhtml +++ b/app/views/request/select_authority.html.erb @@ -2,22 +2,22 @@ <script type="text/javascript"> $(document).ready(function(){ $("#authority_preview").hide(); - + // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: // http://benalman.com/projects/jquery-throttle-debounce-plugin/ - $("#query").keypress($.debounce( 300, function() { + $("#query").keypress($.debounce( 300, function() { // Do a type ahead search and display results $("#typeahead_response").load("<%=search_ahead_bodies_url%>?query="+encodeURI(this.value), function() { $("#authority_preview").hide(); // Hide the preview, since results have changed }); })); - // We're using the existing body list: we intercept the clicks on the titles to + // We're using the existing body list: we intercept the clicks on the titles to // display a preview on the right hand side of the screen $("#typeahead_response .head a").live('click', function() { $("#authority_preview").load(this.href+" #public_body_show", function() { $("#authority_preview").show(); - $(window).scrollTop($("#banner").height()); + $(window).scrollTop($("#banner").height()); $("#authority_preview #header_right").hide(); }); return false; @@ -30,41 +30,24 @@ <h1 style="clear: left"><%= _('1. Select an authority') %></h1> <div id="authority_selection"> - <% form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %> + <%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %> <div> <p> - <%= raw(_('First, type in the <strong>name of the UK public authority</strong> you\'d + <%= _('First, type in the <strong>name of the UK public authority</strong> you\'d like information from. <strong>By law, they have to respond</strong> - (<a href="%s#%s">why?</a>).') % [help_about_path, "whybother_them"]) %> + (<a href="{{url}}">why?</a>).', :url => (help_about_path + "#whybother_them").html_safe) %> </p> <%= text_field_tag 'query', params[:query], { :size => 30, :title => "type your search term here" } %> <%= hidden_field_tag 'bodies', 1 %> <%= submit_tag _('Search') %> </div> <% end %> - <div id="typeahead_response"> - <% if !@xapian_requests.nil? %> - <% if @xapian_requests.results.size > 0 %> - <h3><%= _('Top search results:') %></h3> - <p> - <%= _('Select one to see more information about the authority.')%> - </p> - <% else %> - <h3><%= _('No results found.') %></h3> - <% end %> - <div id="authority_search_ahead_results"> - <% for result in @xapian_requests.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> - <% end %> - </div> - - <% end %> - - + <div id="typeahead_response"> + <%= render :partial => 'public_body/search_ahead' %> </div> </div> - + <div id="authority_preview"> </div> - + diff --git a/app/views/request/show.rhtml b/app/views/request/show.html.erb index ef49ef958..4b0663f76 100644 --- a/app/views/request/show.rhtml +++ b/app/views/request/show.html.erb @@ -10,8 +10,8 @@ <% end %> <% if @info_request.prominence == 'requester_only' %> <p id="hidden_request"> - <%= raw(_('This request is hidden, so that only you the requester can see it. Please - <a href="%s">contact us</a> if you are not sure why.') % [help_requesting_path]) %> + <%= _('This request is hidden, so that only you the requester can see it. Please + <a href="{{url}}">contact us</a> if you are not sure why.', :url => help_requesting_path.html_safe) %> </p> <% end %> @@ -80,11 +80,11 @@ <%= _('in term time') %> <% end %> <%= _('by') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong> - (<%= raw(_('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response']) %>) + (<%= link_to _('details'), help_requesting_path + '#quickly_response' %>) <% elsif @status == 'waiting_response_very_overdue' %> <%= _('Response to this request is <strong>long overdue</strong>.') %> <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %> - (<%= raw(_('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response']) %>). + (<%= link_to _('details'), help_requesting_path + '#quickly_response' %>). <% if !@info_request.is_external? %> <%= _('You can <strong>complain</strong> by') %> <%= link_to _("requesting an internal review"), show_response_no_followup_path(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. @@ -106,7 +106,7 @@ <%= _('The request is <strong>waiting for clarification</strong>.') %> <% if !@info_request.is_external? %> <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %> - <%= link_to _("sign in"), signin_path(:r => request.request_uri) %> <%= _('to send a follow up message.') %> + <%= link_to _("sign in"), signin_path(:r => request.fullpath) %> <%= _('to send a follow up message.') %> <% end %> <% end %> <% elsif @status == 'gone_postal' %> diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.html.erb index ac1f04227..a61359679 100644 --- a/app/views/request/show_response.rhtml +++ b/app/views/request/show_response.html.erb @@ -26,8 +26,8 @@ <%= _('The authority only has a <strong>paper copy</strong> of the information.') %> </dt> <dd> - <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in - (<a href="%s">more details</a>).') % [help_privacy_path + '#postal_answer']) %> + <%= _('At the bottom of this page, write a reply to them trying to persuade them to scan it in + (<a href="{{url}}">more details</a>).', :url => (help_privacy_path + '#postal_answer').html_safe) %> </dd> <dt> diff --git a/app/views/request/similar.rhtml b/app/views/request/similar.html.erb index 0d53f6919..0d53f6919 100644 --- a/app/views/request/similar.rhtml +++ b/app/views/request/similar.html.erb diff --git a/app/views/request/simple_correspondence.rhtml b/app/views/request/simple_correspondence.html.erb index 0da9ef172..461fa3912 100644 --- a/app/views/request/simple_correspondence.rhtml +++ b/app/views/request/simple_correspondence.html.erb @@ -1,4 +1,4 @@ -<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{Configuration::domain}#{show_request_path(:url_title=>@info_request.url_title)}") %>. +<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{AlaveteliConfiguration::domain}#{show_request_path(:url_title=>@info_request.url_title)}") %>. <% for info_request_event in @info_request_events %> <% diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.html.erb index 675951595..f5fd6f000 100644 --- a/app/views/request/upload_response.rhtml +++ b/app/views/request/upload_response.html.erb @@ -12,7 +12,7 @@ <h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1> <p> - <%= raw(_('Your response will <strong>appear on the Internet</strong>, <a href="%s">read why</a> and answers to other questions.') % [help_officers_path]) %> + <%= raw(_('Your response will <strong>appear on the Internet</strong>, <a href="{{url}}">read why</a> and answers to other questions.', :url => help_officers_path.html_safe)) %> </p> <h2><%= _('Respond by email')%></h2> @@ -28,9 +28,9 @@ <h2><%= _('Respond using the web')%></h2> <p><%= raw(_('Enter your response below. You may attach one file (use email, or - <a href="%s">contact us</a> if you need more).')% [help_contact_path]) %></p> + <a href="{{url}}">contact us</a> if you need more).', :url => help_contact_path.html_safe)) %></p> - <% form_tag '', :id => 'upload_response_form', :multipart => true do %> + <%= form_tag '', :id => 'upload_response_form', :multipart => true do %> <p> <label class="form_label" for="body"><% _('Response:')%></label> <%= text_area_tag :body, "", :rows => 10, :cols => 55 %> diff --git a/app/views/request_game/play.rhtml b/app/views/request_game/play.html.erb index d5aa0d00e..d5aa0d00e 100644 --- a/app/views/request_game/play.rhtml +++ b/app/views/request_game/play.html.erb diff --git a/app/views/request_mailer/comment_on_alert.rhtml b/app/views/request_mailer/comment_on_alert.text.erb index 691e6f9bb..691e6f9bb 100644 --- a/app/views/request_mailer/comment_on_alert.rhtml +++ b/app/views/request_mailer/comment_on_alert.text.erb diff --git a/app/views/request_mailer/comment_on_alert_plural.rhtml b/app/views/request_mailer/comment_on_alert_plural.text.erb index a495b8e08..a495b8e08 100644 --- a/app/views/request_mailer/comment_on_alert_plural.rhtml +++ b/app/views/request_mailer/comment_on_alert_plural.text.erb diff --git a/app/views/request_mailer/external_response.rhtml b/app/views/request_mailer/external_response.rhtml deleted file mode 100644 index 896054a43..000000000 --- a/app/views/request_mailer/external_response.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw @body %> diff --git a/app/views/request_mailer/external_response.text.erb b/app/views/request_mailer/external_response.text.erb new file mode 100644 index 000000000..fab256adf --- /dev/null +++ b/app/views/request_mailer/external_response.text.erb @@ -0,0 +1 @@ +<%= @message_body %> diff --git a/app/views/request_mailer/fake_response.rhtml b/app/views/request_mailer/fake_response.rhtml deleted file mode 100644 index 896054a43..000000000 --- a/app/views/request_mailer/fake_response.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw @body %> diff --git a/app/views/request_mailer/fake_response.text.erb b/app/views/request_mailer/fake_response.text.erb new file mode 100644 index 000000000..fab256adf --- /dev/null +++ b/app/views/request_mailer/fake_response.text.erb @@ -0,0 +1 @@ +<%= @message_body %> diff --git a/app/views/request_mailer/new_response.rhtml b/app/views/request_mailer/new_response.text.erb index 672212f20..672212f20 100644 --- a/app/views/request_mailer/new_response.rhtml +++ b/app/views/request_mailer/new_response.text.erb diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.text.erb index c196dafe6..c196dafe6 100644 --- a/app/views/request_mailer/new_response_reminder_alert.rhtml +++ b/app/views/request_mailer/new_response_reminder_alert.text.erb diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.text.erb index 2408452b3..2408452b3 100644 --- a/app/views/request_mailer/not_clarified_alert.rhtml +++ b/app/views/request_mailer/not_clarified_alert.text.erb diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.text.erb index 5b8534832..5b8534832 100644 --- a/app/views/request_mailer/old_unclassified_updated.rhtml +++ b/app/views/request_mailer/old_unclassified_updated.text.erb diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.text.erb index 249bf6bb8..249bf6bb8 100644 --- a/app/views/request_mailer/overdue_alert.rhtml +++ b/app/views/request_mailer/overdue_alert.text.erb diff --git a/app/views/request_mailer/requires_admin.rhtml b/app/views/request_mailer/requires_admin.text.erb index e7ab53c59..b2e58295e 100644 --- a/app/views/request_mailer/requires_admin.rhtml +++ b/app/views/request_mailer/requires_admin.text.erb @@ -1,3 +1,5 @@ +<%= raw @message %> + --------------------------------------------------------------------- <%= raw @reported_by.name %> <%= _('has reported an')%> <%= raw @info_request.law_used_short %> <%= _('response as needing administrator attention. Take a look, and reply to this diff --git a/app/views/request_mailer/stopped_responses.rhtml b/app/views/request_mailer/stopped_responses.text.erb index 9cd156860..9cd156860 100644 --- a/app/views/request_mailer/stopped_responses.rhtml +++ b/app/views/request_mailer/stopped_responses.text.erb diff --git a/app/views/request_mailer/very_overdue_alert.rhtml b/app/views/request_mailer/very_overdue_alert.text.erb index 80597473c..80597473c 100644 --- a/app/views/request_mailer/very_overdue_alert.rhtml +++ b/app/views/request_mailer/very_overdue_alert.text.erb diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.html.erb index d89c0e4a9..a16dbc78f 100644 --- a/app/views/track/_tracking_links.rhtml +++ b/app/views/track/_tracking_links.html.erb @@ -9,7 +9,7 @@ <% elsif existing_track %> <p><%= track_thing.params[:verb_on_page_already] %></p> <div class="feed_link feed_link_<%=location%>"> - <%= link_to _("Unsubscribe"), {:controller => 'track', :action => 'update', :track_id => existing_track.id, :track_medium => "delete", :r => request.request_uri}, :class => "link_button_green" %> + <%= link_to _("Unsubscribe"), {:controller => 'track', :action => 'update', :track_id => existing_track.id, :track_medium => "delete", :r => request.fullpath}, :class => "link_button_green" %> </div> <% elsif track_thing %> <div class="feed_link feed_link_<%=location%>"> diff --git a/app/views/track/atom_feed.atom.erb b/app/views/track/atom_feed.atom.erb index 23c932308..a12b9eff0 100644 --- a/app/views/track/atom_feed.atom.erb +++ b/app/views/track/atom_feed.atom.erb @@ -9,7 +9,7 @@ # Get the HTML content from the same partial template as website search does content = '' if result[:model].class.to_s == 'InfoRequestEvent' - content += render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } + content += render :partial => 'request/request_listing_via_event.html', :locals => { :event => result[:model], :info_request => result[:model].info_request } else content = "<p><strong>Unknown search result type " + result[:model].class.to_s + "</strong></p>" end diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.text.erb index 8dbc7fe06..8dbc7fe06 100644 --- a/app/views/track_mailer/event_digest.rhtml +++ b/app/views/track_mailer/event_digest.text.erb diff --git a/app/views/user/_change_receive_email.rhtml b/app/views/user/_change_receive_email.html.erb index 83e5d8601..12824f711 100644 --- a/app/views/user/_change_receive_email.rhtml +++ b/app/views/user/_change_receive_email.html.erb @@ -1,4 +1,4 @@ -<% form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> +<%= form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> <div> <% if @user.receive_email_alerts %> <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %><br><br> diff --git a/app/views/user/_show_user_info.rhtml b/app/views/user/_show_user_info.html.erb index 305300236..305300236 100644 --- a/app/views/user/_show_user_info.rhtml +++ b/app/views/user/_show_user_info.html.erb diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.html.erb index 7db07e4b4..afc55d249 100644 --- a/app/views/user/_signin.rhtml +++ b/app/views/user/_signin.html.erb @@ -1,6 +1,6 @@ <div id="signin"> -<% form_tag({:action => "signin"}, {:id => "signin_form"}) do %> +<%= form_tag({:action => "signin"}, {:id => "signin_form"}) do %> <%= foi_error_messages_for :user_signin %> <!--<% if not sign_in_as_existing_user %> diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.html.erb index 89ab19b7e..ec6541881 100644 --- a/app/views/user/_signup.rhtml +++ b/app/views/user/_signup.html.erb @@ -1,6 +1,6 @@ <div id="signup"> -<% form_tag({:action => "signup"}, {:id => "signup_form"}) do %> +<%= form_tag({:action => "signup"}, {:id => "signup_form"}) do %> <%= foi_error_messages_for :user_signup %> <!--<h2><%= _('If you\'re new to {{site_name}}', :site_name=>site_name)%></h2>--> @@ -10,8 +10,8 @@ <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %> </p> <div class="form_item_note"> - <%= raw(_('We will not reveal your email address to anybody unless you or - the law tell us to (<a href="%s">details</a>). ') %[help_privacy_path]) %> + <%= _('We will not reveal your email address to anybody unless you or + the law tell us to (<a href="{{url}}">details</a>). ', :url => help_privacy_path) %> </div> <p> @@ -19,11 +19,11 @@ <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70, :autocomplete => "off" } %> </p> <div class="form_item_note"> - <%= raw(_('Your <strong>name will appear publicly</strong> - (<a href="%s">why?</a>) + <%= _('Your <strong>name will appear publicly</strong> + (<a href="{{why_url}}">why?</a>) on this website and in search engines. If you - are thinking of using a pseudonym, please - <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"]) %> + are thinking of using a pseudonym, please + <a href="{{help_url}}">read this first</a>.', :why_url => (help_privacy_path+"#public_request").html_safe, :help_url => (help_privacy_path+"#real_name").html_safe) %> </div> <p> diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.html.erb index ed1b95718..ed1b95718 100644 --- a/app/views/user/_user_listing_single.rhtml +++ b/app/views/user/_user_listing_single.html.erb diff --git a/app/views/user/bad_token.rhtml b/app/views/user/bad_token.html.erb index 538bc5606..538bc5606 100644 --- a/app/views/user/bad_token.rhtml +++ b/app/views/user/bad_token.html.erb diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.html.erb index 475c10977..475c10977 100644 --- a/app/views/user/banned.rhtml +++ b/app/views/user/banned.html.erb diff --git a/app/views/user/confirm.rhtml b/app/views/user/confirm.html.erb index bc70a1f36..bc70a1f36 100644 --- a/app/views/user/confirm.rhtml +++ b/app/views/user/confirm.html.erb diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.html.erb index 333b72334..6d23dd1ed 100644 --- a/app/views/user/contact.rhtml +++ b/app/views/user/contact.html.erb @@ -6,7 +6,7 @@ <%= foi_error_messages_for :contact %> -<% form_for :contact do |f| %> +<%= form_for :contact do |f| %> <div class="form_note"> <h1><%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %></h1> diff --git a/app/views/user/no_cookies.rhtml b/app/views/user/no_cookies.html.erb index c291367f2..0a4a39b1b 100644 --- a/app/views/user/no_cookies.rhtml +++ b/app/views/user/no_cookies.html.erb @@ -12,11 +12,11 @@ browser. Then press refresh to have another go.')%></p> <p><%= _('If your browser is set to accept cookies and you are seeing this message, then there is probably a fault with our server.')%> -<%= raw(_('Please <a href="%s">get in touch</a> with us so we can fix it.') % [help_contact_path]) %> +<%= _('Please <a href="{{url}}">get in touch</a> with us so we can fix it.', :url => help_contact_path.html_safe) %> <%= _('Let us know what you were doing when this message appeared and your browser and operating system type and version.')%></p> -<p><%= raw(_('If you are still having trouble, please <a href="%s">contact us</a>.') % [help_contact_path]) %> +<p><%= _('If you are still having trouble, please <a href="{{url}}">contact us</a>.', :url => help_contact_path.html_safe) %> </p> diff --git a/app/views/user/rate_limited.rhtml b/app/views/user/rate_limited.html.erb index d52deebab..54a4e0461 100644 --- a/app/views/user/rate_limited.rhtml +++ b/app/views/user/rate_limited.html.erb @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<p><%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => Configuration::max_requests_per_user_per_day, :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%></p> +<p><%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => AlaveteliConfiguration::max_requests_per_user_per_day, :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%></p> <p><%= _("There is a limit on the number of requests you can make in a day, because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. If you feel you have a good reason to ask for the limit to be lifted in your case, please <a href='{{help_contact_path}}'>get in touch</a>.", :help_contact_path => help_contact_path) %></p> diff --git a/app/views/user/river.rhtml b/app/views/user/river.html.erb index 9618e0aa8..9618e0aa8 100644 --- a/app/views/user/river.rhtml +++ b/app/views/user/river.html.erb diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.html.erb index eed0304d2..0a22d36dc 100644 --- a/app/views/user/set_crop_profile_photo.rhtml +++ b/app/views/user/set_crop_profile_photo.html.erb @@ -9,7 +9,7 @@ <div id="set_crop_profile_photo"> -<% form_tag 'set_photo', :id => 'set_crop_profile_photo_form', :multipart => true do %> +<%= form_tag 'set_photo', :id => 'set_crop_profile_photo_form', :multipart => true do %> <table> <tr> @@ -37,7 +37,7 @@ <p> <%= hidden_field_tag 'submitted_crop_profile_photo', 1 %> - <%= submit_tag _("Done") + " >>" %> + <%= submit_tag _("Done >>") %> </p> <% end %> diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.html.erb index 757498249..b4bdd80f3 100644 --- a/app/views/user/set_draft_profile_photo.rhtml +++ b/app/views/user/set_draft_profile_photo.html.erb @@ -8,7 +8,7 @@ <div id="set_draft_profile_photo"> -<% form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> +<%= form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> <p> <label class="form_label" for="file_1"><%= _('Photo of you:')%></label> <%= file_field_tag :file, :size => 35, :id => 'file_1' %> @@ -45,7 +45,7 @@ <h2><%= _('OR remove the existing photo')%></h2> - <% form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> + <%= form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> <%= submit_tag _("Clear photo") %> <% end %> diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.html.erb index 4fe1047da..fb7de7e97 100644 --- a/app/views/user/set_profile_about_me.rhtml +++ b/app/views/user/set_profile_about_me.html.erb @@ -4,7 +4,7 @@ <%= foi_error_messages_for :about_me %> -<% form_for :about_me do |f| %> +<%= form_for :about_me do |f| %> <div class="form_note"> <h1><%= _('Edit text about you')%></h1> <p> @@ -26,7 +26,7 @@ <%= _(' Include relevant links, such as to a campaign page, your blog or a twitter account. They will be made clickable. e.g.')%> - <a href="https://twitter.com/<%= Configuration::twitter_username %>">https://twitter.com/<%= Configuration::twitter_username %></a> + <a href="https://twitter.com/<%= AlaveteliConfiguration::twitter_username %>">https://twitter.com/<%= AlaveteliConfiguration::twitter_username %></a> </p> </div> diff --git a/app/views/user/show.rhtml b/app/views/user/show.html.erb index a3dea619d..c9862effe 100644 --- a/app/views/user/show.rhtml +++ b/app/views/user/show.html.erb @@ -97,7 +97,7 @@ <% if not @is_you %> <p id="user_not_logged_in"> - <%= raw(_('<a href="%s">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.request_uri)]) %> + <%= _('<a href="{{url}}">Sign in</a> to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name), :url => signin_url(:r => request.fullpath).html_safe) %> </p> <% end %> </div> @@ -107,7 +107,7 @@ <% if @show_requests %> <div id="user_profile_search"> - <% form_tag(show_user_url, :method => "get", :id=>"search_form") do %> + <%= form_tag(show_user_url, :method => "get", :id=>"search_form") do %> <div> <%= text_field_tag(:user_query, params[:user_query], {:title => "type your search term here" }) %> <% if @is_you %> @@ -128,7 +128,7 @@ <% end %> <% else %> <h2 class="foi_results" id="foi_requests"> - <%= @is_you ? n_('Your %d Freedom of Information request', 'Your %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated.to_s : n_('This person\'s %d Freedom of Information request', 'This person\'s %d Freedom of Information requests', @xapian_requests.matches_estimated) % @xapian_requests.matches_estimated %> + <%= @is_you ? n_('Your {{count}} Freedom of Information request', 'Your {{count}} Freedom of Information requests', @xapian_requests.matches_estimated, :count => @xapian_requests.matches_estimated) : n_("This person's {{count}} Freedom of Information request", "This person's {{count}} Freedom of Information requests", @xapian_requests.matches_estimated, :count => @xapian_requests.matches_estimated) %> <!-- matches_estimated <%=@xapian_requests.matches_estimated%> --> <%= @match_phrase %> <%= @page_desc %> @@ -158,7 +158,7 @@ <% end %> <% else %> <h2 id="annotations"> - <%= @is_you ? n_('Your %d annotation', 'Your %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size : n_('This person\'s %d annotation', 'This person\'s %d annotations', @display_user.visible_comments.size) % @display_user.visible_comments.size %> + <%= @is_you ? n_('Your {{count}} annotation', 'Your {{count}} annotations', @display_user.visible_comments.size, :count => @display_user.visible_comments.size) : n_("This person's {{count}} annotation", "This person's {{count}} annotations", @display_user.visible_comments.size, :count => @display_user.visible_comments.size) %> <!-- matches_estimated <%=@xapian_comments.matches_estimated%> --> <%= @page_desc %> </h2> @@ -181,12 +181,12 @@ <p><%= _("You're not following anything.")%></p> <% else %> <% if @track_things_grouped.size == 1 %> - <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> + <%= form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> <h3> <%=TrackThing.track_type_description(@track_things[0].track_type)%> <%= hidden_field_tag 'track_type', @track_things[0].track_type %> <%= hidden_field_tag 'user', @display_user.id %> - <%= hidden_field_tag 'r', request.request_uri %> + <%= hidden_field_tag 'r', request.fullpath %> <% if @track_things.size > 1 %> <%= submit_tag _('unsubscribe all') %> <% end %> @@ -195,12 +195,12 @@ <% end %> <% for track_type, track_things in @track_things_grouped %> <% if @track_things_grouped.size > 1 %> - <% form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> + <%= form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> <h3> <%=TrackThing.track_type_description(track_type)%> <%= hidden_field_tag 'track_type', track_type %> <%= hidden_field_tag 'user', @display_user.id %> - <%= hidden_field_tag 'r', request.request_uri %> + <%= hidden_field_tag 'r', request.fullpath %> <% if track_things.size > 1 %> <%= submit_tag _('unsubscribe all')%> <% end %> @@ -211,11 +211,11 @@ <ul> <% for track_thing in track_things %> <li> - <% form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %> + <%= form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %> <div> <%= track_thing.params[:list_description] %> <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %> - <%= hidden_field_tag 'r', request.request_uri, { :id => 'r_' + track_thing.id.to_s } %> + <%= hidden_field_tag 'r', request.fullpath, { :id => 'r_' + track_thing.id.to_s } %> <%= submit_tag _('unsubscribe') %> </div> <% end %> diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.html.erb index 6a1979155..8291cdace 100644 --- a/app/views/user/sign.rhtml +++ b/app/views/user/sign.html.erb @@ -12,7 +12,9 @@ <% end %> </p> <% if @post_redirect.post_params["controller"] == "admin_general" %> - <p id="superuser_message">Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %></p> + <% unless AlaveteliConfiguration::disable_emergency_user %> + <p id="superuser_message">Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %></p> + <% end %> <% end %> <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => true } %> diff --git a/app/views/user/signchangeemail.rhtml b/app/views/user/signchangeemail.html.erb index 0f8b76bc5..7308179f4 100644 --- a/app/views/user/signchangeemail.rhtml +++ b/app/views/user/signchangeemail.html.erb @@ -4,7 +4,7 @@ <div id="change_email"> -<% form_tag({:action => "signchangeemail"}, {:id => "signchangeemail_form"}) do %> +<%= form_tag({:action => "signchangeemail"}, {:id => "signchangeemail_form"}) do %> <%= foi_error_messages_for :signchangeemail %> <div class="form_note"> diff --git a/app/views/user/signchangeemail_confirm.rhtml b/app/views/user/signchangeemail_confirm.html.erb index bfedbac2d..bfedbac2d 100644 --- a/app/views/user/signchangeemail_confirm.rhtml +++ b/app/views/user/signchangeemail_confirm.html.erb diff --git a/app/views/user/signchangepassword.rhtml b/app/views/user/signchangepassword.html.erb index edb980b9f..51bcb466d 100644 --- a/app/views/user/signchangepassword.rhtml +++ b/app/views/user/signchangepassword.html.erb @@ -4,7 +4,7 @@ <div id="change_password"> -<% form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> +<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> <%= foi_error_messages_for :user %> <div class="form_note"> diff --git a/app/views/user/signchangepassword_confirm.rhtml b/app/views/user/signchangepassword_confirm.html.erb index 63b6515cd..63b6515cd 100644 --- a/app/views/user/signchangepassword_confirm.rhtml +++ b/app/views/user/signchangepassword_confirm.html.erb diff --git a/app/views/user/signchangepassword_send_confirm.rhtml b/app/views/user/signchangepassword_send_confirm.html.erb index 84ee28f07..850237c34 100644 --- a/app/views/user/signchangepassword_send_confirm.rhtml +++ b/app/views/user/signchangepassword_send_confirm.html.erb @@ -2,7 +2,7 @@ <div id="change_password"> -<% form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> +<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> <%= foi_error_messages_for :signchangepassword %> <div class="form_note"> diff --git a/app/views/user/signin_successful.rhtml b/app/views/user/signin_successful.html.erb index 675701d74..675701d74 100644 --- a/app/views/user/signin_successful.rhtml +++ b/app/views/user/signin_successful.html.erb diff --git a/app/views/user/wall.rhtml b/app/views/user/wall.html.erb index 190cc0a6d..190cc0a6d 100644 --- a/app/views/user/wall.rhtml +++ b/app/views/user/wall.html.erb diff --git a/app/views/user/wrong_user.rhtml b/app/views/user/wrong_user.html.erb index 30256a639..30256a639 100644 --- a/app/views/user/wrong_user.rhtml +++ b/app/views/user/wrong_user.html.erb diff --git a/app/views/user/wrong_user_unknown_email.html.erb b/app/views/user/wrong_user_unknown_email.html.erb new file mode 100644 index 000000000..c1967fc1f --- /dev/null +++ b/app/views/user/wrong_user_unknown_email.html.erb @@ -0,0 +1,8 @@ + +<p id="sign_in_reason"> +<%= @reason_params[:web] %>. <%= _('Unfortunately we don\'t know the FOI +email address for that authority, so we can\'t validate this. +Please <a href="{{url}}">contact us</a> to sort it out.', :url => help_contact_path.html_safe) %> +</p> + + diff --git a/app/views/user/wrong_user_unknown_email.rhtml b/app/views/user/wrong_user_unknown_email.rhtml deleted file mode 100644 index c59c56941..000000000 --- a/app/views/user/wrong_user_unknown_email.rhtml +++ /dev/null @@ -1,8 +0,0 @@ - -<p id="sign_in_reason"> -<%= @reason_params[:web] %>. <%= raw(_('Unfortunately we don\'t know the FOI -email address for that authority, so we can\'t validate this. -Please <a href="%s">contact us</a> to sort it out.') % [help_contact_path]) %> -</p> - - diff --git a/app/views/user_mailer/already_registered.rhtml b/app/views/user_mailer/already_registered.text.erb index 32c2c7e63..32c2c7e63 100644 --- a/app/views/user_mailer/already_registered.rhtml +++ b/app/views/user_mailer/already_registered.text.erb diff --git a/app/views/user_mailer/changeemail_already_used.rhtml b/app/views/user_mailer/changeemail_already_used.text.erb index 1d74dda35..1d74dda35 100644 --- a/app/views/user_mailer/changeemail_already_used.rhtml +++ b/app/views/user_mailer/changeemail_already_used.text.erb diff --git a/app/views/user_mailer/changeemail_confirm.rhtml b/app/views/user_mailer/changeemail_confirm.text.erb index c73e9486b..c73e9486b 100644 --- a/app/views/user_mailer/changeemail_confirm.rhtml +++ b/app/views/user_mailer/changeemail_confirm.text.erb diff --git a/app/views/user_mailer/confirm_login.rhtml b/app/views/user_mailer/confirm_login.text.erb index fa86dc2b1..fa86dc2b1 100644 --- a/app/views/user_mailer/confirm_login.rhtml +++ b/app/views/user_mailer/confirm_login.text.erb |