From 835b51c1de0d49e652fe9c9a60f0974275de070c Mon Sep 17 00:00:00 2001 From: Henare Degan Date: Wed, 27 Feb 2013 10:34:47 +1100 Subject: Rename ALL THE TEMPLATES!!1!!!one!!1!! .rhtml is deprecated in favour of .erb in Rails 3 --- app/controllers/admin_request_controller.rb | 2 +- app/controllers/application_controller.rb | 2 +- app/controllers/request_controller.rb | 4 +- app/controllers/user_controller.rb | 8 +- app/mailers/outgoing_mailer.rb | 2 +- app/models/info_request_event.rb | 2 +- app/views/admin_censor_rule/_form.html.erb | 40 +++ app/views/admin_censor_rule/_form.rhtml | 40 --- app/views/admin_censor_rule/_show.html.erb | 39 +++ app/views/admin_censor_rule/_show.rhtml | 39 --- app/views/admin_censor_rule/edit.html.erb | 16 ++ app/views/admin_censor_rule/edit.rhtml | 16 -- app/views/admin_censor_rule/new.html.erb | 9 + app/views/admin_censor_rule/new.rhtml | 9 - app/views/admin_general/_admin_navbar.html.erb | 1 + app/views/admin_general/_admin_navbar.rhtml | 1 - app/views/admin_general/debug.html.erb | 52 ++++ app/views/admin_general/debug.rhtml | 52 ---- app/views/admin_general/index.html.erb | 109 ++++++++ app/views/admin_general/index.rhtml | 109 -------- app/views/admin_general/stats.html.erb | 38 +++ app/views/admin_general/stats.rhtml | 38 --- app/views/admin_general/timeline.html.erb | 99 +++++++ app/views/admin_general/timeline.rhtml | 99 ------- app/views/admin_public_body/_form.html.erb | 65 +++++ app/views/admin_public_body/_form.rhtml | 65 ----- .../admin_public_body/_locale_selector.html.erb | 10 + app/views/admin_public_body/_locale_selector.rhtml | 10 - app/views/admin_public_body/_one_list.html.erb | 29 ++ app/views/admin_public_body/_one_list.rhtml | 29 -- app/views/admin_public_body/_tag_help.html.erb | 18 ++ app/views/admin_public_body/_tag_help.rhtml | 18 -- app/views/admin_public_body/_tags.html.erb | 11 + app/views/admin_public_body/_tags.rhtml | 11 - app/views/admin_public_body/edit.html.erb | 30 +++ app/views/admin_public_body/edit.rhtml | 30 --- app/views/admin_public_body/import_csv.html.erb | 80 ++++++ app/views/admin_public_body/import_csv.rhtml | 80 ------ app/views/admin_public_body/list.html.erb | 40 +++ app/views/admin_public_body/list.rhtml | 40 --- .../admin_public_body/missing_scheme.html.erb | 11 + app/views/admin_public_body/missing_scheme.rhtml | 11 - app/views/admin_public_body/new.html.erb | 22 ++ app/views/admin_public_body/new.rhtml | 22 -- app/views/admin_public_body/show.html.erb | 83 ++++++ app/views/admin_public_body/show.rhtml | 83 ------ .../_incoming_message_actions.html.erb | 26 ++ .../admin_request/_incoming_message_actions.rhtml | 26 -- app/views/admin_request/_some_requests.html.erb | 31 +++ app/views/admin_request/_some_requests.rhtml | 31 --- app/views/admin_request/_tags.html.erb | 8 + app/views/admin_request/_tags.rhtml | 8 - app/views/admin_request/edit.html.erb | 63 +++++ app/views/admin_request/edit.rhtml | 63 ----- app/views/admin_request/edit_comment.html.erb | 22 ++ app/views/admin_request/edit_comment.rhtml | 22 -- app/views/admin_request/edit_outgoing.html.erb | 33 +++ app/views/admin_request/edit_outgoing.rhtml | 33 --- .../admin_request/hidden_user_explanation.html.erb | 9 + .../admin_request/hidden_user_explanation.rhtml | 9 - app/views/admin_request/list.html.erb | 15 ++ app/views/admin_request/list.rhtml | 15 -- .../admin_request/list_old_unclassified.html.erb | 16 ++ .../admin_request/list_old_unclassified.rhtml | 16 -- app/views/admin_request/show.html.erb | 230 ++++++++++++++++ app/views/admin_request/show.rhtml | 230 ---------------- app/views/admin_request/show_raw_email.html.erb | 37 +++ app/views/admin_request/show_raw_email.rhtml | 37 --- app/views/admin_track/_some_tracks.html.erb | 31 +++ app/views/admin_track/_some_tracks.rhtml | 31 --- app/views/admin_track/list.html.erb | 39 +++ app/views/admin_track/list.rhtml | 39 --- app/views/admin_user/_form.html.erb | 27 ++ app/views/admin_user/_form.rhtml | 27 -- app/views/admin_user/_user_table.html.erb | 22 ++ app/views/admin_user/_user_table.rhtml | 22 -- app/views/admin_user/edit.html.erb | 23 ++ app/views/admin_user/edit.rhtml | 23 -- app/views/admin_user/list.html.erb | 15 ++ app/views/admin_user/list.rhtml | 15 -- app/views/admin_user/list_banned.html.erb | 9 + app/views/admin_user/list_banned.rhtml | 9 - app/views/admin_user/show.html.erb | 74 ++++++ app/views/admin_user/show.rhtml | 74 ------ app/views/admin_user/show_bounce_message.html.erb | 3 + app/views/admin_user/show_bounce_message.rhtml | 3 - app/views/comment/_comment_form.html.erb | 19 ++ app/views/comment/_comment_form.rhtml | 19 -- app/views/comment/_single_comment.html.erb | 28 ++ app/views/comment/_single_comment.rhtml | 28 -- app/views/comment/new.html.erb | 77 ++++++ app/views/comment/new.rhtml | 77 ------ app/views/comment/preview.html.erb | 26 ++ app/views/comment/preview.rhtml | 26 -- .../contact_mailer/from_admin_message.html.erb | 2 + app/views/contact_mailer/from_admin_message.rhtml | 2 - app/views/contact_mailer/to_admin_message.html.erb | 11 + app/views/contact_mailer/to_admin_message.rhtml | 11 - app/views/contact_mailer/user_message.html.erb | 13 + app/views/contact_mailer/user_message.rhtml | 13 - app/views/general/_advanced_search_tips.html.erb | 49 ++++ app/views/general/_advanced_search_tips.rhtml | 49 ---- app/views/general/_before_body_end.html.erb | 1 + app/views/general/_before_body_end.rhtml | 1 - app/views/general/_before_head_end.html.erb | 1 + app/views/general/_before_head_end.rhtml | 1 - app/views/general/_credits.html.erb | 1 + app/views/general/_credits.rhtml | 1 - .../general/_custom_state_descriptions.html.erb | 1 + app/views/general/_custom_state_descriptions.rhtml | 1 - .../_custom_state_transitions_complete.html.erb | 0 .../_custom_state_transitions_complete.rhtml | 0 .../_custom_state_transitions_pending.html.erb | 0 .../_custom_state_transitions_pending.rhtml | 0 app/views/general/_footer.html.erb | 6 + app/views/general/_footer.rhtml | 6 - app/views/general/_frontpage_bodies_list.html.erb | 17 ++ app/views/general/_frontpage_bodies_list.rhtml | 17 -- .../general/_frontpage_intro_sentence.html.erb | 4 + app/views/general/_frontpage_intro_sentence.rhtml | 4 - app/views/general/_frontpage_new_request.html.erb | 7 + app/views/general/_frontpage_new_request.rhtml | 7 - .../general/_frontpage_requests_list.html.erb | 35 +++ app/views/general/_frontpage_requests_list.rhtml | 35 --- app/views/general/_frontpage_search_box.html.erb | 12 + app/views/general/_frontpage_search_box.rhtml | 12 - app/views/general/_locale_switcher.html.erb | 13 + app/views/general/_locale_switcher.rhtml | 13 - app/views/general/_localised_datepicker.html.erb | 18 ++ app/views/general/_localised_datepicker.rhtml | 18 -- app/views/general/_orglink.html.erb | 2 + app/views/general/_orglink.rhtml | 2 - app/views/general/_popup_banner.html.erb | 1 + app/views/general/_popup_banner.rhtml | 1 - app/views/general/_stylesheet_includes.html.erb | 21 ++ app/views/general/_stylesheet_includes.rhtml | 21 -- app/views/general/_topnav.html.erb | 10 + app/views/general/_topnav.rhtml | 10 - app/views/general/blog.html.erb | 44 ++++ app/views/general/blog.rhtml | 44 ---- app/views/general/custom_css.html.erb | 1 + app/views/general/custom_css.rhtml | 1 - app/views/general/exception_caught.html.erb | 24 ++ app/views/general/exception_caught.rhtml | 24 -- app/views/general/frontpage.html.erb | 19 ++ app/views/general/frontpage.rhtml | 19 -- app/views/general/search.html.erb | 210 +++++++++++++++ app/views/general/search.rhtml | 210 --------------- app/views/help/_sidebar.html.erb | 20 ++ app/views/help/_sidebar.rhtml | 20 -- .../help/_why_they_should_reply_by_email.html.erb | 3 + .../help/_why_they_should_reply_by_email.rhtml | 3 - app/views/help/about.html.erb | 53 ++++ app/views/help/about.rhtml | 53 ---- app/views/help/alaveteli.html.erb | 30 +++ app/views/help/alaveteli.rhtml | 30 --- app/views/help/api.html.erb | 81 ++++++ app/views/help/api.rhtml | 81 ------ app/views/help/contact.html.erb | 97 +++++++ app/views/help/contact.rhtml | 97 ------- app/views/help/credits.html.erb | 91 +++++++ app/views/help/credits.rhtml | 91 ------- app/views/help/officers.html.erb | 247 +++++++++++++++++ app/views/help/officers.rhtml | 247 ----------------- app/views/help/privacy.html.erb | 184 +++++++++++++ app/views/help/privacy.rhtml | 184 ------------- app/views/help/requesting.html.erb | 293 +++++++++++++++++++++ app/views/help/requesting.rhtml | 293 --------------------- app/views/help/unhappy.html.erb | 110 ++++++++ app/views/help/unhappy.rhtml | 110 -------- app/views/holiday/due_date.html.erb | 6 + app/views/holiday/due_date.rhtml | 6 - app/views/layouts/admin.html.erb | 39 +++ app/views/layouts/admin.rhtml | 39 --- app/views/layouts/contact_mailer.html.erb | 1 + app/views/layouts/contact_mailer.rhtml | 1 - app/views/layouts/default.html.erb | 156 +++++++++++ app/views/layouts/default.rhtml | 156 ----------- app/views/layouts/no_chrome.html.erb | 41 +++ app/views/layouts/no_chrome.rhtml | 41 --- app/views/layouts/outgoing_mailer.html.erb | 1 + app/views/layouts/outgoing_mailer.rhtml | 1 - app/views/layouts/request_mailer.html.erb | 1 + app/views/layouts/request_mailer.rhtml | 1 - app/views/layouts/user_mailer.html.erb | 1 + app/views/layouts/user_mailer.rhtml | 1 - .../outgoing_mailer/_followup_footer.html.erb | 4 + app/views/outgoing_mailer/_followup_footer.rhtml | 4 - app/views/outgoing_mailer/followup.html.erb | 10 + app/views/outgoing_mailer/followup.rhtml | 10 - app/views/outgoing_mailer/initial_request.html.erb | 13 + app/views/outgoing_mailer/initial_request.rhtml | 13 - app/views/public_body/_alphabet.html.erb | 3 + app/views/public_body/_alphabet.rhtml | 3 - app/views/public_body/_body_listing.html.erb | 9 + app/views/public_body/_body_listing.rhtml | 9 - .../public_body/_body_listing_single.html.erb | 31 +++ app/views/public_body/_body_listing_single.rhtml | 31 --- app/views/public_body/_list_sidebar_extra.html.erb | 6 + app/views/public_body/_list_sidebar_extra.rhtml | 6 - app/views/public_body/_search_ahead.html.erb | 21 ++ app/views/public_body/_search_ahead.rhtml | 21 -- app/views/public_body/list.html.erb | 47 ++++ app/views/public_body/list.rhtml | 47 ---- app/views/public_body/show.html.erb | 132 ++++++++++ app/views/public_body/show.rhtml | 132 ---------- app/views/public_body/view_email.html.erb | 46 ++++ app/views/public_body/view_email.rhtml | 46 ---- app/views/public_body/view_email_captcha.html.erb | 13 + app/views/public_body/view_email_captcha.rhtml | 13 - app/views/request/_after_actions.html.erb | 57 ++++ app/views/request/_after_actions.rhtml | 57 ---- app/views/request/_bubble.html.erb | 37 +++ app/views/request/_bubble.rhtml | 37 --- app/views/request/_correspondence.html.erb | 80 ++++++ app/views/request/_correspondence.rhtml | 80 ------ app/views/request/_describe_state.html.erb | 114 ++++++++ app/views/request/_describe_state.rhtml | 114 -------- app/views/request/_followup.html.erb | 140 ++++++++++ app/views/request/_followup.rhtml | 140 ---------- app/views/request/_hidden_correspondence.html.erb | 33 +++ app/views/request/_hidden_correspondence.rhtml | 33 --- app/views/request/_next_actions.html.erb | 1 + app/views/request/_next_actions.rhtml | 1 - app/views/request/_other_describe_state.html.erb | 81 ++++++ app/views/request/_other_describe_state.rhtml | 81 ------ app/views/request/_request_filter_form.html.erb | 54 ++++ app/views/request/_request_filter_form.rhtml | 54 ---- app/views/request/_request_listing.html.erb | 8 + app/views/request/_request_listing.rhtml | 8 - .../_request_listing_short_via_event.html.erb | 14 + .../request/_request_listing_short_via_event.rhtml | 14 - app/views/request/_request_listing_single.html.erb | 15 ++ app/views/request/_request_listing_single.rhtml | 15 -- .../request/_request_listing_via_event.html.erb | 48 ++++ app/views/request/_request_listing_via_event.rhtml | 48 ---- app/views/request/_search_ahead.html.erb | 14 + app/views/request/_search_ahead.rhtml | 14 - app/views/request/_sidebar.html.erb | 68 +++++ app/views/request/_sidebar.rhtml | 68 ----- .../request/_sidebar_request_listing.html.erb | 16 ++ app/views/request/_sidebar_request_listing.rhtml | 16 -- app/views/request/_summary_suggestion.html.erb | 5 + app/views/request/_summary_suggestion.rhtml | 5 - app/views/request/_view_html_prefix.html.erb | 12 + app/views/request/_view_html_prefix.rhtml | 12 - app/views/request/_view_html_stylesheet.html.erb | 1 + app/views/request/_view_html_stylesheet.rhtml | 1 - app/views/request/_wall_listing.html.erb | 30 +++ app/views/request/_wall_listing.rhtml | 30 --- app/views/request/details.html.erb | 60 +++++ app/views/request/details.rhtml | 60 ----- app/views/request/followup_bad.html.erb | 34 +++ app/views/request/followup_bad.rhtml | 34 --- app/views/request/followup_preview.html.erb | 56 ++++ app/views/request/followup_preview.rhtml | 56 ---- app/views/request/hidden.html.erb | 19 ++ app/views/request/hidden.rhtml | 19 -- app/views/request/list.html.erb | 34 +++ app/views/request/list.rhtml | 34 --- app/views/request/new.html.erb | 154 +++++++++++ app/views/request/new.rhtml | 154 ----------- app/views/request/new_bad_contact.html.erb | 10 + app/views/request/new_bad_contact.rhtml | 10 - app/views/request/new_please_describe.html.erb | 23 ++ app/views/request/new_please_describe.rhtml | 23 -- app/views/request/preview.html.erb | 48 ++++ app/views/request/preview.rhtml | 48 ---- app/views/request/select_authority.html.erb | 70 +++++ app/views/request/select_authority.rhtml | 70 ----- app/views/request/show.html.erb | 149 +++++++++++ app/views/request/show.rhtml | 149 ----------- app/views/request/show_response.html.erb | 81 ++++++ app/views/request/show_response.rhtml | 81 ------ app/views/request/similar.html.erb | 23 ++ app/views/request/similar.rhtml | 23 -- app/views/request/simple_correspondence.html.erb | 45 ++++ app/views/request/simple_correspondence.rhtml | 45 ---- app/views/request/upload_response.html.erb | 52 ++++ app/views/request/upload_response.rhtml | 52 ---- app/views/request_game/play.html.erb | 46 ++++ app/views/request_game/play.rhtml | 46 ---- app/views/request_mailer/comment_on_alert.html.erb | 6 + app/views/request_mailer/comment_on_alert.rhtml | 6 - .../comment_on_alert_plural.html.erb | 7 + .../request_mailer/comment_on_alert_plural.rhtml | 7 - .../request_mailer/external_response.html.erb | 1 + app/views/request_mailer/external_response.rhtml | 1 - app/views/request_mailer/fake_response.html.erb | 1 + app/views/request_mailer/fake_response.rhtml | 1 - app/views/request_mailer/new_response.html.erb | 17 ++ app/views/request_mailer/new_response.rhtml | 17 -- .../new_response_reminder_alert.html.erb | 10 + .../new_response_reminder_alert.rhtml | 10 - .../request_mailer/not_clarified_alert.html.erb | 11 + app/views/request_mailer/not_clarified_alert.rhtml | 11 - .../old_unclassified_updated.html.erb | 9 + .../request_mailer/old_unclassified_updated.rhtml | 9 - app/views/request_mailer/overdue_alert.html.erb | 11 + app/views/request_mailer/overdue_alert.rhtml | 11 - app/views/request_mailer/requires_admin.html.erb | 11 + app/views/request_mailer/requires_admin.rhtml | 11 - .../request_mailer/stopped_responses.html.erb | 20 ++ app/views/request_mailer/stopped_responses.rhtml | 20 -- .../request_mailer/very_overdue_alert.html.erb | 11 + app/views/request_mailer/very_overdue_alert.rhtml | 11 - app/views/track/_tracking_links.html.erb | 30 +++ app/views/track/_tracking_links.rhtml | 30 --- app/views/track_mailer/event_digest.html.erb | 66 +++++ app/views/track_mailer/event_digest.rhtml | 66 ----- app/views/user/_change_receive_email.html.erb | 16 ++ app/views/user/_change_receive_email.rhtml | 16 -- app/views/user/_show_user_info.html.erb | 20 ++ app/views/user/_show_user_info.rhtml | 20 -- app/views/user/_signin.html.erb | 36 +++ app/views/user/_signin.rhtml | 36 --- app/views/user/_signup.html.erb | 51 ++++ app/views/user/_signup.rhtml | 51 ---- app/views/user/_user_listing_single.html.erb | 24 ++ app/views/user/_user_listing_single.rhtml | 24 -- app/views/user/bad_token.html.erb | 17 ++ app/views/user/bad_token.rhtml | 17 -- app/views/user/banned.html.erb | 19 ++ app/views/user/banned.rhtml | 19 -- app/views/user/confirm.html.erb | 14 + app/views/user/confirm.rhtml | 14 - app/views/user/contact.html.erb | 45 ++++ app/views/user/contact.rhtml | 45 ---- app/views/user/no_cookies.html.erb | 22 ++ app/views/user/no_cookies.rhtml | 22 -- app/views/user/rate_limited.html.erb | 15 ++ app/views/user/rate_limited.rhtml | 15 -- app/views/user/river.html.erb | 12 + app/views/user/river.rhtml | 12 - app/views/user/set_crop_profile_photo.html.erb | 46 ++++ app/views/user/set_crop_profile_photo.rhtml | 46 ---- app/views/user/set_draft_profile_photo.html.erb | 58 ++++ app/views/user/set_draft_profile_photo.rhtml | 58 ---- app/views/user/set_profile_about_me.html.erb | 37 +++ app/views/user/set_profile_about_me.rhtml | 37 --- app/views/user/show.html.erb | 227 ++++++++++++++++ app/views/user/show.rhtml | 227 ---------------- app/views/user/sign.html.erb | 50 ++++ app/views/user/sign.rhtml | 50 ---- app/views/user/signchangeemail.html.erb | 41 +++ app/views/user/signchangeemail.rhtml | 41 --- app/views/user/signchangeemail_confirm.html.erb | 14 + app/views/user/signchangeemail_confirm.rhtml | 14 - app/views/user/signchangepassword.html.erb | 31 +++ app/views/user/signchangepassword.rhtml | 31 --- app/views/user/signchangepassword_confirm.html.erb | 13 + app/views/user/signchangepassword_confirm.rhtml | 13 - .../user/signchangepassword_send_confirm.html.erb | 30 +++ .../user/signchangepassword_send_confirm.rhtml | 30 --- app/views/user/signin_successful.html.erb | 11 + app/views/user/signin_successful.rhtml | 11 - app/views/user/wall.html.erb | 16 ++ app/views/user/wall.rhtml | 16 -- app/views/user/wrong_user.html.erb | 4 + app/views/user/wrong_user.rhtml | 4 - app/views/user/wrong_user_unknown_email.html.erb | 8 + app/views/user/wrong_user_unknown_email.rhtml | 8 - app/views/user_mailer/already_registered.html.erb | 11 + app/views/user_mailer/already_registered.rhtml | 11 - .../user_mailer/changeemail_already_used.html.erb | 10 + .../user_mailer/changeemail_already_used.rhtml | 10 - app/views/user_mailer/changeemail_confirm.html.erb | 13 + app/views/user_mailer/changeemail_confirm.rhtml | 13 - app/views/user_mailer/confirm_login.html.erb | 11 + app/views/user_mailer/confirm_login.rhtml | 11 - doc/THEMES.md | 14 +- spec/controllers/request_controller_spec.rb | 2 +- spec/views/public_body/show.html.erb_spec.rb | 119 +++++++++ spec/views/public_body/show.rhtml_spec.rb | 119 --------- spec/views/request/_after_actions.html.erb_spec.rb | 93 +++++++ spec/views/request/_after_actions.rhtml_spec.rb | 93 ------- .../views/request/_describe_state.html.erb_spec.rb | 173 ++++++++++++ spec/views/request/_describe_state.rhtml_spec.rb | 173 ------------ spec/views/request/list.html.erb_spec.rb | 49 ++++ spec/views/request/list.rhtml_spec.rb | 49 ---- spec/views/request/show.html.erb_spec.rb | 109 ++++++++ spec/views/request/show.rhtml_spec.rb | 109 -------- spec/views/request_game/play.html.erb_spec.rb | 37 +++ spec/views/request_game/play.rhtml_spec.rb | 37 --- 384 files changed, 7461 insertions(+), 7461 deletions(-) create mode 100644 app/views/admin_censor_rule/_form.html.erb delete mode 100644 app/views/admin_censor_rule/_form.rhtml create mode 100644 app/views/admin_censor_rule/_show.html.erb delete mode 100644 app/views/admin_censor_rule/_show.rhtml create mode 100644 app/views/admin_censor_rule/edit.html.erb delete mode 100644 app/views/admin_censor_rule/edit.rhtml create mode 100644 app/views/admin_censor_rule/new.html.erb delete mode 100644 app/views/admin_censor_rule/new.rhtml create mode 100644 app/views/admin_general/_admin_navbar.html.erb delete mode 100644 app/views/admin_general/_admin_navbar.rhtml create mode 100644 app/views/admin_general/debug.html.erb delete mode 100644 app/views/admin_general/debug.rhtml create mode 100644 app/views/admin_general/index.html.erb delete mode 100644 app/views/admin_general/index.rhtml create mode 100644 app/views/admin_general/stats.html.erb delete mode 100644 app/views/admin_general/stats.rhtml create mode 100644 app/views/admin_general/timeline.html.erb delete mode 100644 app/views/admin_general/timeline.rhtml create mode 100644 app/views/admin_public_body/_form.html.erb delete mode 100644 app/views/admin_public_body/_form.rhtml create mode 100644 app/views/admin_public_body/_locale_selector.html.erb delete mode 100644 app/views/admin_public_body/_locale_selector.rhtml create mode 100644 app/views/admin_public_body/_one_list.html.erb delete mode 100644 app/views/admin_public_body/_one_list.rhtml create mode 100644 app/views/admin_public_body/_tag_help.html.erb delete mode 100644 app/views/admin_public_body/_tag_help.rhtml create mode 100644 app/views/admin_public_body/_tags.html.erb delete mode 100644 app/views/admin_public_body/_tags.rhtml create mode 100644 app/views/admin_public_body/edit.html.erb delete mode 100644 app/views/admin_public_body/edit.rhtml create mode 100644 app/views/admin_public_body/import_csv.html.erb delete mode 100644 app/views/admin_public_body/import_csv.rhtml create mode 100644 app/views/admin_public_body/list.html.erb delete mode 100644 app/views/admin_public_body/list.rhtml create mode 100644 app/views/admin_public_body/missing_scheme.html.erb delete mode 100644 app/views/admin_public_body/missing_scheme.rhtml create mode 100644 app/views/admin_public_body/new.html.erb delete mode 100644 app/views/admin_public_body/new.rhtml create mode 100644 app/views/admin_public_body/show.html.erb delete mode 100644 app/views/admin_public_body/show.rhtml create mode 100644 app/views/admin_request/_incoming_message_actions.html.erb delete mode 100644 app/views/admin_request/_incoming_message_actions.rhtml create mode 100644 app/views/admin_request/_some_requests.html.erb delete mode 100644 app/views/admin_request/_some_requests.rhtml create mode 100644 app/views/admin_request/_tags.html.erb delete mode 100644 app/views/admin_request/_tags.rhtml create mode 100644 app/views/admin_request/edit.html.erb delete mode 100644 app/views/admin_request/edit.rhtml create mode 100644 app/views/admin_request/edit_comment.html.erb delete mode 100644 app/views/admin_request/edit_comment.rhtml create mode 100644 app/views/admin_request/edit_outgoing.html.erb delete mode 100644 app/views/admin_request/edit_outgoing.rhtml create mode 100644 app/views/admin_request/hidden_user_explanation.html.erb delete mode 100644 app/views/admin_request/hidden_user_explanation.rhtml create mode 100644 app/views/admin_request/list.html.erb delete mode 100644 app/views/admin_request/list.rhtml create mode 100644 app/views/admin_request/list_old_unclassified.html.erb delete mode 100644 app/views/admin_request/list_old_unclassified.rhtml create mode 100644 app/views/admin_request/show.html.erb delete mode 100644 app/views/admin_request/show.rhtml create mode 100644 app/views/admin_request/show_raw_email.html.erb delete mode 100644 app/views/admin_request/show_raw_email.rhtml create mode 100644 app/views/admin_track/_some_tracks.html.erb delete mode 100644 app/views/admin_track/_some_tracks.rhtml create mode 100644 app/views/admin_track/list.html.erb delete mode 100644 app/views/admin_track/list.rhtml create mode 100644 app/views/admin_user/_form.html.erb delete mode 100644 app/views/admin_user/_form.rhtml create mode 100644 app/views/admin_user/_user_table.html.erb delete mode 100644 app/views/admin_user/_user_table.rhtml create mode 100644 app/views/admin_user/edit.html.erb delete mode 100644 app/views/admin_user/edit.rhtml create mode 100644 app/views/admin_user/list.html.erb delete mode 100644 app/views/admin_user/list.rhtml create mode 100644 app/views/admin_user/list_banned.html.erb delete mode 100644 app/views/admin_user/list_banned.rhtml create mode 100644 app/views/admin_user/show.html.erb delete mode 100644 app/views/admin_user/show.rhtml create mode 100644 app/views/admin_user/show_bounce_message.html.erb delete mode 100644 app/views/admin_user/show_bounce_message.rhtml create mode 100644 app/views/comment/_comment_form.html.erb delete mode 100644 app/views/comment/_comment_form.rhtml create mode 100644 app/views/comment/_single_comment.html.erb delete mode 100644 app/views/comment/_single_comment.rhtml create mode 100644 app/views/comment/new.html.erb delete mode 100644 app/views/comment/new.rhtml create mode 100644 app/views/comment/preview.html.erb delete mode 100644 app/views/comment/preview.rhtml create mode 100644 app/views/contact_mailer/from_admin_message.html.erb delete mode 100644 app/views/contact_mailer/from_admin_message.rhtml create mode 100644 app/views/contact_mailer/to_admin_message.html.erb delete mode 100644 app/views/contact_mailer/to_admin_message.rhtml create mode 100644 app/views/contact_mailer/user_message.html.erb delete mode 100644 app/views/contact_mailer/user_message.rhtml create mode 100644 app/views/general/_advanced_search_tips.html.erb delete mode 100644 app/views/general/_advanced_search_tips.rhtml create mode 100644 app/views/general/_before_body_end.html.erb delete mode 100644 app/views/general/_before_body_end.rhtml create mode 100644 app/views/general/_before_head_end.html.erb delete mode 100644 app/views/general/_before_head_end.rhtml create mode 100644 app/views/general/_credits.html.erb delete mode 100644 app/views/general/_credits.rhtml create mode 100644 app/views/general/_custom_state_descriptions.html.erb delete mode 100644 app/views/general/_custom_state_descriptions.rhtml create mode 100644 app/views/general/_custom_state_transitions_complete.html.erb delete mode 100644 app/views/general/_custom_state_transitions_complete.rhtml create mode 100644 app/views/general/_custom_state_transitions_pending.html.erb delete mode 100644 app/views/general/_custom_state_transitions_pending.rhtml create mode 100644 app/views/general/_footer.html.erb delete mode 100644 app/views/general/_footer.rhtml create mode 100644 app/views/general/_frontpage_bodies_list.html.erb delete mode 100644 app/views/general/_frontpage_bodies_list.rhtml create mode 100644 app/views/general/_frontpage_intro_sentence.html.erb delete mode 100644 app/views/general/_frontpage_intro_sentence.rhtml create mode 100644 app/views/general/_frontpage_new_request.html.erb delete mode 100644 app/views/general/_frontpage_new_request.rhtml create mode 100644 app/views/general/_frontpage_requests_list.html.erb delete mode 100644 app/views/general/_frontpage_requests_list.rhtml create mode 100644 app/views/general/_frontpage_search_box.html.erb delete mode 100644 app/views/general/_frontpage_search_box.rhtml create mode 100644 app/views/general/_locale_switcher.html.erb delete mode 100644 app/views/general/_locale_switcher.rhtml create mode 100644 app/views/general/_localised_datepicker.html.erb delete mode 100644 app/views/general/_localised_datepicker.rhtml create mode 100644 app/views/general/_orglink.html.erb delete mode 100644 app/views/general/_orglink.rhtml create mode 100644 app/views/general/_popup_banner.html.erb delete mode 100644 app/views/general/_popup_banner.rhtml create mode 100644 app/views/general/_stylesheet_includes.html.erb delete mode 100644 app/views/general/_stylesheet_includes.rhtml create mode 100644 app/views/general/_topnav.html.erb delete mode 100644 app/views/general/_topnav.rhtml create mode 100644 app/views/general/blog.html.erb delete mode 100644 app/views/general/blog.rhtml create mode 100644 app/views/general/custom_css.html.erb delete mode 100644 app/views/general/custom_css.rhtml create mode 100644 app/views/general/exception_caught.html.erb delete mode 100644 app/views/general/exception_caught.rhtml create mode 100644 app/views/general/frontpage.html.erb delete mode 100644 app/views/general/frontpage.rhtml create mode 100644 app/views/general/search.html.erb delete mode 100644 app/views/general/search.rhtml create mode 100644 app/views/help/_sidebar.html.erb delete mode 100644 app/views/help/_sidebar.rhtml create mode 100644 app/views/help/_why_they_should_reply_by_email.html.erb delete mode 100644 app/views/help/_why_they_should_reply_by_email.rhtml create mode 100644 app/views/help/about.html.erb delete mode 100644 app/views/help/about.rhtml create mode 100644 app/views/help/alaveteli.html.erb delete mode 100644 app/views/help/alaveteli.rhtml create mode 100644 app/views/help/api.html.erb delete mode 100644 app/views/help/api.rhtml create mode 100644 app/views/help/contact.html.erb delete mode 100644 app/views/help/contact.rhtml create mode 100644 app/views/help/credits.html.erb delete mode 100644 app/views/help/credits.rhtml create mode 100644 app/views/help/officers.html.erb delete mode 100644 app/views/help/officers.rhtml create mode 100644 app/views/help/privacy.html.erb delete mode 100644 app/views/help/privacy.rhtml create mode 100644 app/views/help/requesting.html.erb delete mode 100644 app/views/help/requesting.rhtml create mode 100644 app/views/help/unhappy.html.erb delete mode 100644 app/views/help/unhappy.rhtml create mode 100644 app/views/holiday/due_date.html.erb delete mode 100644 app/views/holiday/due_date.rhtml create mode 100644 app/views/layouts/admin.html.erb delete mode 100644 app/views/layouts/admin.rhtml create mode 100644 app/views/layouts/contact_mailer.html.erb delete mode 100644 app/views/layouts/contact_mailer.rhtml create mode 100644 app/views/layouts/default.html.erb delete mode 100644 app/views/layouts/default.rhtml create mode 100644 app/views/layouts/no_chrome.html.erb delete mode 100644 app/views/layouts/no_chrome.rhtml create mode 100644 app/views/layouts/outgoing_mailer.html.erb delete mode 100644 app/views/layouts/outgoing_mailer.rhtml create mode 100644 app/views/layouts/request_mailer.html.erb delete mode 100644 app/views/layouts/request_mailer.rhtml create mode 100644 app/views/layouts/user_mailer.html.erb delete mode 100644 app/views/layouts/user_mailer.rhtml create mode 100644 app/views/outgoing_mailer/_followup_footer.html.erb delete mode 100644 app/views/outgoing_mailer/_followup_footer.rhtml create mode 100644 app/views/outgoing_mailer/followup.html.erb delete mode 100644 app/views/outgoing_mailer/followup.rhtml create mode 100644 app/views/outgoing_mailer/initial_request.html.erb delete mode 100644 app/views/outgoing_mailer/initial_request.rhtml create mode 100644 app/views/public_body/_alphabet.html.erb delete mode 100644 app/views/public_body/_alphabet.rhtml create mode 100644 app/views/public_body/_body_listing.html.erb delete mode 100644 app/views/public_body/_body_listing.rhtml create mode 100644 app/views/public_body/_body_listing_single.html.erb delete mode 100644 app/views/public_body/_body_listing_single.rhtml create mode 100644 app/views/public_body/_list_sidebar_extra.html.erb delete mode 100644 app/views/public_body/_list_sidebar_extra.rhtml create mode 100644 app/views/public_body/_search_ahead.html.erb delete mode 100644 app/views/public_body/_search_ahead.rhtml create mode 100644 app/views/public_body/list.html.erb delete mode 100644 app/views/public_body/list.rhtml create mode 100644 app/views/public_body/show.html.erb delete mode 100644 app/views/public_body/show.rhtml create mode 100644 app/views/public_body/view_email.html.erb delete mode 100644 app/views/public_body/view_email.rhtml create mode 100644 app/views/public_body/view_email_captcha.html.erb delete mode 100644 app/views/public_body/view_email_captcha.rhtml create mode 100644 app/views/request/_after_actions.html.erb delete mode 100644 app/views/request/_after_actions.rhtml create mode 100644 app/views/request/_bubble.html.erb delete mode 100644 app/views/request/_bubble.rhtml create mode 100644 app/views/request/_correspondence.html.erb delete mode 100644 app/views/request/_correspondence.rhtml create mode 100644 app/views/request/_describe_state.html.erb delete mode 100644 app/views/request/_describe_state.rhtml create mode 100644 app/views/request/_followup.html.erb delete mode 100644 app/views/request/_followup.rhtml create mode 100644 app/views/request/_hidden_correspondence.html.erb delete mode 100644 app/views/request/_hidden_correspondence.rhtml create mode 100644 app/views/request/_next_actions.html.erb delete mode 100644 app/views/request/_next_actions.rhtml create mode 100644 app/views/request/_other_describe_state.html.erb delete mode 100644 app/views/request/_other_describe_state.rhtml create mode 100644 app/views/request/_request_filter_form.html.erb delete mode 100644 app/views/request/_request_filter_form.rhtml create mode 100644 app/views/request/_request_listing.html.erb delete mode 100644 app/views/request/_request_listing.rhtml create mode 100644 app/views/request/_request_listing_short_via_event.html.erb delete mode 100644 app/views/request/_request_listing_short_via_event.rhtml create mode 100644 app/views/request/_request_listing_single.html.erb delete mode 100644 app/views/request/_request_listing_single.rhtml create mode 100644 app/views/request/_request_listing_via_event.html.erb delete mode 100644 app/views/request/_request_listing_via_event.rhtml create mode 100644 app/views/request/_search_ahead.html.erb delete mode 100644 app/views/request/_search_ahead.rhtml create mode 100644 app/views/request/_sidebar.html.erb delete mode 100644 app/views/request/_sidebar.rhtml create mode 100644 app/views/request/_sidebar_request_listing.html.erb delete mode 100644 app/views/request/_sidebar_request_listing.rhtml create mode 100644 app/views/request/_summary_suggestion.html.erb delete mode 100644 app/views/request/_summary_suggestion.rhtml create mode 100644 app/views/request/_view_html_prefix.html.erb delete mode 100644 app/views/request/_view_html_prefix.rhtml create mode 100644 app/views/request/_view_html_stylesheet.html.erb delete mode 100644 app/views/request/_view_html_stylesheet.rhtml create mode 100644 app/views/request/_wall_listing.html.erb delete mode 100644 app/views/request/_wall_listing.rhtml create mode 100644 app/views/request/details.html.erb delete mode 100644 app/views/request/details.rhtml create mode 100644 app/views/request/followup_bad.html.erb delete mode 100644 app/views/request/followup_bad.rhtml create mode 100644 app/views/request/followup_preview.html.erb delete mode 100644 app/views/request/followup_preview.rhtml create mode 100644 app/views/request/hidden.html.erb delete mode 100644 app/views/request/hidden.rhtml create mode 100644 app/views/request/list.html.erb delete mode 100644 app/views/request/list.rhtml create mode 100644 app/views/request/new.html.erb delete mode 100644 app/views/request/new.rhtml create mode 100644 app/views/request/new_bad_contact.html.erb delete mode 100644 app/views/request/new_bad_contact.rhtml create mode 100644 app/views/request/new_please_describe.html.erb delete mode 100644 app/views/request/new_please_describe.rhtml create mode 100644 app/views/request/preview.html.erb delete mode 100644 app/views/request/preview.rhtml create mode 100644 app/views/request/select_authority.html.erb delete mode 100644 app/views/request/select_authority.rhtml create mode 100644 app/views/request/show.html.erb delete mode 100644 app/views/request/show.rhtml create mode 100644 app/views/request/show_response.html.erb delete mode 100644 app/views/request/show_response.rhtml create mode 100644 app/views/request/similar.html.erb delete mode 100644 app/views/request/similar.rhtml create mode 100644 app/views/request/simple_correspondence.html.erb delete mode 100644 app/views/request/simple_correspondence.rhtml create mode 100644 app/views/request/upload_response.html.erb delete mode 100644 app/views/request/upload_response.rhtml create mode 100644 app/views/request_game/play.html.erb delete mode 100644 app/views/request_game/play.rhtml create mode 100644 app/views/request_mailer/comment_on_alert.html.erb delete mode 100644 app/views/request_mailer/comment_on_alert.rhtml create mode 100644 app/views/request_mailer/comment_on_alert_plural.html.erb delete mode 100644 app/views/request_mailer/comment_on_alert_plural.rhtml create mode 100644 app/views/request_mailer/external_response.html.erb delete mode 100644 app/views/request_mailer/external_response.rhtml create mode 100644 app/views/request_mailer/fake_response.html.erb delete mode 100644 app/views/request_mailer/fake_response.rhtml create mode 100644 app/views/request_mailer/new_response.html.erb delete mode 100644 app/views/request_mailer/new_response.rhtml create mode 100644 app/views/request_mailer/new_response_reminder_alert.html.erb delete mode 100644 app/views/request_mailer/new_response_reminder_alert.rhtml create mode 100644 app/views/request_mailer/not_clarified_alert.html.erb delete mode 100644 app/views/request_mailer/not_clarified_alert.rhtml create mode 100644 app/views/request_mailer/old_unclassified_updated.html.erb delete mode 100644 app/views/request_mailer/old_unclassified_updated.rhtml create mode 100644 app/views/request_mailer/overdue_alert.html.erb delete mode 100644 app/views/request_mailer/overdue_alert.rhtml create mode 100644 app/views/request_mailer/requires_admin.html.erb delete mode 100644 app/views/request_mailer/requires_admin.rhtml create mode 100644 app/views/request_mailer/stopped_responses.html.erb delete mode 100644 app/views/request_mailer/stopped_responses.rhtml create mode 100644 app/views/request_mailer/very_overdue_alert.html.erb delete mode 100644 app/views/request_mailer/very_overdue_alert.rhtml create mode 100644 app/views/track/_tracking_links.html.erb delete mode 100644 app/views/track/_tracking_links.rhtml create mode 100644 app/views/track_mailer/event_digest.html.erb delete mode 100644 app/views/track_mailer/event_digest.rhtml create mode 100644 app/views/user/_change_receive_email.html.erb delete mode 100644 app/views/user/_change_receive_email.rhtml create mode 100644 app/views/user/_show_user_info.html.erb delete mode 100644 app/views/user/_show_user_info.rhtml create mode 100644 app/views/user/_signin.html.erb delete mode 100644 app/views/user/_signin.rhtml create mode 100644 app/views/user/_signup.html.erb delete mode 100644 app/views/user/_signup.rhtml create mode 100644 app/views/user/_user_listing_single.html.erb delete mode 100644 app/views/user/_user_listing_single.rhtml create mode 100644 app/views/user/bad_token.html.erb delete mode 100644 app/views/user/bad_token.rhtml create mode 100644 app/views/user/banned.html.erb delete mode 100644 app/views/user/banned.rhtml create mode 100644 app/views/user/confirm.html.erb delete mode 100644 app/views/user/confirm.rhtml create mode 100644 app/views/user/contact.html.erb delete mode 100644 app/views/user/contact.rhtml create mode 100644 app/views/user/no_cookies.html.erb delete mode 100644 app/views/user/no_cookies.rhtml create mode 100644 app/views/user/rate_limited.html.erb delete mode 100644 app/views/user/rate_limited.rhtml create mode 100644 app/views/user/river.html.erb delete mode 100644 app/views/user/river.rhtml create mode 100644 app/views/user/set_crop_profile_photo.html.erb delete mode 100644 app/views/user/set_crop_profile_photo.rhtml create mode 100644 app/views/user/set_draft_profile_photo.html.erb delete mode 100644 app/views/user/set_draft_profile_photo.rhtml create mode 100644 app/views/user/set_profile_about_me.html.erb delete mode 100644 app/views/user/set_profile_about_me.rhtml create mode 100644 app/views/user/show.html.erb delete mode 100644 app/views/user/show.rhtml create mode 100644 app/views/user/sign.html.erb delete mode 100644 app/views/user/sign.rhtml create mode 100644 app/views/user/signchangeemail.html.erb delete mode 100644 app/views/user/signchangeemail.rhtml create mode 100644 app/views/user/signchangeemail_confirm.html.erb delete mode 100644 app/views/user/signchangeemail_confirm.rhtml create mode 100644 app/views/user/signchangepassword.html.erb delete mode 100644 app/views/user/signchangepassword.rhtml create mode 100644 app/views/user/signchangepassword_confirm.html.erb delete mode 100644 app/views/user/signchangepassword_confirm.rhtml create mode 100644 app/views/user/signchangepassword_send_confirm.html.erb delete mode 100644 app/views/user/signchangepassword_send_confirm.rhtml create mode 100644 app/views/user/signin_successful.html.erb delete mode 100644 app/views/user/signin_successful.rhtml create mode 100644 app/views/user/wall.html.erb delete mode 100644 app/views/user/wall.rhtml create mode 100644 app/views/user/wrong_user.html.erb delete mode 100644 app/views/user/wrong_user.rhtml create mode 100644 app/views/user/wrong_user_unknown_email.html.erb delete mode 100644 app/views/user/wrong_user_unknown_email.rhtml create mode 100644 app/views/user_mailer/already_registered.html.erb delete mode 100644 app/views/user_mailer/already_registered.rhtml create mode 100644 app/views/user_mailer/changeemail_already_used.html.erb delete mode 100644 app/views/user_mailer/changeemail_already_used.rhtml create mode 100644 app/views/user_mailer/changeemail_confirm.html.erb delete mode 100644 app/views/user_mailer/changeemail_confirm.rhtml create mode 100644 app/views/user_mailer/confirm_login.html.erb delete mode 100644 app/views/user_mailer/confirm_login.rhtml create mode 100644 spec/views/public_body/show.html.erb_spec.rb delete mode 100644 spec/views/public_body/show.rhtml_spec.rb create mode 100644 spec/views/request/_after_actions.html.erb_spec.rb delete mode 100644 spec/views/request/_after_actions.rhtml_spec.rb create mode 100644 spec/views/request/_describe_state.html.erb_spec.rb delete mode 100644 spec/views/request/_describe_state.rhtml_spec.rb create mode 100644 spec/views/request/list.html.erb_spec.rb delete mode 100644 spec/views/request/list.rhtml_spec.rb create mode 100644 spec/views/request/show.html.erb_spec.rb delete mode 100644 spec/views/request/show.rhtml_spec.rb create mode 100644 spec/views/request_game/play.html.erb_spec.rb delete mode 100644 spec/views/request_game/play.rhtml_spec.rb diff --git a/app/controllers/admin_request_controller.rb b/app/controllers/admin_request_controller.rb index 80dbd730c..45a898759 100644 --- a/app/controllers/admin_request_controller.rb +++ b/app/controllers/admin_request_controller.rb @@ -48,7 +48,7 @@ class AdminRequestController < AdminController :info_request => @info_request, :reason => params[:reason], :info_request_url => 'http://' + Configuration::domain + request_url(@info_request), :site_name => site_name) - template = File.read(File.join(File.dirname(__FILE__), "..", "views", "admin_request", "hidden_user_explanation.rhtml")) + template = File.read(File.join(File.dirname(__FILE__), "..", "views", "admin_request", "hidden_user_explanation.html.erb")) @request_hidden_user_explanation = ERB.new(template).result(vars.instance_eval { binding }) end diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2a2b29bfe..04fd0ed0e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -145,7 +145,7 @@ class ApplicationController < ActionController::Base @exception_backtrace = exception.backtrace.join("\n") @exception_class = exception.class.to_s @exception_message = exception.message - render :template => "general/exception_caught.rhtml", :status => @status + render :template => "general/exception_caught", :status => @status end # FIXME: This was disabled during the Rails 3 upgrade as this is now handled by Rack diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb index 0c51d278f..c8da8e845 100644 --- a/app/controllers/request_controller.rb +++ b/app/controllers/request_controller.rb @@ -893,7 +893,7 @@ class RequestController < ApplicationController # by making the last work a wildcard, which is quite the same query = params[:q] @xapian_requests = perform_search_typeahead(query, InfoRequestEvent) - render :partial => "request/search_ahead.rhtml" + render :partial => "request/search_ahead" end def download_entire_request @@ -941,7 +941,7 @@ class RequestController < ApplicationController end if !done @info_request_events = @info_request.info_request_events - template = File.read(File.join(File.dirname(__FILE__), "..", "views", "request", "simple_correspondence.rhtml")) + template = File.read(File.join(File.dirname(__FILE__), "..", "views", "request", "simple_correspondence.html.erb")) output = ERB.new(template).result(binding) zipfile.get_output_stream("correspondence.txt") { |f| f.puts(output) diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index d20308937..80c27ffd4 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -222,7 +222,7 @@ class UserController < ApplicationController post_redirect = PostRedirect.find_by_email_token(params[:email_token]) if post_redirect.nil? - render :template => 'user/bad_token.rhtml' + render :template => 'user/bad_token' return end @@ -465,7 +465,7 @@ class UserController < ApplicationController @draft_profile_photo = ProfilePhoto.new(:data => file_content, :draft => true) if !@draft_profile_photo.valid? # error page (uses @profile_photo's error fields in view to show errors) - render :template => 'user/set_draft_profile_photo.rhtml' + render :template => 'user/set_draft_profile_photo' return end @draft_profile_photo.save @@ -480,7 +480,7 @@ class UserController < ApplicationController return end - render :template => 'user/set_crop_profile_photo.rhtml' + render :template => 'user/set_crop_profile_photo' return elsif !params[:submitted_crop_profile_photo].nil? # crop the draft photo according to jquery parameters and set it as the users photo @@ -499,7 +499,7 @@ class UserController < ApplicationController redirect_to set_profile_about_me_url() end else - render :template => 'user/set_draft_profile_photo.rhtml' + render :template => 'user/set_draft_profile_photo' end end diff --git a/app/mailers/outgoing_mailer.rb b/app/mailers/outgoing_mailer.rb index cf1de1628..14277ae8b 100644 --- a/app/mailers/outgoing_mailer.rb +++ b/app/mailers/outgoing_mailer.rb @@ -35,7 +35,7 @@ class OutgoingMailer < ApplicationMailer :subject => OutgoingMailer.subject_for_followup(info_request, outgoing_message)) end - # XXX the condition checking valid_to_reply_to? also appears in views/request/_followup.rhtml, + # XXX the condition checking valid_to_reply_to? also appears in views/request/_followup.html.erb, # it shouldn't really, should call something here. # XXX also OutgoingMessage.get_salutation # XXX these look like they should be members of IncomingMessage, but logically they diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index 09eba31ab..bddd1db01 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -401,7 +401,7 @@ class InfoRequestEvent < ActiveRecord::Base :comment_id => self.comment_id, # XXX would be nice to add links here, but alas the - # code to make them is in views only. See views/request/details.rhtml + # code to make them is in views only. See views/request/details.html.erb # perhaps can call with @template somehow } diff --git a/app/views/admin_censor_rule/_form.html.erb b/app/views/admin_censor_rule/_form.html.erb new file mode 100644 index 000000000..ac43de704 --- /dev/null +++ b/app/views/admin_censor_rule/_form.html.erb @@ -0,0 +1,40 @@ +<%= error_messages_for 'censor_rule' %> + +

Applies to: + <% if !info_request.nil? %> + <%=request_both_links(info_request)%> request + <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %> + <% end %> + <% if !user.nil? %> + <%=user_both_links(user)%> user + <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %> + <% end %> +

+ +

(Leave unchecked if you are not sure about this)
+<%= check_box 'censor_rule', 'regexp' %>

+ +

(that you want to remove, case sensitive)
+<%= text_field 'censor_rule', 'text', :size => 60 %>

+ +

(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
+<%= text_field 'censor_rule', 'replacement', :size => 60 %>

+ +

(put purpose of the rule, and why the change)
+<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>

+ +

Warning and notes: This does replace text in binary files, but for +most formats only in a naive way. It works well on surprisingly many Word documents. Notably +it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code +which works on some PDFs. Please carefully check all attachments have +changed in the way you expect, and haven't become corrupted. +

+ +

You may need to manually rebuild the search index afterwards. You can redact +things by individual request or by user by adding the censor rule from the +appropriate page. If you need to redact across a whole +authority, it will be easy enough to make code changes to add it, so do ask. +

+

Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to. +

+ diff --git a/app/views/admin_censor_rule/_form.rhtml b/app/views/admin_censor_rule/_form.rhtml deleted file mode 100644 index ac43de704..000000000 --- a/app/views/admin_censor_rule/_form.rhtml +++ /dev/null @@ -1,40 +0,0 @@ -<%= error_messages_for 'censor_rule' %> - -

Applies to: - <% if !info_request.nil? %> - <%=request_both_links(info_request)%> request - <%= hidden_field 'censor_rule', 'info_request_id', { :value => info_request.id } %> - <% end %> - <% if !user.nil? %> - <%=user_both_links(user)%> user - <%= hidden_field 'censor_rule', 'user_id', { :value => user.id } %> - <% end %> -

- -

(Leave unchecked if you are not sure about this)
-<%= check_box 'censor_rule', 'regexp' %>

- -

(that you want to remove, case sensitive)
-<%= text_field 'censor_rule', 'text', :size => 60 %>

- -

(put it in [square brackets], e.g. [personal information removed]. applies to text in emails and HTML conversions of binaries; binaries themselves must stay the same length and the replacement is just a bunch of 'x's)
-<%= text_field 'censor_rule', 'replacement', :size => 60 %>

- -

(put purpose of the rule, and why the change)
-<%= text_area 'censor_rule', 'last_edit_comment', :rows => 2, :cols => 60 %>

- -

Warning and notes: This does replace text in binary files, but for -most formats only in a naive way. It works well on surprisingly many Word documents. Notably -it doesn't even do UCS-2 (unicode sometimes used in Word). There is also special code -which works on some PDFs. Please carefully check all attachments have -changed in the way you expect, and haven't become corrupted. -

- -

You may need to manually rebuild the search index afterwards. You can redact -things by individual request or by user by adding the censor rule from the -appropriate page. If you need to redact across a whole -authority, it will be easy enough to make code changes to add it, so do ask. -

-

Regexp rules that are hard to process will really slow down request display. Please only use regexps if you really need to. -

- diff --git a/app/views/admin_censor_rule/_show.html.erb b/app/views/admin_censor_rule/_show.html.erb new file mode 100644 index 000000000..363c3fb6f --- /dev/null +++ b/app/views/admin_censor_rule/_show.html.erb @@ -0,0 +1,39 @@ + +<% if censor_rules.size > 0 %> + + + + <% for column in CensorRule.content_columns %> + + <% end %> + + + + <% for censor_rule in censor_rules %> + + + <% for column in CensorRule.content_columns.map { |c| c.name } %> + + <% end %> + + + <% end %> +
Id<%= column.human_name %>Actions
<%=h censor_rule.id %><%=h censor_rule.send(column) %> + <%= link_to "Edit", '../../censor/edit/' + censor_rule.id.to_s %> +
+<% else %> +

None yet.

+<% end %> + +<% if defined? info_request %> +

+ <%= link_to "New censor rule", '../../censor/new?info_request_id=' + info_request.id.to_s %> (for this request only) +

+<% end %> + +<% if defined? user %> +

+ <%= link_to "New censor rule", '../../censor/new?user_id=' + user.id.to_s %> (for all requests by this user) +

+<% end %> + diff --git a/app/views/admin_censor_rule/_show.rhtml b/app/views/admin_censor_rule/_show.rhtml deleted file mode 100644 index 363c3fb6f..000000000 --- a/app/views/admin_censor_rule/_show.rhtml +++ /dev/null @@ -1,39 +0,0 @@ - -<% if censor_rules.size > 0 %> - - - - <% for column in CensorRule.content_columns %> - - <% end %> - - - - <% for censor_rule in censor_rules %> - - - <% for column in CensorRule.content_columns.map { |c| c.name } %> - - <% end %> - - - <% end %> -
Id<%= column.human_name %>Actions
<%=h censor_rule.id %><%=h censor_rule.send(column) %> - <%= link_to "Edit", '../../censor/edit/' + censor_rule.id.to_s %> -
-<% else %> -

None yet.

-<% end %> - -<% if defined? info_request %> -

- <%= link_to "New censor rule", '../../censor/new?info_request_id=' + info_request.id.to_s %> (for this request only) -

-<% end %> - -<% if defined? user %> -

- <%= link_to "New censor rule", '../../censor/new?user_id=' + user.id.to_s %> (for all requests by this user) -

-<% 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..844908418 --- /dev/null +++ b/app/views/admin_censor_rule/edit.html.erb @@ -0,0 +1,16 @@ +<% @title = 'Edit censor rule' %> + +

<%=@title%>

+ +<%= form_tag '../update/' + @censor_rule.id.to_s do %> + <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> +

<%= submit_tag 'Save', :accesskey => 's' %>

+<% end %> + +<%= form_tag('../destroy/' + @censor_rule.id.to_s) do %> +

+ <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> + Permanent! --> <%= submit_tag "Destroy rule" %> +

+<% end %> + diff --git a/app/views/admin_censor_rule/edit.rhtml b/app/views/admin_censor_rule/edit.rhtml deleted file mode 100644 index 844908418..000000000 --- a/app/views/admin_censor_rule/edit.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% @title = 'Edit censor rule' %> - -

<%=@title%>

- -<%= form_tag '../update/' + @censor_rule.id.to_s do %> - <%= render :partial => 'form', :locals => { :info_request => @censor_rule.info_request, :user => @censor_rule.user } %> -

<%= submit_tag 'Save', :accesskey => 's' %>

-<% end %> - -<%= form_tag('../destroy/' + @censor_rule.id.to_s) do %> -

- <%= hidden_field_tag(:censor_rule_id, @censor_rule.id) %> - Permanent! --> <%= submit_tag "Destroy rule" %> -

-<% end %> - diff --git a/app/views/admin_censor_rule/new.html.erb b/app/views/admin_censor_rule/new.html.erb new file mode 100644 index 000000000..ad3bf7e8e --- /dev/null +++ b/app/views/admin_censor_rule/new.html.erb @@ -0,0 +1,9 @@ +<% @title = 'New censor rule' %> + +

<%=@title%>

+ +<%= form_tag 'create' do %> + <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @user } %> +

<%= submit_tag "Create" %>

+<% end %> + diff --git a/app/views/admin_censor_rule/new.rhtml b/app/views/admin_censor_rule/new.rhtml deleted file mode 100644 index ad3bf7e8e..000000000 --- a/app/views/admin_censor_rule/new.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -<% @title = 'New censor rule' %> - -

<%=@title%>

- -<%= form_tag 'create' do %> - <%= render :partial => 'form', :locals => { :info_request => @info_request, :user => @user } %> -

<%= submit_tag "Create" %>

-<% end %> - diff --git a/app/views/admin_general/_admin_navbar.html.erb b/app/views/admin_general/_admin_navbar.html.erb new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/app/views/admin_general/_admin_navbar.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/admin_general/_admin_navbar.rhtml b/app/views/admin_general/_admin_navbar.rhtml deleted file mode 100644 index 8b1378917..000000000 --- a/app/views/admin_general/_admin_navbar.rhtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/admin_general/debug.html.erb b/app/views/admin_general/debug.html.erb new file mode 100644 index 000000000..b0749bedb --- /dev/null +++ b/app/views/admin_general/debug.html.erb @@ -0,0 +1,52 @@ +<% @title = "Debug" %> + +

<%=@title%>

+ +

You are <%= h @admin_current_user %>

+ +

Version numbers

+ +

+Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %> +
+Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %> +
+Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %> +
+RUBY_VERSION <%=h RUBY_VERSION %> +
+Rails::VERSION::STRING <%=h Rails::VERSION::STRING%> +
+TMail::VERSION::STRING <%=h TMail::VERSION::STRING%> +
+Xapian::version_string <%=h Xapian::version_string%> +

+ +

Configuration

+ +

environment: <%=h Rails::configuration.environment %> +
environment_path: <%=h Rails::configuration.environment_path %> +
framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %> +

+ +

Environment variables

+ +<% for k,v in @request_env %> + +<% end %> +
<%=h k%><%=h v%>
+ +

Parameters

+ +<% for k,v in params %> + +<% end %> +
<%=h k%><%=h v%>
+ +

Session

+ +<% for k,v in session %> + +<% end %> +
<%=h k%><%=h v%>
+ diff --git a/app/views/admin_general/debug.rhtml b/app/views/admin_general/debug.rhtml deleted file mode 100644 index b0749bedb..000000000 --- a/app/views/admin_general/debug.rhtml +++ /dev/null @@ -1,52 +0,0 @@ -<% @title = "Debug" %> - -

<%=@title%>

- -

You are <%= h @admin_current_user %>

- -

Version numbers

- -

-Alaveteli version: <%= link_to @current_version, @github_origin + @current_version %> -
-Alaveteli branch: <%= link_to @current_branch, @github_origin + @current_branch %> -
-Alaveteli commit: <%= link_to @current_commit, @github_origin + @current_commit %> -
-RUBY_VERSION <%=h RUBY_VERSION %> -
-Rails::VERSION::STRING <%=h Rails::VERSION::STRING%> -
-TMail::VERSION::STRING <%=h TMail::VERSION::STRING%> -
-Xapian::version_string <%=h Xapian::version_string%> -

- -

Configuration

- -

environment: <%=h Rails::configuration.environment %> -
environment_path: <%=h Rails::configuration.environment_path %> -
framework_paths: <%=h Rails::configuration.framework_paths.to_yaml %> -

- -

Environment variables

- -<% for k,v in @request_env %> - -<% end %> -
<%=h k%><%=h v%>
- -

Parameters

- -<% for k,v in params %> - -<% end %> -
<%=h k%><%=h v%>
- -

Session

- -<% for k,v in session %> - -<% end %> -
<%=h k%><%=h v%>
- diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb new file mode 100644 index 000000000..48bd7f694 --- /dev/null +++ b/app/views/admin_general/index.html.erb @@ -0,0 +1,109 @@ +<% @title = "Summary" %> + +

<%=@title%>

+ + + +
+ +

Things to do

+ +<% if @holding_pen_messages.size > 0 %> +

Put misdelivered responses with the right request (<%=@holding_pen_messages.size%> total)

+ + + +<% end %> + +<% if @error_message_requests.size > 0 %> +

Fix these delivery and other errors (<%=@error_message_requests.size%> total)

+ + +<% end %> + +<% if @attention_requests.size > 0 %> +

Review requests which have been marked as requiring your attention by users (<%=@error_message_requests.size%> total)

+ + +<% end %> + + +<% if @requires_admin_requests.size > 0 %> +

These require administrator attention (<%=@requires_admin_requests.size%> total)

+ + +<% end %> + +<% if @blank_contacts.size > 0 %> +

Find missing FOI email for these public authorities (try phoning!) (<%=@blank_contacts.size%> total)

+ +<% end %> + +<% if @old_unclassified.size > 0 %> +

Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

+ + + +

(<%= link_to "Full list", admin_url("unclassified") %>, or play public + <%= link_to "Categorisation game", main_url(play_url(:only_path => true)) %>) +

+<% end %> + +<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %> +

No pending administration required.

+<% end %> + + diff --git a/app/views/admin_general/index.rhtml b/app/views/admin_general/index.rhtml deleted file mode 100644 index 48bd7f694..000000000 --- a/app/views/admin_general/index.rhtml +++ /dev/null @@ -1,109 +0,0 @@ -<% @title = "Summary" %> - -

<%=@title%>

- - - -
- -

Things to do

- -<% if @holding_pen_messages.size > 0 %> -

Put misdelivered responses with the right request (<%=@holding_pen_messages.size%> total)

- - - -<% end %> - -<% if @error_message_requests.size > 0 %> -

Fix these delivery and other errors (<%=@error_message_requests.size%> total)

- - -<% end %> - -<% if @attention_requests.size > 0 %> -

Review requests which have been marked as requiring your attention by users (<%=@error_message_requests.size%> total)

- - -<% end %> - - -<% if @requires_admin_requests.size > 0 %> -

These require administrator attention (<%=@requires_admin_requests.size%> total)

- - -<% end %> - -<% if @blank_contacts.size > 0 %> -

Find missing FOI email for these public authorities (try phoning!) (<%=@blank_contacts.size%> total)

- -<% end %> - -<% if @old_unclassified.size > 0 %> -

Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response

- - - -

(<%= link_to "Full list", admin_url("unclassified") %>, or play public - <%= link_to "Categorisation game", main_url(play_url(:only_path => true)) %>) -

-<% end %> - -<% if @holding_pen_messages.size == 0 && @old_unclassified.size == 0 && @requires_admin_requests.size == 0 && @blank_contacts.size == 0 %> -

No pending administration required.

-<% end %> - - diff --git a/app/views/admin_general/stats.html.erb b/app/views/admin_general/stats.html.erb new file mode 100644 index 000000000..b22adb581 --- /dev/null +++ b/app/views/admin_general/stats.html.erb @@ -0,0 +1,38 @@ +<% @title = "Statistics" %> + +

Statistics

+ +

Chart of requests (excluding backpaged)

+ +

+ "> +

+ +

State of requests (includes backpaged)

+ + +<% for state, count in @request_by_state %> + +<% end %> +
<%=state %><%= count %>
+ +

Chart of users

+ +

+ "> +

+ +

Tracks by type

+ + +<% for state, count in @tracks_by_type %> + +<% end %> +
<%=state %><%= count %>
+ +

Web analytics

+ + +

+ + diff --git a/app/views/admin_general/stats.rhtml b/app/views/admin_general/stats.rhtml deleted file mode 100644 index b22adb581..000000000 --- a/app/views/admin_general/stats.rhtml +++ /dev/null @@ -1,38 +0,0 @@ -<% @title = "Statistics" %> - -

Statistics

- -

Chart of requests (excluding backpaged)

- -

- "> -

- -

State of requests (includes backpaged)

- - -<% for state, count in @request_by_state %> - -<% end %> -
<%=state %><%= count %>
- -

Chart of users

- -

- "> -

- -

Tracks by type

- - -<% for state, count in @tracks_by_type %> - -<% end %> -
<%=state %><%= count %>
- -

Web analytics

- - -

- - diff --git a/app/views/admin_general/timeline.html.erb b/app/views/admin_general/timeline.html.erb new file mode 100644 index 000000000..e84539970 --- /dev/null +++ b/app/views/admin_general/timeline.html.erb @@ -0,0 +1,99 @@ +<% @title = "Timeline" %> + +

<%=h @events_title%>

+ +

+Hour +| Day +| 2 days +| Week +| Month +| All time

+ +<% last_date = nil %> +<% for event, event_at in @events %> + <% if last_date != event_at.to_date %> + <% if last_date.nil? %> +

+ <% end %> +

<%= simple_date(event_at) %>

+

+ <% else %> +
+ <% end %> + <% last_date = event_at.to_date %> + + <%= simple_time(event_at) %> + + <% if event.is_a? InfoRequestEvent %> + <%= request_both_links(event.info_request) %> + <% if event.event_type == 'edit' %> + was edited by administrator <%=h event.params[:editor] %>. + <% for p in ['title', 'prominence', 'described_state', 'awaiting_description'] + if event.params[p.to_sym] != event.params[('old_'+p).to_sym] + %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% + end + end + %> + <% elsif event.event_type == 'edit_outgoing' %> + <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %> + had outgoing message edited by administrator <%=h event.params[:editor] %>. + <% if outgoing_message %> + <% for p in ['body'] + if event.params[p.to_sym] != event.params[('old_'+p).to_sym] + %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% + end + end + %> + <% else %> + Missing outgoing message, internal error. + <% end %> + <% elsif event.event_type == 'edit_comment' %> + <% comment = Comment.find(event.params[:comment_id].to_i) %> + had annotation edited by administrator <%=h event.params[:editor] %>. + <% if comment %> + <% for p in ['body'] + if event.params[p.to_sym] != event.params[('old_'+p).to_sym] + %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% + end + end + %> + <% else %> + Missing annotation, internal error. + <% end %> + <% elsif event.event_type == 'destroy_incoming' %> + had incoming message deleted by administrator <%=h event.params[:editor] %>. + <% elsif event.event_type == 'destroy_outgoing' %> + had outgoing message deleted by administrator <%=h event.params[:editor] %>. + <% elsif event.event_type == 'hide' %> + was hidden by administrator <%=h event.params[:editor] %>. + <% elsif event.event_type == 'redeliver_outgoing' %> + had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>. + <% elsif event.event_type == 'response' %> + <% incoming_message = event.incoming_message %> + received + <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %> + from <%=h event.info_request.public_body.name %>. + <% elsif event.event_type == 'sent' %> + was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>. + <% elsif event.event_type == 'resent' %> + had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>. + <% elsif event.event_type == 'followup_sent' %> + had a follow up message sent to <%=h event.info_request.public_body.name %>. + <% elsif event.event_type == 'comment' %> + had an annotation posted by <%=h event.comment.user.name %>. + <% elsif event.event_type == 'status_update' %> + had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. + <% else %> + had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. + <% end %> + <% else %> + <%= public_body_both_links(event.public_body) %> + was created/updated by administrator <%=h event.last_edit_editor %> + <% end %> +<% end %> +<% if not @events.empty? %> +

+<% end %> +<%= will_paginate(@events) %> + diff --git a/app/views/admin_general/timeline.rhtml b/app/views/admin_general/timeline.rhtml deleted file mode 100644 index e84539970..000000000 --- a/app/views/admin_general/timeline.rhtml +++ /dev/null @@ -1,99 +0,0 @@ -<% @title = "Timeline" %> - -

<%=h @events_title%>

- -

-Hour -| Day -| 2 days -| Week -| Month -| All time

- -<% last_date = nil %> -<% for event, event_at in @events %> - <% if last_date != event_at.to_date %> - <% if last_date.nil? %> -

- <% end %> -

<%= simple_date(event_at) %>

-

- <% else %> -
- <% end %> - <% last_date = event_at.to_date %> - - <%= simple_time(event_at) %> - - <% if event.is_a? InfoRequestEvent %> - <%= request_both_links(event.info_request) %> - <% if event.event_type == 'edit' %> - was edited by administrator <%=h event.params[:editor] %>. - <% for p in ['title', 'prominence', 'described_state', 'awaiting_description'] - if event.params[p.to_sym] != event.params[('old_'+p).to_sym] - %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% - end - end - %> - <% elsif event.event_type == 'edit_outgoing' %> - <% outgoing_message = OutgoingMessage.find(event.params[:outgoing_message_id].to_i) %> - had outgoing message edited by administrator <%=h event.params[:editor] %>. - <% if outgoing_message %> - <% for p in ['body'] - if event.params[p.to_sym] != event.params[('old_'+p).to_sym] - %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% - end - end - %> - <% else %> - Missing outgoing message, internal error. - <% end %> - <% elsif event.event_type == 'edit_comment' %> - <% comment = Comment.find(event.params[:comment_id].to_i) %> - had annotation edited by administrator <%=h event.params[:editor] %>. - <% if comment %> - <% for p in ['body'] - if event.params[p.to_sym] != event.params[('old_'+p).to_sym] - %> Changed <%=p%> from '<%=h event.params[('old_'+p).to_sym]%>' to '<%=h event.params[p.to_sym] %>'. <% - end - end - %> - <% else %> - Missing annotation, internal error. - <% end %> - <% elsif event.event_type == 'destroy_incoming' %> - had incoming message deleted by administrator <%=h event.params[:editor] %>. - <% elsif event.event_type == 'destroy_outgoing' %> - had outgoing message deleted by administrator <%=h event.params[:editor] %>. - <% elsif event.event_type == 'hide' %> - was hidden by administrator <%=h event.params[:editor] %>. - <% elsif event.event_type == 'redeliver_outgoing' %> - had incoming message redelivered to another request by administrator <%=h event.params[:editor] %>. - <% elsif event.event_type == 'response' %> - <% incoming_message = event.incoming_message %> - received - <%= link_to 'a response', main_url(incoming_message_url(incoming_message)) %> - from <%=h event.info_request.public_body.name %>. - <% elsif event.event_type == 'sent' %> - was initially sent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>. - <% elsif event.event_type == 'resent' %> - had the request resent to <%=h event.params[:email]%> at <%=h event.info_request.public_body.name %>. - <% elsif event.event_type == 'followup_sent' %> - had a follow up message sent to <%=h event.info_request.public_body.name %>. - <% elsif event.event_type == 'comment' %> - had an annotation posted by <%=h event.comment.user.name %>. - <% elsif event.event_type == 'status_update' %> - had its status updated by <%=h User.find(event.params[:user_id]).name %> from '<%= h event.params[:old_described_state] %>' to '<%= h event.params[:described_state] %>'. - <% else %> - had '<%=event.event_type%>' done to it, parameters <%=h event.params_yaml%>. - <% end %> - <% else %> - <%= public_body_both_links(event.public_body) %> - was created/updated by administrator <%=h event.last_edit_editor %> - <% end %> -<% end %> -<% if not @events.empty? %> -

-<% end %> -<%= will_paginate(@events) %> - diff --git a/app/views/admin_public_body/_form.html.erb b/app/views/admin_public_body/_form.html.erb new file mode 100644 index 000000000..7392b5bf3 --- /dev/null +++ b/app/views/admin_public_body/_form.html.erb @@ -0,0 +1,65 @@ +<%= error_messages_for 'public_body' %> + + + +
+ + +<% + for locale in I18n.available_locales do + if locale==I18n.default_locale # The default locale is submitted as part of the bigger object... + prefix = 'public_body' + object = @public_body + else # ...but additional locales go "on the side" + prefix = "public_body[translated_versions][]" + object = @public_body.new_record? ? + PublicBody::Translation.new : + @public_body.find_translation_by_locale(locale.to_s) || PublicBody::Translation.new + end + + fields_for prefix, object do |t| +%> +
+ <%= t.hidden_field :locale, :value => locale.to_s %> + +


+ <%= t.text_field :name, :size => 60, :id => form_tag_id(t.object_name, :name, locale) %>

+ +


+ <%= t.text_field :short_name, :size => 60, :id => form_tag_id(t.object_name, :short_name, locale) %>

+ +


+ <%= t.text_field :request_email, :size => 40, :id => form_tag_id(t.object_name, :request_email, locale) %>

+ +


+ <%= t.text_field :publication_scheme, :size => 60, :id => form_tag_id(t.object_name, :publication_scheme, locale) %>

+ +


+ <%= t.text_field :disclosure_log, :size => 60, :id => form_tag_id(t.object_name, :disclosure_log, locale) %>

+ +

(HTML, for users to consider when making FOI requests to the authority)
+ <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes, locale) %>

+
+<% + end + end +%> +
+ +

Common Fields

+ +


+ +<%= text_field :public_body, :tag_string, :size => 60, :id => 'public_body_tag_string' %>

+ +


+<%= text_field :public_body, :home_page, :size => 60, :id => 'public_body_home_page' %>

+ +

(put URL or other source of new info)
+<%= text_area :public_body, :last_edit_comment, :rows => 3, :cols => 60, :id => 'public_body_last_edit_comment' %>

+ + diff --git a/app/views/admin_public_body/_form.rhtml b/app/views/admin_public_body/_form.rhtml deleted file mode 100644 index 7392b5bf3..000000000 --- a/app/views/admin_public_body/_form.rhtml +++ /dev/null @@ -1,65 +0,0 @@ -<%= error_messages_for 'public_body' %> - - - -
- - -<% - for locale in I18n.available_locales do - if locale==I18n.default_locale # The default locale is submitted as part of the bigger object... - prefix = 'public_body' - object = @public_body - else # ...but additional locales go "on the side" - prefix = "public_body[translated_versions][]" - object = @public_body.new_record? ? - PublicBody::Translation.new : - @public_body.find_translation_by_locale(locale.to_s) || PublicBody::Translation.new - end - - fields_for prefix, object do |t| -%> -
- <%= t.hidden_field :locale, :value => locale.to_s %> - -


- <%= t.text_field :name, :size => 60, :id => form_tag_id(t.object_name, :name, locale) %>

- -


- <%= t.text_field :short_name, :size => 60, :id => form_tag_id(t.object_name, :short_name, locale) %>

- -


- <%= t.text_field :request_email, :size => 40, :id => form_tag_id(t.object_name, :request_email, locale) %>

- -


- <%= t.text_field :publication_scheme, :size => 60, :id => form_tag_id(t.object_name, :publication_scheme, locale) %>

- -


- <%= t.text_field :disclosure_log, :size => 60, :id => form_tag_id(t.object_name, :disclosure_log, locale) %>

- -

(HTML, for users to consider when making FOI requests to the authority)
- <%= t.text_area :notes, :rows => 3, :cols => 60, :id => form_tag_id(t.object_name, :notes, locale) %>

-
-<% - end - end -%> -
- -

Common Fields

- -


- -<%= text_field :public_body, :tag_string, :size => 60, :id => 'public_body_tag_string' %>

- -


-<%= text_field :public_body, :home_page, :size => 60, :id => 'public_body_home_page' %>

- -

(put URL or other source of new info)
-<%= text_area :public_body, :last_edit_comment, :rows => 3, :cols => 60, :id => 'public_body_last_edit_comment' %>

- - diff --git a/app/views/admin_public_body/_locale_selector.html.erb b/app/views/admin_public_body/_locale_selector.html.erb new file mode 100644 index 000000000..5ef79f2df --- /dev/null +++ b/app/views/admin_public_body/_locale_selector.html.erb @@ -0,0 +1,10 @@ +
+<%= _('Edit language version:') %> +<% for possible_locale in @locales %> + <% if possible_locale == @locale %> + <%= possible_locale %> + <% else %> + <%= possible_locale %> + <% end %> +<% end %> +
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 @@ -
-<%= _('Edit language version:') %> -<% for possible_locale in @locales %> - <% if possible_locale == @locale %> - <%= possible_locale %> - <% else %> - <%= possible_locale %> - <% end %> -<% end %> -
diff --git a/app/views/admin_public_body/_one_list.html.erb b/app/views/admin_public_body/_one_list.html.erb new file mode 100644 index 000000000..2925c5e33 --- /dev/null +++ b/app/views/admin_public_body/_one_list.html.erb @@ -0,0 +1,29 @@ + + + + + <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Name", "Last edit comment" ] %> + + <% end %> + +<% for public_body in bodies %> + + + + <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %> + + <% end %> + +<% end %> +
NameTags<%= column %>
<%= public_body_both_links(public_body) %><%= render :partial => 'tags', :locals => { :body => public_body} %><%=h public_body.send(column) %>
+ +<%= form_tag(admin_url("body/mass_tag_add"), :method => "post", :class => "forms_on_one_line" ) do %> +

+ <%= 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 } ) %> + <%= hidden_field_tag(:page, params[:page], { :id => "mass_add_page_" + table_name } ) %> + <%= hidden_field_tag(:table_name, table_name, { :id => "mass_add_tag_table_name_" + table_name } ) %> + <%= submit_tag "Add tag to all" %> (in table just above) +

+<% end %> + diff --git a/app/views/admin_public_body/_one_list.rhtml b/app/views/admin_public_body/_one_list.rhtml deleted file mode 100644 index 2925c5e33..000000000 --- a/app/views/admin_public_body/_one_list.rhtml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - <% for column in PublicBody.content_columns.map { |c| c.human_name } - [ "Name", "Last edit comment" ] %> - - <% end %> - -<% for public_body in bodies %> - - - - <% for column in PublicBody.content_columns.map { |c| c.name } - [ "name", "last_edit_comment" ] %> - - <% end %> - -<% end %> -
NameTags<%= column %>
<%= public_body_both_links(public_body) %><%= render :partial => 'tags', :locals => { :body => public_body} %><%=h public_body.send(column) %>
- -<%= form_tag(admin_url("body/mass_tag_add"), :method => "post", :class => "forms_on_one_line" ) do %> -

- <%= 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 } ) %> - <%= hidden_field_tag(:page, params[:page], { :id => "mass_add_page_" + table_name } ) %> - <%= hidden_field_tag(:table_name, table_name, { :id => "mass_add_tag_table_name_" + table_name } ) %> - <%= submit_tag "Add tag to all" %> (in table just above) -

-<% end %> - diff --git a/app/views/admin_public_body/_tag_help.html.erb b/app/views/admin_public_body/_tag_help.html.erb new file mode 100644 index 000000000..0d0f84dda --- /dev/null +++ b/app/views/admin_public_body/_tag_help.html.erb @@ -0,0 +1,18 @@ +
+

List of tags

+ <% first_row = true %> + <% for row in PublicBodyCategories::get().with_headings() %> + <% if row.instance_of?(Array) %> + <% if row[0] != 'other' %> + <%= row[0] %>=<%= row[1] %> +
+ <% end %> + <% elsif row != 'Miscellaneous' %> + <% if not first_row %> + <% else %> + <% first_row = false %> + <% end %> +

<%=h row%>

+ <% end %> + <% end %> +
\ No newline at end of file diff --git a/app/views/admin_public_body/_tag_help.rhtml b/app/views/admin_public_body/_tag_help.rhtml deleted file mode 100644 index 0d0f84dda..000000000 --- a/app/views/admin_public_body/_tag_help.rhtml +++ /dev/null @@ -1,18 +0,0 @@ -
-

List of tags

- <% first_row = true %> - <% for row in PublicBodyCategories::get().with_headings() %> - <% if row.instance_of?(Array) %> - <% if row[0] != 'other' %> - <%= row[0] %>=<%= row[1] %> -
- <% end %> - <% elsif row != 'Miscellaneous' %> - <% if not first_row %> - <% else %> - <% first_row = false %> - <% end %> -

<%=h row%>

- <% end %> - <% end %> -
\ No newline at end of file diff --git a/app/views/admin_public_body/_tags.html.erb b/app/views/admin_public_body/_tags.html.erb new file mode 100644 index 000000000..85dc942fd --- /dev/null +++ b/app/views/admin_public_body/_tags.html.erb @@ -0,0 +1,11 @@ +<% for t in body.tags %> + <% if t.value %> + <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>:<%= link_to(h(t.value), main_url(list_public_bodies_url(:tag => t.name_and_value, :only_path => true))) %> + <% else %> + <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %> + <% end %> + (admin) +<% end %> + + + diff --git a/app/views/admin_public_body/_tags.rhtml b/app/views/admin_public_body/_tags.rhtml deleted file mode 100644 index 85dc942fd..000000000 --- a/app/views/admin_public_body/_tags.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<% for t in body.tags %> - <% if t.value %> - <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %>:<%= link_to(h(t.value), main_url(list_public_bodies_url(:tag => t.name_and_value, :only_path => true))) %> - <% else %> - <%= link_to(h(t.name), main_url(list_public_bodies_url(:tag => t.name, :only_path => true))) %> - <% end %> - (admin) -<% end %> - - - diff --git a/app/views/admin_public_body/edit.html.erb b/app/views/admin_public_body/edit.html.erb new file mode 100644 index 000000000..5d85ae756 --- /dev/null +++ b/app/views/admin_public_body/edit.html.erb @@ -0,0 +1,30 @@ +

<%=@title%>

+ + + +<%= render :partial => 'tag_help' %> + +
+ <%= form_tag '../update/' + @public_body.id.to_s do %> + <%= render :partial => 'form' %> +

<%= submit_tag 'Save', :accesskey => 's' %>

+ <% end %> + +

+ <%= link_to 'Show', '../show/' + @public_body.id.to_s %> | + <%= link_to 'List all', '../list' %> +

+ + <% if @public_body.info_requests.size == 0 %> + <%= form_tag('../destroy/' + @public_body.id.to_s) do %> +

+ <%= hidden_field_tag(:public_body_id, { :value => @public_body.id } ) %> + <%= submit_tag "Destroy " + @public_body.name %> (this is permanent!) +

+ <% end %> + <% end %> +
diff --git a/app/views/admin_public_body/edit.rhtml b/app/views/admin_public_body/edit.rhtml deleted file mode 100644 index 5d85ae756..000000000 --- a/app/views/admin_public_body/edit.rhtml +++ /dev/null @@ -1,30 +0,0 @@ -

<%=@title%>

- - - -<%= render :partial => 'tag_help' %> - -
- <%= form_tag '../update/' + @public_body.id.to_s do %> - <%= render :partial => 'form' %> -

<%= submit_tag 'Save', :accesskey => 's' %>

- <% end %> - -

- <%= link_to 'Show', '../show/' + @public_body.id.to_s %> | - <%= link_to 'List all', '../list' %> -

- - <% if @public_body.info_requests.size == 0 %> - <%= form_tag('../destroy/' + @public_body.id.to_s) do %> -

- <%= hidden_field_tag(:public_body_id, { :value => @public_body.id } ) %> - <%= submit_tag "Destroy " + @public_body.name %> (this is permanent!) -

- <% end %> - <% end %> -
diff --git a/app/views/admin_public_body/import_csv.html.erb b/app/views/admin_public_body/import_csv.html.erb new file mode 100644 index 000000000..678758b23 --- /dev/null +++ b/app/views/admin_public_body/import_csv.html.erb @@ -0,0 +1,80 @@ +<% @title = "Upload CSV of public authorities" %> + +

<%=@title%>

+ +<% if not @notes.empty? %> +
<%=@notes %>
+<% end %> +<% if not @errors.empty? %> +
<%=@errors %>
+<% end %> + +<%= form_tag 'import_csv', :multipart => true do %> +

+ <% if @original_csv_file && @temporary_csv_file %> + CSV file: + <%= @original_csv_file %> + <%= hidden_field_tag :original_csv_file, @original_csv_file %> + <%= hidden_field_tag :temporary_csv_file, @temporary_csv_file %> + <%= link_to 'Clear current file', 'import_csv', :class => "btn btn-warning" %> + <% else %> + + <%= file_field_tag :csv_file, :size => 40 %> + <% end %> +

+ +

+ + <%= text_field_tag 'tag', params[:tag] %> +

+ +

+ + <%= select_tag 'tag_behaviour', + " + ".html_safe + %> +

+ +

CSV file format: A first row with the list of fields, + starting with '#', is optional but highly recommended. The fields 'name' + and 'request_email' are required; additionally, translated values are supported by + adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example: +

+ +
+

+ #id,name,request_email,name.es,tag_string
+ 1,An Authority,a@example.com,Un organismo,a_tag another_tag
+ 2,Another One,another@example.com,Otro organismo,a_tag
+

+

+ +

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n), + publication_scheme (i18n), disclosure_log (i18n), home_page, tag_string (tags separated by spaces).

+ +

Note: Choose dry run to test, without + actually altering the database. Choose upload to actually + make the changes. In either case, you will be shown any errors, or details + of the changes. When uploading, any changes since last import will be + overwritten - e.g. email addresses changed back. +

+ +

Note: The import tag will also be added to the imported bodies + if no tags are provided in the CSV file or if the import mode is set to + "Add new tags to existing ones". +

+ +

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

+<% end %> + +
+ +

Standard tags: + <% for category, description in PublicBodyCategories::get().by_tag() %> + <% if category != "other" %> + <%= category %>=<%= description %>; + <% end %> + <% end %> +

+ diff --git a/app/views/admin_public_body/import_csv.rhtml b/app/views/admin_public_body/import_csv.rhtml deleted file mode 100644 index 678758b23..000000000 --- a/app/views/admin_public_body/import_csv.rhtml +++ /dev/null @@ -1,80 +0,0 @@ -<% @title = "Upload CSV of public authorities" %> - -

<%=@title%>

- -<% if not @notes.empty? %> -
<%=@notes %>
-<% end %> -<% if not @errors.empty? %> -
<%=@errors %>
-<% end %> - -<%= form_tag 'import_csv', :multipart => true do %> -

- <% if @original_csv_file && @temporary_csv_file %> - CSV file: - <%= @original_csv_file %> - <%= hidden_field_tag :original_csv_file, @original_csv_file %> - <%= hidden_field_tag :temporary_csv_file, @temporary_csv_file %> - <%= link_to 'Clear current file', 'import_csv', :class => "btn btn-warning" %> - <% else %> - - <%= file_field_tag :csv_file, :size => 40 %> - <% end %> -

- -

- - <%= text_field_tag 'tag', params[:tag] %> -

- -

- - <%= select_tag 'tag_behaviour', - " - ".html_safe - %> -

- -

CSV file format: A first row with the list of fields, - starting with '#', is optional but highly recommended. The fields 'name' - and 'request_email' are required; additionally, translated values are supported by - adding the locale name to the field name, e.g. 'name.es', 'name.de'... Example: -

- -
-

- #id,name,request_email,name.es,tag_string
- 1,An Authority,a@example.com,Un organismo,a_tag another_tag
- 2,Another One,another@example.com,Otro organismo,a_tag
-

-

- -

Supported fields: name (i18n), short_name (i18n), request_email (i18n), notes (i18n), - publication_scheme (i18n), disclosure_log (i18n), home_page, tag_string (tags separated by spaces).

- -

Note: Choose dry run to test, without - actually altering the database. Choose upload to actually - make the changes. In either case, you will be shown any errors, or details - of the changes. When uploading, any changes since last import will be - overwritten - e.g. email addresses changed back. -

- -

Note: The import tag will also be added to the imported bodies - if no tags are provided in the CSV file or if the import mode is set to - "Add new tags to existing ones". -

- -

<%= submit_tag 'Dry run' %> <%= submit_tag 'Upload' %>

-<% end %> - -
- -

Standard tags: - <% for category, description in PublicBodyCategories::get().by_tag() %> - <% if category != "other" %> - <%= category %>=<%= description %>; - <% end %> - <% end %> -

- diff --git a/app/views/admin_public_body/list.html.erb b/app/views/admin_public_body/list.html.erb new file mode 100644 index 000000000..561944f9a --- /dev/null +++ b/app/views/admin_public_body/list.html.erb @@ -0,0 +1,40 @@ +<% if @query.nil? %> + <% @title = 'Listing public authorities' %> +<% else %> + <% @title = "Listing public authorities matching '" + @query + "'" %> +<% end %> + +

<%=@title%>

+ +

+ <% if !@query.nil? %> + <%= link_to 'Show all', 'list' %> | + <% end %> + <%= link_to 'New public authority', 'new' %> + | <%= link_to 'Import from CSV file', 'import_csv' %> +

+ +<%= form_tag("", :method => "get") do %> +

+ <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag "Search" %> (substring search in names and emails; exact match of tags) +

+<% end %> + + +<% if @public_bodies_by_tag.size > 0 %> +

Exact tag matches (<%= @public_bodies_by_tag.size %> total)

+ <%= render :partial => 'one_list', :locals => { :bodies => @public_bodies_by_tag, :table_name => 'exact' } %> +<% end %> + +<% if @public_bodies.size > 0 %> + <% if @query.nil? %> +

All authorities

+ <% else %> +

Substring search matches (<%= @public_bodies.total_entries %> total)

+ <% end %> + <%= render :partial => 'one_list', :locals => { :bodies => @public_bodies, :table_name => 'substring' } %> +<% end %> + +<%= will_paginate(@public_bodies) %> + diff --git a/app/views/admin_public_body/list.rhtml b/app/views/admin_public_body/list.rhtml deleted file mode 100644 index 561944f9a..000000000 --- a/app/views/admin_public_body/list.rhtml +++ /dev/null @@ -1,40 +0,0 @@ -<% if @query.nil? %> - <% @title = 'Listing public authorities' %> -<% else %> - <% @title = "Listing public authorities matching '" + @query + "'" %> -<% end %> - -

<%=@title%>

- -

- <% if !@query.nil? %> - <%= link_to 'Show all', 'list' %> | - <% end %> - <%= link_to 'New public authority', 'new' %> - | <%= link_to 'Import from CSV file', 'import_csv' %> -

- -<%= form_tag("", :method => "get") do %> -

- <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag "Search" %> (substring search in names and emails; exact match of tags) -

-<% end %> - - -<% if @public_bodies_by_tag.size > 0 %> -

Exact tag matches (<%= @public_bodies_by_tag.size %> total)

- <%= render :partial => 'one_list', :locals => { :bodies => @public_bodies_by_tag, :table_name => 'exact' } %> -<% end %> - -<% if @public_bodies.size > 0 %> - <% if @query.nil? %> -

All authorities

- <% else %> -

Substring search matches (<%= @public_bodies.total_entries %> total)

- <% end %> - <%= render :partial => 'one_list', :locals => { :bodies => @public_bodies, :table_name => 'substring' } %> -<% end %> - -<%= will_paginate(@public_bodies) %> - diff --git a/app/views/admin_public_body/missing_scheme.html.erb b/app/views/admin_public_body/missing_scheme.html.erb new file mode 100644 index 000000000..2ea55ae00 --- /dev/null +++ b/app/views/admin_public_body/missing_scheme.html.erb @@ -0,0 +1,11 @@ +<% @title = 'Popular authorities without Publication Scheme' %> + +

<%=@title%>

+

<%= @stats["entered"] %> of <%= @stats["total"] %> entered

+ +
    + <% for public_body in @public_bodies %> +
  1. <%= public_body_both_links(public_body) %>
  2. + <% end %> + + diff --git a/app/views/admin_public_body/missing_scheme.rhtml b/app/views/admin_public_body/missing_scheme.rhtml deleted file mode 100644 index 2ea55ae00..000000000 --- a/app/views/admin_public_body/missing_scheme.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<% @title = 'Popular authorities without Publication Scheme' %> - -

    <%=@title%>

    -

    <%= @stats["entered"] %> of <%= @stats["total"] %> entered

    - -
      - <% for public_body in @public_bodies %> -
    1. <%= public_body_both_links(public_body) %>
    2. - <% end %> - - diff --git a/app/views/admin_public_body/new.html.erb b/app/views/admin_public_body/new.html.erb new file mode 100644 index 000000000..9cfcf7db3 --- /dev/null +++ b/app/views/admin_public_body/new.html.erb @@ -0,0 +1,22 @@ +<% @title = 'New public authority' %> + +

      <%=@title%>

      + + + +<%= render :partial => 'tag_help' %> + +
      + <%= form_tag './create/' + @public_body.id.to_s do %> + <%= render :partial => 'form' %> +

      <%= submit_tag "Create" %>

      + <% end %> + +

      + <%= link_to 'List all', 'list' %> +

      +
      diff --git a/app/views/admin_public_body/new.rhtml b/app/views/admin_public_body/new.rhtml deleted file mode 100644 index 9cfcf7db3..000000000 --- a/app/views/admin_public_body/new.rhtml +++ /dev/null @@ -1,22 +0,0 @@ -<% @title = 'New public authority' %> - -

      <%=@title%>

      - - - -<%= render :partial => 'tag_help' %> - -
      - <%= form_tag './create/' + @public_body.id.to_s do %> - <%= render :partial => 'form' %> -

      <%= submit_tag "Create" %>

      - <% end %> - -

      - <%= link_to 'List all', 'list' %> -

      -
      diff --git a/app/views/admin_public_body/show.html.erb b/app/views/admin_public_body/show.html.erb new file mode 100644 index 000000000..cee306988 --- /dev/null +++ b/app/views/admin_public_body/show.html.erb @@ -0,0 +1,83 @@ +<% @title = "Public authority - " + h(@public_body.name) %> + +

      <%=@title%>

      + +

      +<% + columns = PublicBody.content_columns + [] # force dup + columns.delete_if {|c| ['last_edit_comment'].include?(c.name)} + + for column in columns %> + <%= column.human_name %>: + <% if ['home_page', 'publication_scheme', 'disclosure_log'].include? column.name %> + <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name)) %> + <% elsif column.name == 'request_email' %> + <%= link_to(h(@public_body.send(column.name)), "mailto:#{@public_body.send(column.name)}") %> + <% if !@public_body.is_requestable? %> + (not requestable due to: <%=h @public_body.not_requestable_reason %><% if @public_body.is_followupable? %>; but followupable<% end %>) + <% end %> + <% else %> + <%=h @public_body.send(column.name) %> + <% end %> +
      +<% end %> +Calculated home page: +<% if !@public_body.calculated_home_page.nil? %> + <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %> +<% else %> + *unknown* +<% end %> +
      Tags: <%= render :partial => 'tags', :locals => { :body => @public_body} %> +
      +

      + +

      + <%= + # url_name can be missing if the name hasn't been set for this locale + if !@public_body.url_name.nil? + link_to 'Public page', main_url(public_body_url(@public_body)) + else + 'Public page not available' + end + %> + | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %> +

      + +

      History

      + + + +<% + history_columns = PublicBody.content_columns + [] # force dup + history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter', 'api_key'].include?(c.name)} + for column in history_columns %> + +<% end %> + +<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %> +<% for historic_public_body in @public_body.reverse_sorted_versions %> + + + <% for column in history_columns %> + <% + value = h(historic_public_body.send(column.name)) + if column.name == 'last_edit_comment' + value = historic_public_body.last_edit_comment_for_html_display + end + # Highlight entries which have changed since previous version + changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %> + + <% end %> + +<% end %> +
      Updated at<%= column.human_name %>
      <%=h historic_public_body.updated_at %> > + <%=value%> +
      + +

      Requests

      +<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %> + +

      Track things

      +<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %> + + diff --git a/app/views/admin_public_body/show.rhtml b/app/views/admin_public_body/show.rhtml deleted file mode 100644 index cee306988..000000000 --- a/app/views/admin_public_body/show.rhtml +++ /dev/null @@ -1,83 +0,0 @@ -<% @title = "Public authority - " + h(@public_body.name) %> - -

      <%=@title%>

      - -

      -<% - columns = PublicBody.content_columns + [] # force dup - columns.delete_if {|c| ['last_edit_comment'].include?(c.name)} - - for column in columns %> - <%= column.human_name %>: - <% if ['home_page', 'publication_scheme', 'disclosure_log'].include? column.name %> - <%= link_to(h(@public_body.send(column.name)), @public_body.send(column.name)) %> - <% elsif column.name == 'request_email' %> - <%= link_to(h(@public_body.send(column.name)), "mailto:#{@public_body.send(column.name)}") %> - <% if !@public_body.is_requestable? %> - (not requestable due to: <%=h @public_body.not_requestable_reason %><% if @public_body.is_followupable? %>; but followupable<% end %>) - <% end %> - <% else %> - <%=h @public_body.send(column.name) %> - <% end %> -
      -<% end %> -Calculated home page: -<% if !@public_body.calculated_home_page.nil? %> - <%= link_to(h(@public_body.calculated_home_page), @public_body.calculated_home_page) %> -<% else %> - *unknown* -<% end %> -
      Tags: <%= render :partial => 'tags', :locals => { :body => @public_body} %> -
      -

      - -

      - <%= - # url_name can be missing if the name hasn't been set for this locale - if !@public_body.url_name.nil? - link_to 'Public page', main_url(public_body_url(@public_body)) - else - 'Public page not available' - end - %> - | <%= link_to 'Edit', '../edit/' + @public_body.id.to_s %> -

      - -

      History

      - - - -<% - history_columns = PublicBody.content_columns + [] # force dup - history_columns.delete_if {|c| ['created_at', 'updated_at', 'first_letter', 'api_key'].include?(c.name)} - for column in history_columns %> - -<% end %> - -<%# There may be an option to versions() to specify order, but I can't find it. TB 2009-03-09 %> -<% for historic_public_body in @public_body.reverse_sorted_versions %> - - - <% for column in history_columns %> - <% - value = h(historic_public_body.send(column.name)) - if column.name == 'last_edit_comment' - value = historic_public_body.last_edit_comment_for_html_display - end - # Highlight entries which have changed since previous version - changed = (!['version', 'last_edit_editor', 'last_edit_comment'].include?(column.name)) && ((historic_public_body.send(column.name) != @public_body.sorted_versions[historic_public_body.version - 2].send(column.name)) || (historic_public_body.version == 1)) %> - - <% end %> - -<% end %> -
      Updated at<%= column.human_name %>
      <%=h historic_public_body.updated_at %> > - <%=value%> -
      - -

      Requests

      -<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @public_body.info_requests } %> - -

      Track things

      -<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @public_body.track_things } %> - - diff --git a/app/views/admin_request/_incoming_message_actions.html.erb b/app/views/admin_request/_incoming_message_actions.html.erb new file mode 100644 index 000000000..3090185e2 --- /dev/null +++ b/app/views/admin_request/_incoming_message_actions.html.erb @@ -0,0 +1,26 @@ +<%= form_tag '../redeliver_incoming' do %> +
      + id or url_title of request (or a list of requests, comma-separated): + <% if @info_requests && @info_requests.size == 1 %> + <%= text_field_tag 'url_title', @info_requests[0].url_title, { :size => 20 } %> + <% else %> + <%= text_field_tag 'url_title', "", { :size => 20 } %> + <% end %> + <%= hidden_field_tag 'redeliver_incoming_message_id', incoming_message.id %> + <%= submit_tag "Redeliver to another request" %> +
      +<% end %> + +

      +<%= link_to 'FOI officer upload URL', '../generate_upload_url/' + incoming_message.info_request.id.to_s + "?incoming_message_id=" + incoming_message.id.to_s %> +

      + +<%= form_tag '../destroy_incoming' do %> +
      + <%= hidden_field_tag 'incoming_message_id', incoming_message.id %> + Warning, this is permanent! ---> + <%= submit_tag "Destroy message" %> +
      +<% end %> + + diff --git a/app/views/admin_request/_incoming_message_actions.rhtml b/app/views/admin_request/_incoming_message_actions.rhtml deleted file mode 100644 index 3090185e2..000000000 --- a/app/views/admin_request/_incoming_message_actions.rhtml +++ /dev/null @@ -1,26 +0,0 @@ -<%= form_tag '../redeliver_incoming' do %> -
      - id or url_title of request (or a list of requests, comma-separated): - <% if @info_requests && @info_requests.size == 1 %> - <%= text_field_tag 'url_title', @info_requests[0].url_title, { :size => 20 } %> - <% else %> - <%= text_field_tag 'url_title', "", { :size => 20 } %> - <% end %> - <%= hidden_field_tag 'redeliver_incoming_message_id', incoming_message.id %> - <%= submit_tag "Redeliver to another request" %> -
      -<% end %> - -

      -<%= link_to 'FOI officer upload URL', '../generate_upload_url/' + incoming_message.info_request.id.to_s + "?incoming_message_id=" + incoming_message.id.to_s %> -

      - -<%= form_tag '../destroy_incoming' do %> -
      - <%= hidden_field_tag 'incoming_message_id', incoming_message.id %> - Warning, this is permanent! ---> - <%= submit_tag "Destroy message" %> -
      -<% end %> - - diff --git a/app/views/admin_request/_some_requests.html.erb b/app/views/admin_request/_some_requests.html.erb new file mode 100644 index 000000000..dc11e0f55 --- /dev/null +++ b/app/views/admin_request/_some_requests.html.erb @@ -0,0 +1,31 @@ + + + + + + <% for column in InfoRequest.content_columns.map { |c| c.human_name } - [ "Url title", "Title" ] %> + + <% end %> + + +<% for info_request in info_requests %> + + + + <% if info_request.is_external? %> + <% if info_request.external_user_name.nil? %> + + <% else %> + + <% end %> + <% else %> + + <% end %> + <% for column in InfoRequest.content_columns.map { |c| c.name } - [ "title", "url_title" ] %> + + <% end %> + +<% end %> +
      TitleAuthorityUser<%= column %>
      <%= request_both_links(info_request) %><%= public_body_both_links(info_request.public_body) %><%= _("Anonymous user") %><%= h(info_request.external_user_name) %><%= user_both_links(info_request.user) %><%=h info_request.send(column) %>
      + + diff --git a/app/views/admin_request/_some_requests.rhtml b/app/views/admin_request/_some_requests.rhtml deleted file mode 100644 index dc11e0f55..000000000 --- a/app/views/admin_request/_some_requests.rhtml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - <% for column in InfoRequest.content_columns.map { |c| c.human_name } - [ "Url title", "Title" ] %> - - <% end %> - - -<% for info_request in info_requests %> - - - - <% if info_request.is_external? %> - <% if info_request.external_user_name.nil? %> - - <% else %> - - <% end %> - <% else %> - - <% end %> - <% for column in InfoRequest.content_columns.map { |c| c.name } - [ "title", "url_title" ] %> - - <% end %> - -<% end %> -
      TitleAuthorityUser<%= column %>
      <%= request_both_links(info_request) %><%= public_body_both_links(info_request.public_body) %><%= _("Anonymous user") %><%= h(info_request.external_user_name) %><%= user_both_links(info_request.user) %><%=h info_request.send(column) %>
      - - diff --git a/app/views/admin_request/_tags.html.erb b/app/views/admin_request/_tags.html.erb new file mode 100644 index 000000000..22fbf13c8 --- /dev/null +++ b/app/views/admin_request/_tags.html.erb @@ -0,0 +1,8 @@ +<% for t in info_request.tags %> + <% if t.value %> + <%=h t.name %>:<%=h t.value %> + <% else %> + <%=h t.name %> + <% end %> +<% end %> + diff --git a/app/views/admin_request/_tags.rhtml b/app/views/admin_request/_tags.rhtml deleted file mode 100644 index 22fbf13c8..000000000 --- a/app/views/admin_request/_tags.rhtml +++ /dev/null @@ -1,8 +0,0 @@ -<% for t in info_request.tags %> - <% if t.value %> - <%=h t.name %>:<%=h t.value %> - <% else %> - <%=h t.name %> - <% end %> -<% end %> - diff --git a/app/views/admin_request/edit.html.erb b/app/views/admin_request/edit.html.erb new file mode 100644 index 000000000..900947321 --- /dev/null +++ b/app/views/admin_request/edit.html.erb @@ -0,0 +1,63 @@ +

      Edit basic details of request

      + +<%= error_messages_for 'info_request' %> + +<%= form_tag '../update/' + @info_request.id.to_s do %> + +

      (warning: editing this will break URLs right now)
      + <%= text_field 'info_request', 'title', :size => 50 %>

      + +

      + <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %> + (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything) +

      + +

      + + <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>; + + <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %> +
      + ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail) +

      + +

      + <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>; + + <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %> +
      (don't forget to change 'awaiting description' when you set described state)
      +

      + +

      + <%= select('info_request', "comments_allowed", [["Yes – comments allowed", true], ["No – comments disabled", false]]) %> +

      + +


      + <%= text_field 'info_request', 'tag_string', :size => 60 %>

      + +

      <%= submit_tag 'Save changes', :accesskey => 's' %> +

      + +

      Note: To edit the actual request body text, click edit + next to the specific outgoing message. +

      + +<% end %> + +

      +<%= link_to 'Show', '../show/' + @info_request.id.to_s %> | +<%= link_to 'List all', '../list' %> +

      + +
      + +<%= form_tag '../destroy/' + @info_request.id.to_s do %> +

      + This is permanent and irreversible! <%= submit_tag 'Destroy request entirely' %> +
      Use it mainly if someone posts private information, e.g. made a Data Protection request. It + destroys all responses and tracks as well. +

      + +<% end %> + +
      diff --git a/app/views/admin_request/edit.rhtml b/app/views/admin_request/edit.rhtml deleted file mode 100644 index 900947321..000000000 --- a/app/views/admin_request/edit.rhtml +++ /dev/null @@ -1,63 +0,0 @@ -

      Edit basic details of request

      - -<%= error_messages_for 'info_request' %> - -<%= form_tag '../update/' + @info_request.id.to_s do %> - -

      (warning: editing this will break URLs right now)
      - <%= text_field 'info_request', 'title', :size => 50 %>

      - -

      - <%= select( 'info_request', "prominence", [ "normal", "backpage", "requester_only", "hidden" ]) %> - (backpage means hidden from lists/search; hidden means completely hidden; super users can see anything) -

      - -

      - - <%= select( 'info_request', "allow_new_responses_from", [ "anybody", "authority_only", "nobody" ] ) %>; - - <%= select( 'info_request', "handle_rejected_responses", [ "bounce", "holding_pen", "blackhole" ] ) %> -
      - ('authority_only' means email From: domain of authority request email or any domain that has previously sent a response; 'nobody' also stops requester making followups; take care when using 'blackhole' which just drops mail) -

      - -

      - <%= select( 'info_request', "described_state", InfoRequest.enumerate_states ) %>; - - <%= select('info_request', "awaiting_description", [["Yes - needs state updating",true],["No - state is up to date",false]]) %> -
      (don't forget to change 'awaiting description' when you set described state)
      -

      - -

      - <%= select('info_request', "comments_allowed", [["Yes – comments allowed", true], ["No – comments disabled", false]]) %> -

      - -


      - <%= text_field 'info_request', 'tag_string', :size => 60 %>

      - -

      <%= submit_tag 'Save changes', :accesskey => 's' %> -

      - -

      Note: To edit the actual request body text, click edit - next to the specific outgoing message. -

      - -<% end %> - -

      -<%= link_to 'Show', '../show/' + @info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> -

      - -
      - -<%= form_tag '../destroy/' + @info_request.id.to_s do %> -

      - This is permanent and irreversible! <%= submit_tag 'Destroy request entirely' %> -
      Use it mainly if someone posts private information, e.g. made a Data Protection request. It - destroys all responses and tracks as well. -

      - -<% end %> - -
      diff --git a/app/views/admin_request/edit_comment.html.erb b/app/views/admin_request/edit_comment.html.erb new file mode 100644 index 000000000..2152ee72f --- /dev/null +++ b/app/views/admin_request/edit_comment.html.erb @@ -0,0 +1,22 @@ +

      Edit annotation

      + +<%= error_messages_for 'comment' %> + +<%= form_tag '../update_comment/' + @comment.id.to_s do %> + +


      + <%= text_area 'comment', 'body', :rows => 10, :cols => 60 %>

      + +

      + <%= select('comment', "visible", [["Yes - show comment",true],["No - hide comment",false]]) %> +

      + + +

      <%= submit_tag 'Save', :accesskey => 's' %>

      +<% end %> + +

      +<%= link_to 'Show', '../show/' + @comment.info_request.id.to_s %> | +<%= link_to 'List all', '../list' %> +

      + diff --git a/app/views/admin_request/edit_comment.rhtml b/app/views/admin_request/edit_comment.rhtml deleted file mode 100644 index 2152ee72f..000000000 --- a/app/views/admin_request/edit_comment.rhtml +++ /dev/null @@ -1,22 +0,0 @@ -

      Edit annotation

      - -<%= error_messages_for 'comment' %> - -<%= form_tag '../update_comment/' + @comment.id.to_s do %> - -


      - <%= text_area 'comment', 'body', :rows => 10, :cols => 60 %>

      - -

      - <%= select('comment', "visible", [["Yes - show comment",true],["No - hide comment",false]]) %> -

      - - -

      <%= submit_tag 'Save', :accesskey => 's' %>

      -<% end %> - -

      -<%= link_to 'Show', '../show/' + @comment.info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> -

      - diff --git a/app/views/admin_request/edit_outgoing.html.erb b/app/views/admin_request/edit_outgoing.html.erb new file mode 100644 index 000000000..f749eac7b --- /dev/null +++ b/app/views/admin_request/edit_outgoing.html.erb @@ -0,0 +1,33 @@ +

      Edit outgoing message

      + +<%= error_messages_for 'outgoing_message' %> + +<%= form_tag '../update_outgoing/' + @outgoing_message.id.to_s do %> + +


      + <%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60 %>

      + +

      Note: This is mainly to be used to excise information + that users inadvertently put in their messages, not realising it would be + public. It will already have been sent to the public authority, and their + reply may also include that information and be automatically published on + this site. You could also use this to edit a message before resending it, but + only the edited version will be shown on the public page if you do that.

      + +

      <%= submit_tag 'Save', :accesskey => 's' %>

      +<% end %> + +

      +<%= link_to 'Show', '../show/' + @outgoing_message.info_request.id.to_s %> | +<%= link_to 'List all', '../list' %> +

      + +<%= form_tag '../destroy_outgoing' do %> +
      + <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %> + Warning, this is permanent! ---> + <%= submit_tag "Destroy outgoing message" %> +
      +<% end %> + + diff --git a/app/views/admin_request/edit_outgoing.rhtml b/app/views/admin_request/edit_outgoing.rhtml deleted file mode 100644 index f749eac7b..000000000 --- a/app/views/admin_request/edit_outgoing.rhtml +++ /dev/null @@ -1,33 +0,0 @@ -

      Edit outgoing message

      - -<%= error_messages_for 'outgoing_message' %> - -<%= form_tag '../update_outgoing/' + @outgoing_message.id.to_s do %> - -


      - <%= text_area 'outgoing_message', 'body', :rows => 10, :cols => 60 %>

      - -

      Note: This is mainly to be used to excise information - that users inadvertently put in their messages, not realising it would be - public. It will already have been sent to the public authority, and their - reply may also include that information and be automatically published on - this site. You could also use this to edit a message before resending it, but - only the edited version will be shown on the public page if you do that.

      - -

      <%= submit_tag 'Save', :accesskey => 's' %>

      -<% end %> - -

      -<%= link_to 'Show', '../show/' + @outgoing_message.info_request.id.to_s %> | -<%= link_to 'List all', '../list' %> -

      - -<%= form_tag '../destroy_outgoing' do %> -
      - <%= hidden_field_tag 'outgoing_message_id', @outgoing_message.id %> - Warning, this is permanent! ---> - <%= submit_tag "Destroy outgoing message" %> -
      -<% end %> - - 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..64387ffee --- /dev/null +++ b/app/views/admin_request/hidden_user_explanation.html.erb @@ -0,0 +1,9 @@ +Dear <%= name_to %>, + +Your request '<%= info_request.title %>' 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/hidden_user_explanation.rhtml b/app/views/admin_request/hidden_user_explanation.rhtml deleted file mode 100644 index 64387ffee..000000000 --- a/app/views/admin_request/hidden_user_explanation.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -Dear <%= name_to %>, - -Your request '<%= info_request.title %>' 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.html.erb b/app/views/admin_request/list.html.erb new file mode 100644 index 000000000..ae95cb5ad --- /dev/null +++ b/app/views/admin_request/list.html.erb @@ -0,0 +1,15 @@ +<% @title = 'Listing FOI/EIR requests' %> + +

      <%=@title%>

      + +<%= form_tag("", :method => "get") do %> +

      + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag "Search" %> (substring search, titles only) +

      +<% end %> + +<%= render :partial => 'some_requests', :locals => { :info_requests => @info_requests } %> + +<%= will_paginate(@info_requests) %> + diff --git a/app/views/admin_request/list.rhtml b/app/views/admin_request/list.rhtml deleted file mode 100644 index ae95cb5ad..000000000 --- a/app/views/admin_request/list.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -<% @title = 'Listing FOI/EIR requests' %> - -

      <%=@title%>

      - -<%= form_tag("", :method => "get") do %> -

      - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag "Search" %> (substring search, titles only) -

      -<% end %> - -<%= render :partial => 'some_requests', :locals => { :info_requests => @info_requests } %> - -<%= will_paginate(@info_requests) %> - diff --git a/app/views/admin_request/list_old_unclassified.html.erb b/app/views/admin_request/list_old_unclassified.html.erb new file mode 100644 index 000000000..2e75c2174 --- /dev/null +++ b/app/views/admin_request/list_old_unclassified.html.erb @@ -0,0 +1,16 @@ +<% @title = "Unclassified responses" %> + +

      <%=@title%>

      + +

      Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response:

      +
        +<% for @request in @info_requests %> +
      • + <%= request_both_links(@request) %> + – <%=simple_date(@request.get_last_response_event.created_at)%> +
      • +<% end %> +
      +<%= will_paginate(@info_requests) %> + + 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 2e75c2174..000000000 --- a/app/views/admin_request/list_old_unclassified.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% @title = "Unclassified responses" %> - -

      <%=@title%>

      - -

      Classify responses that are still unclassified <%=InfoRequest::OLD_AGE_IN_DAYS.inspect %> after response:

      -
        -<% for @request in @info_requests %> -
      • - <%= request_both_links(@request) %> - – <%=simple_date(@request.get_last_response_event.created_at)%> -
      • -<% end %> -
      -<%= will_paginate(@info_requests) %> - - diff --git a/app/views/admin_request/show.html.erb b/app/views/admin_request/show.html.erb new file mode 100644 index 000000000..3dd39347b --- /dev/null +++ b/app/views/admin_request/show.html.erb @@ -0,0 +1,230 @@ +<% @title = "FOI request - " + h(@info_request.title) %> +<%= javascript_include_tag :defaults %> + +

      <%=@title%>

      + +<%= form_tag '../move_request', { :class => "inline" } do %> +

      +<%= hidden_field_tag 'info_request_id', @info_request.id %> +<% for column in InfoRequest.content_columns %> + <%= column.human_name %>: <%=h @info_request.send(column.name) %> + <% if column.name == 'described_state' %> + Calculated status: <%= @info_request.calculate_status %> +
      Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %> + Date response required by: <%= @info_request.date_response_required_by %> + Very overdue after: <%= @info_request.date_very_overdue_after %> + <% end %> + <% if ![ 'allow_new_responses_from' ].include?(column.name) %> +
      + <% end %> +<% end %> + Created by: + <% if @info_request.is_external? %> + <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API) + <% else %> + <%= user_both_links(@info_request.user) %> + <% end %> + + + + (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) + + + url_name of new user: + <%= text_field_tag 'user_url_name', "", { :size => 20 } %> + <%= submit_tag "Move request to user" %> + + +
      +Public authority: <%= public_body_both_links(@info_request.public_body) %> + + + (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) + + + url_name of new authority: + <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %> + <%= submit_tag "Move request to authority" %> + + +
      +Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>
      +Tags: <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>
      +

      +<% end %> + +

      + <%= link_to 'Public page', main_url(request_url(@info_request)) %> + | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %> + | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below) +

      + +

      Events

      + + + + + <% for column in InfoRequestEvent.content_columns %> + + <% end %> + + + +<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> + + + <% for column in InfoRequestEvent.content_columns %> + + <% end %> + + +<% end %> +
      Id<%= column.human_name %>Actions
      <%=h info_request_event.id %> + <% if column.name == 'params_yaml' %> + <%= info_request_event.params_yaml_as_html %> + <% elsif column.text? %> + <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %> + <% else %> + <%=h info_request_event.send(column.name) %> + <% end %> + + <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %> + <%= form_tag '../mark_event_as_clarification' do %> +
      + <%= hidden_field_tag 'info_request_event_id', info_request_event.id %> + <%= submit_tag "Was clarification request" %> +
      + <% end %> + <% end %> +
      + +

      Outgoing messages

      + + + + + <% for column in OutgoingMessage.content_columns %> + + <% end %> + + + +<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %> + + + <% for column in OutgoingMessage.content_columns.map { |c| c.name } %> + + <% if column == 'body' %> + + <% else %> + + <% end %> + + <% end %> + + +<% end %> +
      Id<%= column.human_name %>Actions
      <%=h outgoing_message.id %> +
      <%= simple_format( truncate(outgoing_message.body, :length => 400, + :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") + )) %>
      +
      <%= simple_format( outgoing_message.body ) %>
      +
      <%= simple_format( outgoing_message.send(column).to_s ) %> + <%= form_tag '../resend' do %> +
      + <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %> + <%= submit_tag "Resend" %> +
      + <% end %> + <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %> +
      + +

      Incoming messages

      + + + + + <% for column in IncomingMessage.content_columns %> + + <% end %> + + + +<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %> + + + <% for column in IncomingMessage.content_columns.map { |c| c.name } %> + <% if column =~ /^cached_.*?$/ %> + + <% else %> + + <% end %> + <% end %> + + +<% end %> +
      Id<%= column.human_name %>Actions
      <%=h incoming_message.id %> +
      <%= simple_format( truncate(incoming_message.send(column), :length => 400, + :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") + )) %>
      +
      <%= simple_format( incoming_message.send(column) ) %>
      +
      <%= simple_format( incoming_message.send(column).to_s ) %> + <% if !incoming_message.raw_email_id.nil? %> +

      + <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %> +

      + <% end %> + <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %> +
      + +

      Annotations

      + +<% if @info_request.comments.size > 0 %> + + + + + <% for column in Comment.content_columns %> + + <% end %> + + + + <% for comment in @info_request.comments %> + + + + <% for column in Comment.content_columns.map { |c| c.name } %> + <% if column == 'body' && !comment.visible %> + + <% else %> + + <% end %> + <% end %> + + + <% end %> +
      IdPosted by<%= column.human_name %>Actions
      <%=h comment.id %><%= user_both_links(comment.user) %><%=h comment.send(column) %><%=h comment.send(column) %> + <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %> +
      +<% else %> +

      None yet.

      +<% end %> + + + +

      Mail server delivery logs

      + +

      (Lines containing the request incoming email address, updated hourly.)

      + +<% for mail_server_log_done_id, mail_server_logs in @info_request.mail_server_logs.group_by(&:mail_server_log_done_id) %> + +
      <% for mail_server_log in mail_server_logs %><%=h mail_server_log.line%><% end %>
      +<% end %> +<% if @info_request.mail_server_logs.size == 0 %> +

      None (perhaps this is an old or a very new request)

      +<% end %> + +

      Censor rules

      +<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %> + diff --git a/app/views/admin_request/show.rhtml b/app/views/admin_request/show.rhtml deleted file mode 100644 index 3dd39347b..000000000 --- a/app/views/admin_request/show.rhtml +++ /dev/null @@ -1,230 +0,0 @@ -<% @title = "FOI request - " + h(@info_request.title) %> -<%= javascript_include_tag :defaults %> - -

      <%=@title%>

      - -<%= form_tag '../move_request', { :class => "inline" } do %> -

      -<%= hidden_field_tag 'info_request_id', @info_request.id %> -<% for column in InfoRequest.content_columns %> - <%= column.human_name %>: <%=h @info_request.send(column.name) %> - <% if column.name == 'described_state' %> - Calculated status: <%= @info_request.calculate_status %> -
      Initial request last sent at: <%=@info_request.date_initial_request_last_sent_at.to_date %> - Date response required by: <%= @info_request.date_response_required_by %> - Very overdue after: <%= @info_request.date_very_overdue_after %> - <% end %> - <% if ![ 'allow_new_responses_from' ].include?(column.name) %> -
      - <% end %> -<% end %> - Created by: - <% if @info_request.is_external? %> - <%= @info_request.public_body.name %> on behalf of <%= (@info_request.user_name || _('an anonymous user'))%> (using API) - <% else %> - <%= user_both_links(@info_request.user) %> - <% end %> - - - - (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) - - - url_name of new user: - <%= text_field_tag 'user_url_name', "", { :size => 20 } %> - <%= submit_tag "Move request to user" %> - - -
      -Public authority: <%= public_body_both_links(@info_request.public_body) %> - - - (<%= link_to_function("move...", "$(this).up(1).childElements().invoke('toggle')") %>) - - - url_name of new authority: - <%= text_field_tag 'public_body_url_name', "", { :size => 20 } %> - <%= submit_tag "Move request to authority" %> - - -
      -Incoming email address: <%= link_to h(@info_request.incoming_email), "mailto:" + @info_request.incoming_email %>
      -Tags: <%= render :partial => 'tags', :locals => { :info_request => @info_request} %>
      -

      -<% end %> - -

      - <%= link_to 'Public page', main_url(request_url(@info_request)) %> - | <%= link_to 'Edit', '../edit/' + @info_request.id.to_s %> - | <%= link_to 'FOI officer upload URL', '../generate_upload_url/' + @info_request.id.to_s %> (see also links on incoming messages below) -

      - -

      Events

      - - - - - <% for column in InfoRequestEvent.content_columns %> - - <% end %> - - - -<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> - - - <% for column in InfoRequestEvent.content_columns %> - - <% end %> - - -<% end %> -
      Id<%= column.human_name %>Actions
      <%=h info_request_event.id %> - <% if column.name == 'params_yaml' %> - <%= info_request_event.params_yaml_as_html %> - <% elsif column.text? %> - <%=h (info_request_event.send(column.name) || '').gsub(/_/,' ') %> - <% else %> - <%=h info_request_event.send(column.name) %> - <% end %> - - <% if info_request_event.described_state != 'waiting_clarification' and info_request_event.event_type == 'response' %> - <%= form_tag '../mark_event_as_clarification' do %> -
      - <%= hidden_field_tag 'info_request_event_id', info_request_event.id %> - <%= submit_tag "Was clarification request" %> -
      - <% end %> - <% end %> -
      - -

      Outgoing messages

      - - - - - <% for column in OutgoingMessage.content_columns %> - - <% end %> - - - -<% for outgoing_message in @info_request.outgoing_messages.find(:all, :order => 'created_at') %> - - - <% for column in OutgoingMessage.content_columns.map { |c| c.name } %> - - <% if column == 'body' %> - - <% else %> - - <% end %> - - <% end %> - - -<% end %> -
      Id<%= column.human_name %>Actions
      <%=h outgoing_message.id %> -
      <%= simple_format( truncate(outgoing_message.body, :length => 400, - :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") - )) %>
      -
      <%= simple_format( outgoing_message.body ) %>
      -
      <%= simple_format( outgoing_message.send(column).to_s ) %> - <%= form_tag '../resend' do %> -
      - <%= hidden_field_tag 'outgoing_message_id', outgoing_message.id %> - <%= submit_tag "Resend" %> -
      - <% end %> - <%= link_to "Edit", '../edit_outgoing/' + outgoing_message.id.to_s %> -
      - -

      Incoming messages

      - - - - - <% for column in IncomingMessage.content_columns %> - - <% end %> - - - -<% for incoming_message in @info_request.incoming_messages.find(:all, :order => 'created_at') %> - - - <% for column in IncomingMessage.content_columns.map { |c| c.name } %> - <% if column =~ /^cached_.*?$/ %> - - <% else %> - - <% end %> - <% end %> - - -<% end %> -
      Id<%= column.human_name %>Actions
      <%=h incoming_message.id %> -
      <%= simple_format( truncate(incoming_message.send(column), :length => 400, - :omission => link_to_function("...", "$(this).up('td').childElements().invoke('toggle')") - )) %>
      -
      <%= simple_format( incoming_message.send(column) ) %>
      -
      <%= simple_format( incoming_message.send(column).to_s ) %> - <% if !incoming_message.raw_email_id.nil? %> -

      - <%= link_to "View raw email", "../show_raw_email/" + incoming_message.raw_email_id.to_s %> -

      - <% end %> - <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => incoming_message } %> -
      - -

      Annotations

      - -<% if @info_request.comments.size > 0 %> - - - - - <% for column in Comment.content_columns %> - - <% end %> - - - - <% for comment in @info_request.comments %> - - - - <% for column in Comment.content_columns.map { |c| c.name } %> - <% if column == 'body' && !comment.visible %> - - <% else %> - - <% end %> - <% end %> - - - <% end %> -
      IdPosted by<%= column.human_name %>Actions
      <%=h comment.id %><%= user_both_links(comment.user) %><%=h comment.send(column) %><%=h comment.send(column) %> - <%= link_to "Edit", '../edit_comment/' + comment.id.to_s %> -
      -<% else %> -

      None yet.

      -<% end %> - - - -

      Mail server delivery logs

      - -

      (Lines containing the request incoming email address, updated hourly.)

      - -<% for mail_server_log_done_id, mail_server_logs in @info_request.mail_server_logs.group_by(&:mail_server_log_done_id) %> - -
      <% for mail_server_log in mail_server_logs %><%=h mail_server_log.line%><% end %>
      -<% end %> -<% if @info_request.mail_server_logs.size == 0 %> -

      None (perhaps this is an old or a very new request)

      -<% end %> - -

      Censor rules

      -<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @info_request.censor_rules, :info_request => @info_request } %> - diff --git a/app/views/admin_request/show_raw_email.html.erb b/app/views/admin_request/show_raw_email.html.erb new file mode 100644 index 000000000..ea0d6017e --- /dev/null +++ b/app/views/admin_request/show_raw_email.html.erb @@ -0,0 +1,37 @@ +<% @title = 'Incoming message ' + @raw_email.incoming_message.id.to_s + ' of FOI request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %> + +

      Incoming message <%=@raw_email.incoming_message.id.to_s %>

      + +

      + FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %> + <% if @holding_pen %> +
      This is in the holding pen because: <%= @rejected_reason %> + <% if @public_bodies.size > 0 %> +
      Guessed authority: + <% for public_body in @public_bodies %> + <%=public_body_both_links(public_body)%> + <% end %> + (based on From: email domain) + <% end %> + <% if @info_requests.size > 0 %> +
      Guessed request: + <% for info_request in @info_requests %> + <%=request_both_links(info_request)%> + <% end %> + (based on id, not hash, in To/Cc email) + <% end %> + <% end %> +

      + +

      Actions

      + +
      + <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => @raw_email.incoming_message } %> +
      + +

      Raw email

      + +

      <%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %>

      + +
      <%= h(@raw_email.data).gsub(/\n/, '
      ').html_safe %>
      + diff --git a/app/views/admin_request/show_raw_email.rhtml b/app/views/admin_request/show_raw_email.rhtml deleted file mode 100644 index ea0d6017e..000000000 --- a/app/views/admin_request/show_raw_email.rhtml +++ /dev/null @@ -1,37 +0,0 @@ -<% @title = 'Incoming message ' + @raw_email.incoming_message.id.to_s + ' of FOI request \'' + h(@raw_email.incoming_message.info_request.title) + "'" %> - -

      Incoming message <%=@raw_email.incoming_message.id.to_s %>

      - -

      - FOI request: <%= request_both_links(@raw_email.incoming_message.info_request) %> - <% if @holding_pen %> -
      This is in the holding pen because: <%= @rejected_reason %> - <% if @public_bodies.size > 0 %> -
      Guessed authority: - <% for public_body in @public_bodies %> - <%=public_body_both_links(public_body)%> - <% end %> - (based on From: email domain) - <% end %> - <% if @info_requests.size > 0 %> -
      Guessed request: - <% for info_request in @info_requests %> - <%=request_both_links(info_request)%> - <% end %> - (based on id, not hash, in To/Cc email) - <% end %> - <% end %> -

      - -

      Actions

      - -
      - <%= render :partial => 'incoming_message_actions', :locals => { :incoming_message => @raw_email.incoming_message } %> -
      - -

      Raw email

      - -

      <%= link_to "Download", "../download_raw_email/" + @raw_email.id.to_s %>

      - -
      <%= h(@raw_email.data).gsub(/\n/, '
      ').html_safe %>
      - diff --git a/app/views/admin_track/_some_tracks.html.erb b/app/views/admin_track/_some_tracks.html.erb new file mode 100644 index 000000000..1d2b358b7 --- /dev/null +++ b/app/views/admin_track/_some_tracks.html.erb @@ -0,0 +1,31 @@ + + + + + <% for column in TrackThing.content_columns %> + + <% end %> + + + + +<% for track_thing in track_things %> + + + + <% for column in TrackThing.content_columns.map { |c| c.name } %> + + <% end %> + + + +<% end %> +
      IdUser<%= column.human_name %>Items sent by email (in last month)Actions
      <%=h track_thing.id %><%=user_both_links(track_thing.tracking_user) %><%=h track_thing.send(column) %><%= track_thing.track_things_sent_emails.size %> + <%= form_tag '../../user/destroy_track' do %> +
      + <%= hidden_field_tag 'track_id', track_thing.id %> + <%= submit_tag "Destroy track" %> +
      + <% end %> +
      + diff --git a/app/views/admin_track/_some_tracks.rhtml b/app/views/admin_track/_some_tracks.rhtml deleted file mode 100644 index 1d2b358b7..000000000 --- a/app/views/admin_track/_some_tracks.rhtml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - <% for column in TrackThing.content_columns %> - - <% end %> - - - - -<% for track_thing in track_things %> - - - - <% for column in TrackThing.content_columns.map { |c| c.name } %> - - <% end %> - - - -<% end %> -
      IdUser<%= column.human_name %>Items sent by email (in last month)Actions
      <%=h track_thing.id %><%=user_both_links(track_thing.tracking_user) %><%=h track_thing.send(column) %><%= track_thing.track_things_sent_emails.size %> - <%= form_tag '../../user/destroy_track' do %> -
      - <%= hidden_field_tag 'track_id', track_thing.id %> - <%= submit_tag "Destroy track" %> -
      - <% end %> -
      - diff --git a/app/views/admin_track/list.html.erb b/app/views/admin_track/list.html.erb new file mode 100644 index 000000000..1105f965e --- /dev/null +++ b/app/views/admin_track/list.html.erb @@ -0,0 +1,39 @@ +<% @title = 'Listing tracks' %> + +

      <%=@title%>

      + +<%= form_tag("", :method => "get") do %> +

      + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag "Search" %> (substring search the query - so use url_names_for_a_particular_request_or_authority_or_person) +

      +<% end %> + + + + + + <% for column in TrackThing.content_columns %> + + <% end %> + + + +<% for track_thing in @admin_tracks %> + + + + <% for column in TrackThing.content_columns.map { |c| c.name } %> + <% if column == 'track_medium' and track_thing.track_medium == 'feed'%> + + <% else %> + + <% end %> + <% end %> + + +<% end %> +
      IdTracked by<%= column.human_name %>Items sent by email (in last month)
      <%=h track_thing.id %><%= user_both_links(track_thing.tracking_user) %><%= link_to track_thing.track_medium, atom_feed_url(:track_id => track_thing.id) %><%=h track_thing.send(column) %><%= track_thing.track_things_sent_emails.size %>
      + +<%= will_paginate(@admin_tracks) %> + diff --git a/app/views/admin_track/list.rhtml b/app/views/admin_track/list.rhtml deleted file mode 100644 index 1105f965e..000000000 --- a/app/views/admin_track/list.rhtml +++ /dev/null @@ -1,39 +0,0 @@ -<% @title = 'Listing tracks' %> - -

      <%=@title%>

      - -<%= form_tag("", :method => "get") do %> -

      - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag "Search" %> (substring search the query - so use url_names_for_a_particular_request_or_authority_or_person) -

      -<% end %> - - - - - - <% for column in TrackThing.content_columns %> - - <% end %> - - - -<% for track_thing in @admin_tracks %> - - - - <% for column in TrackThing.content_columns.map { |c| c.name } %> - <% if column == 'track_medium' and track_thing.track_medium == 'feed'%> - - <% else %> - - <% end %> - <% end %> - - -<% end %> -
      IdTracked by<%= column.human_name %>Items sent by email (in last month)
      <%=h track_thing.id %><%= user_both_links(track_thing.tracking_user) %><%= link_to track_thing.track_medium, atom_feed_url(:track_id => track_thing.id) %><%=h track_thing.send(column) %><%= track_thing.track_things_sent_emails.size %>
      - -<%= will_paginate(@admin_tracks) %> - diff --git a/app/views/admin_user/_form.html.erb b/app/views/admin_user/_form.html.erb new file mode 100644 index 000000000..be69d9a80 --- /dev/null +++ b/app/views/admin_user/_form.html.erb @@ -0,0 +1,27 @@ +<%= error_messages_for 'admin_user' %> + + + +

      (will change URL name and break URLs; unlike authorities, there is no history; you will need to rebuild the search index afterwards)
      +<%= text_field 'admin_user', 'name', :size => 60 %>

      + +

      (you must first validate this)
      +<%= text_field 'admin_user', 'email', :size => 60 %>

      + +

      (none or super; this is for admin features and links which are in the site proper)
      +<%= text_field 'admin_user', 'admin_level', :size => 60 %>

      + +

      (if not blank will stop the + 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)
      + +<%= text_area 'admin_user', 'ban_text', :cols => 60, :rows => 3 %>

      + +

      (user's own text on their profile, format like comments):
      +<%= text_area 'admin_user', 'about_me', :cols => 60, :rows => 3 %>

      + +

      <%= check_box 'admin_user', 'no_limit' %> + (disable the limit on daily requests)

      + diff --git a/app/views/admin_user/_form.rhtml b/app/views/admin_user/_form.rhtml deleted file mode 100644 index be69d9a80..000000000 --- a/app/views/admin_user/_form.rhtml +++ /dev/null @@ -1,27 +0,0 @@ -<%= error_messages_for 'admin_user' %> - - - -

      (will change URL name and break URLs; unlike authorities, there is no history; you will need to rebuild the search index afterwards)
      -<%= text_field 'admin_user', 'name', :size => 60 %>

      - -

      (you must first validate this)
      -<%= text_field 'admin_user', 'email', :size => 60 %>

      - -

      (none or super; this is for admin features and links which are in the site proper)
      -<%= text_field 'admin_user', 'admin_level', :size => 60 %>

      - -

      (if not blank will stop the - 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)
      - -<%= text_area 'admin_user', 'ban_text', :cols => 60, :rows => 3 %>

      - -

      (user's own text on their profile, format like comments):
      -<%= text_area 'admin_user', 'about_me', :cols => 60, :rows => 3 %>

      - -

      <%= check_box 'admin_user', 'no_limit' %> - (disable the limit on daily requests)

      - diff --git a/app/views/admin_user/_user_table.html.erb b/app/views/admin_user/_user_table.html.erb new file mode 100644 index 000000000..d35c78594 --- /dev/null +++ b/app/views/admin_user/_user_table.html.erb @@ -0,0 +1,22 @@ + + + + <% for column in ['Name', 'Email', 'Created at', 'Updated at', 'Email confirmed', 'Admin'] + (banned_column ? ['Ban text'] : []) %> + + <% end %> + + +<% for user in users %> + + + + + <% for column in ['created_at', 'updated_at', 'email_confirmed', 'admin_level'] + (banned_column ? ['ban_text'] : []) %> + + <% end %> + +<% end %> +
      Id<%= column %>
      <%= user.id.to_s %><%= user_both_links(user) %><%=h user.email%><%=h user.send(column) %>
      + +<%= will_paginate(users) %> + diff --git a/app/views/admin_user/_user_table.rhtml b/app/views/admin_user/_user_table.rhtml deleted file mode 100644 index d35c78594..000000000 --- a/app/views/admin_user/_user_table.rhtml +++ /dev/null @@ -1,22 +0,0 @@ - - - - <% for column in ['Name', 'Email', 'Created at', 'Updated at', 'Email confirmed', 'Admin'] + (banned_column ? ['Ban text'] : []) %> - - <% end %> - - -<% for user in users %> - - - - - <% for column in ['created_at', 'updated_at', 'email_confirmed', 'admin_level'] + (banned_column ? ['ban_text'] : []) %> - - <% end %> - -<% end %> -
      Id<%= column %>
      <%= user.id.to_s %><%= user_both_links(user) %><%=h user.email%><%=h user.send(column) %>
      - -<%= will_paginate(users) %> - diff --git a/app/views/admin_user/edit.html.erb b/app/views/admin_user/edit.html.erb new file mode 100644 index 000000000..fb59dffe2 --- /dev/null +++ b/app/views/admin_user/edit.html.erb @@ -0,0 +1,23 @@ + + +

      <%=@title%>

      + +<%= form_tag '../update/' + @admin_user.id.to_s do %> + <%= render :partial => 'form' %> +

      <%= submit_tag 'Save', :accesskey => 's' %>

      +<% end %> + +

      +<%= link_to 'Show', '../show/' + @admin_user.id.to_s %> | +<%= link_to 'List all', '../list' %> +

      + +<% if false #@admin_user.info_requests.size == 0 %> + <%= form_tag('../destroy/' + @admin_user.id.to_s) do %> +

      + <%= hidden_field_tag(:admin_user_id, { :value => @admin_user.id } ) %> + <%= submit_tag "Destroy " + @admin_user.name %> (this is permanent!) +

      + <% end %> +<% end %> + diff --git a/app/views/admin_user/edit.rhtml b/app/views/admin_user/edit.rhtml deleted file mode 100644 index fb59dffe2..000000000 --- a/app/views/admin_user/edit.rhtml +++ /dev/null @@ -1,23 +0,0 @@ - - -

      <%=@title%>

      - -<%= form_tag '../update/' + @admin_user.id.to_s do %> - <%= render :partial => 'form' %> -

      <%= submit_tag 'Save', :accesskey => 's' %>

      -<% end %> - -

      -<%= link_to 'Show', '../show/' + @admin_user.id.to_s %> | -<%= link_to 'List all', '../list' %> -

      - -<% if false #@admin_user.info_requests.size == 0 %> - <%= form_tag('../destroy/' + @admin_user.id.to_s) do %> -

      - <%= hidden_field_tag(:admin_user_id, { :value => @admin_user.id } ) %> - <%= submit_tag "Destroy " + @admin_user.name %> (this is permanent!) -

      - <% end %> -<% end %> - diff --git a/app/views/admin_user/list.html.erb b/app/views/admin_user/list.html.erb new file mode 100644 index 000000000..377f5fc10 --- /dev/null +++ b/app/views/admin_user/list.html.erb @@ -0,0 +1,15 @@ +<% @title = 'Listing users' %> + +

      <%=@title%>

      + +<%= form_tag("", :method => "get") do %> +

      + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag "Search" %> (substring search, names and emails) + <%= link_to 'Banned users', 'banned' %> +

      +<% end %> + +<%= render :partial => 'user_table', :locals => { :users => @admin_users, :banned_column => false } %> + + diff --git a/app/views/admin_user/list.rhtml b/app/views/admin_user/list.rhtml deleted file mode 100644 index 377f5fc10..000000000 --- a/app/views/admin_user/list.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -<% @title = 'Listing users' %> - -

      <%=@title%>

      - -<%= form_tag("", :method => "get") do %> -

      - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag "Search" %> (substring search, names and emails) - <%= link_to 'Banned users', 'banned' %> -

      -<% end %> - -<%= render :partial => 'user_table', :locals => { :users => @admin_users, :banned_column => false } %> - - diff --git a/app/views/admin_user/list_banned.html.erb b/app/views/admin_user/list_banned.html.erb new file mode 100644 index 000000000..be2d45399 --- /dev/null +++ b/app/views/admin_user/list_banned.html.erb @@ -0,0 +1,9 @@ +<% @title = 'Banned users' %> + +

      <%=@title%>

      + +

      <%= link_to 'List all', 'list' %>

      + +<%= render :partial => 'user_table', :locals => { :users => @banned_users, :banned_column => true } %> + + diff --git a/app/views/admin_user/list_banned.rhtml b/app/views/admin_user/list_banned.rhtml deleted file mode 100644 index be2d45399..000000000 --- a/app/views/admin_user/list_banned.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -<% @title = 'Banned users' %> - -

      <%=@title%>

      - -

      <%= link_to 'List all', 'list' %>

      - -<%= render :partial => 'user_table', :locals => { :users => @banned_users, :banned_column => true } %> - - diff --git a/app/views/admin_user/show.html.erb b/app/views/admin_user/show.html.erb new file mode 100644 index 000000000..03e3d30c5 --- /dev/null +++ b/app/views/admin_user/show.html.erb @@ -0,0 +1,74 @@ +<% @title = "User - " + h(@admin_user.name) %> + +

      <%=@title%>

      + +<% if @admin_user.profile_photo %> +
      + <%= form_tag '../clear_profile_photo/' + @admin_user.id.to_s, :multipart => true do %> + +
      + <%= submit_tag "Clear photo" %> + <% end %> +
      +<% end %> + + +
      +Id: <%= @admin_user.id%>
      +<% for column in User.content_columns %> + <%= column.human_name %>: + <% if column.name == 'email' %> + <%=h @admin_user.email%> + <% elsif column.name == 'email_bounce_message' %> + <% if !@admin_user.email_bounce_message.empty? %> + See bounce message + <% end %> + <% else %> + <%=h @admin_user.send(column.name) %> + <% end %> + <% if column.name == 'email_bounced_at' && !@admin_user.email_bounced_at.nil? %> +
      + <% end %> +
      +<% end %> +
      + +

      + <%= link_to 'Public page', main_url(user_url(@admin_user)) %> + | <%= link_to 'Edit', '../edit/' + @admin_user.id.to_s %> + | <%= link_to 'Log in as this user', '../login_as/' + @admin_user.id.to_s %> (also confirms their email) +

      + +

      Track things

      +<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @admin_user.track_things } %> + +

      Post redirects

      + + + + + <% for column in PostRedirect.content_columns %> + + <% end %> + + +<% for post_redirect in @admin_user.post_redirects.find(:all, :order => 'created_at desc') %> + + + <% for column in PostRedirect.content_columns.map { |c| c.name } %> + <% if column == 'email_token' %> + + <% else %> + + <% end %> + <% end %> + +<% end %> +
      Id<%= column.human_name %>
      <%=h post_redirect.id %><%=link_to post_redirect.send(column), main_url(confirm_url(:email_token => post_redirect.send(column), :only_path => true)) %><%=h post_redirect.send(column) %>
      + +

      Requests

      +<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @admin_user.info_requests } %> + +

      Censor rules

      +<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @admin_user.censor_rules, :user => @admin_user } %> + diff --git a/app/views/admin_user/show.rhtml b/app/views/admin_user/show.rhtml deleted file mode 100644 index 03e3d30c5..000000000 --- a/app/views/admin_user/show.rhtml +++ /dev/null @@ -1,74 +0,0 @@ -<% @title = "User - " + h(@admin_user.name) %> - -

      <%=@title%>

      - -<% if @admin_user.profile_photo %> -
      - <%= form_tag '../clear_profile_photo/' + @admin_user.id.to_s, :multipart => true do %> - -
      - <%= submit_tag "Clear photo" %> - <% end %> -
      -<% end %> - - -
      -Id: <%= @admin_user.id%>
      -<% for column in User.content_columns %> - <%= column.human_name %>: - <% if column.name == 'email' %> - <%=h @admin_user.email%> - <% elsif column.name == 'email_bounce_message' %> - <% if !@admin_user.email_bounce_message.empty? %> - See bounce message - <% end %> - <% else %> - <%=h @admin_user.send(column.name) %> - <% end %> - <% if column.name == 'email_bounced_at' && !@admin_user.email_bounced_at.nil? %> -
      - <% end %> -
      -<% end %> -
      - -

      - <%= link_to 'Public page', main_url(user_url(@admin_user)) %> - | <%= link_to 'Edit', '../edit/' + @admin_user.id.to_s %> - | <%= link_to 'Log in as this user', '../login_as/' + @admin_user.id.to_s %> (also confirms their email) -

      - -

      Track things

      -<%= render :partial => 'admin_track/some_tracks', :locals => { :track_things => @admin_user.track_things } %> - -

      Post redirects

      - - - - - <% for column in PostRedirect.content_columns %> - - <% end %> - - -<% for post_redirect in @admin_user.post_redirects.find(:all, :order => 'created_at desc') %> - - - <% for column in PostRedirect.content_columns.map { |c| c.name } %> - <% if column == 'email_token' %> - - <% else %> - - <% end %> - <% end %> - -<% end %> -
      Id<%= column.human_name %>
      <%=h post_redirect.id %><%=link_to post_redirect.send(column), main_url(confirm_url(:email_token => post_redirect.send(column), :only_path => true)) %><%=h post_redirect.send(column) %>
      - -

      Requests

      -<%= render :partial => 'admin_request/some_requests', :locals => { :info_requests => @admin_user.info_requests } %> - -

      Censor rules

      -<%= render :partial => 'admin_censor_rule/show', :locals => { :censor_rules => @admin_user.censor_rules, :user => @admin_user } %> - diff --git a/app/views/admin_user/show_bounce_message.html.erb b/app/views/admin_user/show_bounce_message.html.erb new file mode 100644 index 000000000..ad643a13e --- /dev/null +++ b/app/views/admin_user/show_bounce_message.html.erb @@ -0,0 +1,3 @@ +

      Email bounce message for <%= @admin_user.name %>

      + +
      <%= @admin_user.email_bounce_message %>
      diff --git a/app/views/admin_user/show_bounce_message.rhtml b/app/views/admin_user/show_bounce_message.rhtml deleted file mode 100644 index ad643a13e..000000000 --- a/app/views/admin_user/show_bounce_message.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -

      Email bounce message for <%= @admin_user.name %>

      - -
      <%= @admin_user.email_bounce_message %>
      diff --git a/app/views/comment/_comment_form.html.erb b/app/views/comment/_comment_form.html.erb new file mode 100644 index 000000000..b110fa26a --- /dev/null +++ b/app/views/comment/_comment_form.html.erb @@ -0,0 +1,19 @@ +<%= form_for(:comment, @comment, :url => { :controller => "comment", :action => "new", :type => "request" }, :html => { :id => 'comment_form' } ) do |f| %> +

      + <%= f.text_area :body, :rows => 10, :cols => 55 %> +

      + + <% if !TrackThing.find_by_existing_track(@user, track_thing) && (!@user || @info_request.user != @user) %> +

      + <%= check_box_tag 'subscribe_to_request', "1", params[:subscribe_to_request] ? true : false %> +

      + <% end %> + +

      + <%= hidden_field_tag 'submitted_comment', 1 %> + <%= hidden_field_tag 'preview', 1 %> + <%= submit_tag _('Preview your annotation') %> + <%= raw(_(' (no ranty politics, read our moderation policy)') % [help_requesting_path+'#moderation']) %> +

      +<% end %> + diff --git a/app/views/comment/_comment_form.rhtml b/app/views/comment/_comment_form.rhtml deleted file mode 100644 index b110fa26a..000000000 --- a/app/views/comment/_comment_form.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<%= form_for(:comment, @comment, :url => { :controller => "comment", :action => "new", :type => "request" }, :html => { :id => 'comment_form' } ) do |f| %> -

      - <%= f.text_area :body, :rows => 10, :cols => 55 %> -

      - - <% if !TrackThing.find_by_existing_track(@user, track_thing) && (!@user || @info_request.user != @user) %> -

      - <%= check_box_tag 'subscribe_to_request', "1", params[:subscribe_to_request] ? true : false %> -

      - <% end %> - -

      - <%= hidden_field_tag 'submitted_comment', 1 %> - <%= hidden_field_tag 'preview', 1 %> - <%= submit_tag _('Preview your annotation') %> - <%= raw(_(' (no ranty politics, read our moderation policy)') % [help_requesting_path+'#moderation']) %> -

      -<% end %> - diff --git a/app/views/comment/_single_comment.html.erb b/app/views/comment/_single_comment.html.erb new file mode 100644 index 000000000..b645721cf --- /dev/null +++ b/app/views/comment/_single_comment.html.erb @@ -0,0 +1,28 @@ +
      + <% if comment.user && comment.user.profile_photo %> +
      + +
      + <% end %> + +

      + <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %> + <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>) +

      +
      +

      + + <%= comment.get_body_for_html_display %> +

      +
      +

      + <% if !comment.id.nil? %> + <%= link_to "Link to this", comment_url(comment), :class => "link_to_this" %> + <% if !@user.nil? && @user.admin_page_links? %> + | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %> + <% end %> + + <% end %> +

      +
      + diff --git a/app/views/comment/_single_comment.rhtml b/app/views/comment/_single_comment.rhtml deleted file mode 100644 index b645721cf..000000000 --- a/app/views/comment/_single_comment.rhtml +++ /dev/null @@ -1,28 +0,0 @@ -
      - <% if comment.user && comment.user.profile_photo %> -
      - -
      - <% end %> - -

      - <%# When not logged in, but mid-comment-leaving, there'll be no comment.user %> - <%= comment.user ? user_link(comment.user) : _("You") %> <%= _("left an annotation") %> (<%= simple_date(comment.created_at || Time.now) %>) -

      -
      -

      - - <%= comment.get_body_for_html_display %> -

      -
      -

      - <% if !comment.id.nil? %> - <%= link_to "Link to this", comment_url(comment), :class => "link_to_this" %> - <% if !@user.nil? && @user.admin_page_links? %> - | <%= link_to "Admin", admin_url("request/edit_comment/" + comment.id.to_s) %> - <% end %> - - <% end %> -

      -
      - diff --git a/app/views/comment/new.html.erb b/app/views/comment/new.html.erb new file mode 100644 index 000000000..aa5b6051c --- /dev/null +++ b/app/views/comment/new.html.erb @@ -0,0 +1,77 @@ +<% @title = "Make an annotation on '" + h(@info_request.title) + "'" %> + +<% if @existing_comment %> +
        +
      • + <%= user_or_you_capital(@existing_comment.user) %> already + made this annotation on <%=simple_date(@existing_comment.created_at)%>. +
      • +
      +<% end %> + +<%= foi_error_messages_for :comment %> + +

      <%= _('Add an annotation')%>

      +

      to “<%=request_link(@info_request)%>”

      + +

      +<%= _('Annotations are so anyone, including you, can help the requester with their request. For example:')%> +

      + +
        + +<% if [ 'waiting_clarification' ].include?(@info_request.described_state) %> +
      • <%= _(' Advise on how to best clarify the request.')%>
      • +<% end %> + +<% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> +
      • <%= _(' Link to the information requested, if it is already available on the Internet. ')%>
      • +
      • <%= _(' Suggest where else the requester might find the information. ')%>
      • +
      • <%= _(' Offer better ways of wording the request to get the information. ')%>
      • +<% end %> + +<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> +
      • <%= _(' Summarise the content of any information returned. ')%>
      • +
      • <%= _(' Say how you\'ve used the information, with links if possible.')%>
      • +
      • <%= _('Thank the public authority or ')%><%=h (@info_request.user_name ? @info_request.user_name : _('the requester')) %>.
      • +<% end %> +<% if [ 'partially_successful' ].include?(@info_request.described_state) %> +
      • <%= _('Suggest how the requester can find the rest of the information.')%>
      • +<% end %> +<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> +
      • <%= _('Point to related information, campaigns or forums which may be useful.')%>
      • +<% end %> + +<% if [ 'gone_postal' ].include?(@info_request.described_state) %> +
      • <%= _('A summary of the response if you have received it by post. ')%>
      • +<% end %> + +<% if [ 'not_held' ].include?(@info_request.described_state) %> +
      • <%= _(' Ideas on what other documents to request which the authority may hold. ')%>
      • +<% end %> +<% if [ 'rejected' ].include?(@info_request.described_state) %> +
      • <%= _('Advise on whether the refusal is legal, and how to complain about it if not.') %>
      • +<% end %> + +<% if [ 'internal_review' ].include?(@info_request.described_state) %> +
      • <%= _('Advice on how to get a response that will satisfy the requester.
      • ') %> +<% end %> +<% if [ 'error_message' ].include?(@info_request.described_state) %> +
      • <%= _('You know what caused the error, and can suggest a solution, such as a working email address.')%>
      • +<% end %> +<% if [ 'requires_admin' ].include?(@info_request.described_state) %> +
      • <%= _('Your thoughts on what the {{site_name}} administrators should do about the request.', :site_name=>site_name) %>
      • +<% end %> + + +
      + +

      + <%= _('Annotations will be posted publicly here, and are + not sent to {{public_body_name}}.',:public_body_name=>h(@info_request.public_body.name)) %> + <% if @info_request.is_external? %> + <%= _('Note that the requester will not be notified about your annotation, because the request was published by {{public_body_name}} on their behalf.', :public_body_name => @info_request.public_body.name) %> + <% end %> +

      + +<%= render :partial => 'comment/comment_form', :locals => { :track_thing => @track_thing } %> diff --git a/app/views/comment/new.rhtml b/app/views/comment/new.rhtml deleted file mode 100644 index aa5b6051c..000000000 --- a/app/views/comment/new.rhtml +++ /dev/null @@ -1,77 +0,0 @@ -<% @title = "Make an annotation on '" + h(@info_request.title) + "'" %> - -<% if @existing_comment %> -
        -
      • - <%= user_or_you_capital(@existing_comment.user) %> already - made this annotation on <%=simple_date(@existing_comment.created_at)%>. -
      • -
      -<% end %> - -<%= foi_error_messages_for :comment %> - -

      <%= _('Add an annotation')%>

      -

      to “<%=request_link(@info_request)%>”

      - -

      -<%= _('Annotations are so anyone, including you, can help the requester with their request. For example:')%> -

      - -
        - -<% if [ 'waiting_clarification' ].include?(@info_request.described_state) %> -
      • <%= _(' Advise on how to best clarify the request.')%>
      • -<% end %> - -<% if not [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> -
      • <%= _(' Link to the information requested, if it is already available on the Internet. ')%>
      • -
      • <%= _(' Suggest where else the requester might find the information. ')%>
      • -
      • <%= _(' Offer better ways of wording the request to get the information. ')%>
      • -<% end %> - -<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> -
      • <%= _(' Summarise the content of any information returned. ')%>
      • -
      • <%= _(' Say how you\'ve used the information, with links if possible.')%>
      • -
      • <%= _('Thank the public authority or ')%><%=h (@info_request.user_name ? @info_request.user_name : _('the requester')) %>.
      • -<% end %> -<% if [ 'partially_successful' ].include?(@info_request.described_state) %> -
      • <%= _('Suggest how the requester can find the rest of the information.')%>
      • -<% end %> -<% if [ 'successful', 'partially_successful' ].include?(@info_request.described_state) %> -
      • <%= _('Point to related information, campaigns or forums which may be useful.')%>
      • -<% end %> - -<% if [ 'gone_postal' ].include?(@info_request.described_state) %> -
      • <%= _('A summary of the response if you have received it by post. ')%>
      • -<% end %> - -<% if [ 'not_held' ].include?(@info_request.described_state) %> -
      • <%= _(' Ideas on what other documents to request which the authority may hold. ')%>
      • -<% end %> -<% if [ 'rejected' ].include?(@info_request.described_state) %> -
      • <%= _('Advise on whether the refusal is legal, and how to complain about it if not.') %>
      • -<% end %> - -<% if [ 'internal_review' ].include?(@info_request.described_state) %> -
      • <%= _('Advice on how to get a response that will satisfy the requester.
      • ') %> -<% end %> -<% if [ 'error_message' ].include?(@info_request.described_state) %> -
      • <%= _('You know what caused the error, and can suggest a solution, such as a working email address.')%>
      • -<% end %> -<% if [ 'requires_admin' ].include?(@info_request.described_state) %> -
      • <%= _('Your thoughts on what the {{site_name}} administrators should do about the request.', :site_name=>site_name) %>
      • -<% end %> - - -
      - -

      - <%= _('Annotations will be posted publicly here, and are - not sent to {{public_body_name}}.',:public_body_name=>h(@info_request.public_body.name)) %> - <% if @info_request.is_external? %> - <%= _('Note that the requester will not be notified about your annotation, because the request was published by {{public_body_name}} on their behalf.', :public_body_name => @info_request.public_body.name) %> - <% end %> -

      - -<%= render :partial => 'comment/comment_form', :locals => { :track_thing => @track_thing } %> diff --git a/app/views/comment/preview.html.erb b/app/views/comment/preview.html.erb new file mode 100644 index 000000000..5367338ab --- /dev/null +++ b/app/views/comment/preview.html.erb @@ -0,0 +1,26 @@ +<% @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| %> + +

      <%= _('Now preview your annotation') %>

      + + <%= render :partial => 'comment/single_comment', :locals => { :comment => @comment } %> + +

      + <%= _('Your name and annotation will appear in search engines.')%> +

      + +

      + <%= f.hidden_field(:body) %> + <% if params[:subscribe_to_request] %> + <%= hidden_field_tag(:subscribe_to_request, "1") %> + <% end %> + <%= hidden_field_tag(:submitted_comment, 1) %> + <%= hidden_field_tag(:preview, 0 ) %> + <%= submit_tag _("Re-edit this annotation"), :name => 'reedit' %> + <%= submit_tag _("Post annotation"), :name => 'submit' %> +

      + +<% end %> + + diff --git a/app/views/comment/preview.rhtml b/app/views/comment/preview.rhtml deleted file mode 100644 index 5367338ab..000000000 --- a/app/views/comment/preview.rhtml +++ /dev/null @@ -1,26 +0,0 @@ -<% @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| %> - -

      <%= _('Now preview your annotation') %>

      - - <%= render :partial => 'comment/single_comment', :locals => { :comment => @comment } %> - -

      - <%= _('Your name and annotation will appear in search engines.')%> -

      - -

      - <%= f.hidden_field(:body) %> - <% if params[:subscribe_to_request] %> - <%= hidden_field_tag(:subscribe_to_request, "1") %> - <% end %> - <%= hidden_field_tag(:submitted_comment, 1) %> - <%= hidden_field_tag(:preview, 0 ) %> - <%= submit_tag _("Re-edit this annotation"), :name => 'reedit' %> - <%= submit_tag _("Post annotation"), :name => 'submit' %> -

      - -<% end %> - - diff --git a/app/views/contact_mailer/from_admin_message.html.erb b/app/views/contact_mailer/from_admin_message.html.erb new file mode 100644 index 000000000..bdb48d580 --- /dev/null +++ b/app/views/contact_mailer/from_admin_message.html.erb @@ -0,0 +1,2 @@ +<%= @message.strip %> + diff --git a/app/views/contact_mailer/from_admin_message.rhtml b/app/views/contact_mailer/from_admin_message.rhtml deleted file mode 100644 index bdb48d580..000000000 --- a/app/views/contact_mailer/from_admin_message.rhtml +++ /dev/null @@ -1,2 +0,0 @@ -<%= @message.strip %> - diff --git a/app/views/contact_mailer/to_admin_message.html.erb b/app/views/contact_mailer/to_admin_message.html.erb new file mode 100644 index 000000000..9c0a74c02 --- /dev/null +++ b/app/views/contact_mailer/to_admin_message.html.erb @@ -0,0 +1,11 @@ +<%= @message.strip %> + +--------------------------------------------------------------------- +<%= _('Message sent using {{site_name}} contact form, ', :site_name=>site_name)%> +<%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %> + +<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %> +<% end %> <% if !@last_body.nil? %> + +<%= _('Last authority viewed: ')%><%= main_url(public_body_url(@last_body)) %> +<% end %>--------------------------------------------------------------------- diff --git a/app/views/contact_mailer/to_admin_message.rhtml b/app/views/contact_mailer/to_admin_message.rhtml deleted file mode 100644 index 9c0a74c02..000000000 --- a/app/views/contact_mailer/to_admin_message.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= @message.strip %> - ---------------------------------------------------------------------- -<%= _('Message sent using {{site_name}} contact form, ', :site_name=>site_name)%> -<%=(@logged_in_user ? ("logged in as user " + main_url(user_url(@logged_in_user))) : "not logged in")%><% if !@last_request.nil? %> - -<%= _('Last request viewed: ')%><%= main_url(request_url(@last_request)) %> -<% end %> <% if !@last_body.nil? %> - -<%= _('Last authority viewed: ')%><%= main_url(public_body_url(@last_body)) %> -<% end %>--------------------------------------------------------------------- diff --git a/app/views/contact_mailer/user_message.html.erb b/app/views/contact_mailer/user_message.html.erb new file mode 100644 index 000000000..b1d6e81ae --- /dev/null +++ b/app/views/contact_mailer/user_message.html.erb @@ -0,0 +1,13 @@ +--------------------------------------------------------------------- +<%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %> +<%= _('Your details, including your email address, have not been given to anyone.') %> +<%= _('If you reply to this message it will go directly to {{user_name}}, who will +learn your email address. Only reply if that is okay.', :user_name => @from_user.name) %> +--------------------------------------------------------------------- + +<%= @message.strip %> + +--------------------------------------------------------------------- +<%= _('View Freedom of Information requests made by {{user_name}}:', :user_name=>@from_user.name)%> +<%= @from_user_url %> +--------------------------------------------------------------------- diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.rhtml deleted file mode 100644 index b1d6e81ae..000000000 --- a/app/views/contact_mailer/user_message.rhtml +++ /dev/null @@ -1,13 +0,0 @@ ---------------------------------------------------------------------- -<%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %> -<%= _('Your details, including your email address, have not been given to anyone.') %> -<%= _('If you reply to this message it will go directly to {{user_name}}, who will -learn your email address. Only reply if that is okay.', :user_name => @from_user.name) %> ---------------------------------------------------------------------- - -<%= @message.strip %> - ---------------------------------------------------------------------- -<%= _('View Freedom of Information requests made by {{user_name}}:', :user_name=>@from_user.name)%> -<%= @from_user_url %> ---------------------------------------------------------------------- diff --git a/app/views/general/_advanced_search_tips.html.erb b/app/views/general/_advanced_search_tips.html.erb new file mode 100644 index 000000000..914abc1af --- /dev/null +++ b/app/views/general/_advanced_search_tips.html.erb @@ -0,0 +1,49 @@ +
      + +

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

      +
        +
      • <%= _("Enter words that you want to find separated by spaces, e.g. climbing lane") %>
      • +
      • <%= _('Use OR (in capital letters) where you don\'t mind which word, e.g. commons OR lords') %> +
      • <%= _('Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"') %>
      • +
      • <%= _('status: to select based on the status or historical status of the request, see the table of statuses below.', :statuses_url => "#statuses") %>
      • +
      • <%= _('variety: to select type of thing to search for, see the table of varieties below.', :varieties_url => "#varieties") %>
      • +
      • <%= _('requested_from:home_office to search requests from the Home Office, typing the name as in the URL.')%>
      • +
      • <%= _('requested_by:julian_todd to search requests made by Julian Todd, typing the name as in the URL.') %>
      • +
      • <%= _('commented_by:tony_bowden to search annotations made by Tony Bowden, typing the name as in the URL.')%>
      • +
      • <%= _('request: to restrict to a specific request, typing the title as in the URL.')%> +
      • <%= _('filetype:pdf to find all responses with PDF attachments. Or try these: {{list_of_file_extensions}}', :list_of_file_extensions => IncomingMessage.get_all_file_extensions)%>
      • +
      • <%= _('Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.')%>
      • +
      • <%= _('tag:charity to find all public authorities or requests with a given tag. You can include multiple tags, + and tag values, e.g. tag:openlylocal AND tag:financial_transaction:335633. Note that by default any of the tags + can be present, you have to put AND explicitly if you only want results them all present.')%>
      • +
      • <%= _('Read about advanced search operators, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %>
      • +
      + +

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

      +

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

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

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

      +

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

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

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

      -
        -
      • <%= _("Enter words that you want to find separated by spaces, e.g. climbing lane") %>
      • -
      • <%= _('Use OR (in capital letters) where you don\'t mind which word, e.g. commons OR lords') %> -
      • <%= _('Use quotes when you want to find an exact phrase, e.g. "Liverpool City Council"') %>
      • -
      • <%= _('status: to select based on the status or historical status of the request, see the table of statuses below.', :statuses_url => "#statuses") %>
      • -
      • <%= _('variety: to select type of thing to search for, see the table of varieties below.', :varieties_url => "#varieties") %>
      • -
      • <%= _('requested_from:home_office to search requests from the Home Office, typing the name as in the URL.')%>
      • -
      • <%= _('requested_by:julian_todd to search requests made by Julian Todd, typing the name as in the URL.') %>
      • -
      • <%= _('commented_by:tony_bowden to search annotations made by Tony Bowden, typing the name as in the URL.')%>
      • -
      • <%= _('request: to restrict to a specific request, typing the title as in the URL.')%> -
      • <%= _('filetype:pdf to find all responses with PDF attachments. Or try these: {{list_of_file_extensions}}', :list_of_file_extensions => IncomingMessage.get_all_file_extensions)%>
      • -
      • <%= _('Type 01/01/2008..14/01/2008 to only show things that happened in the first two weeks of January.')%>
      • -
      • <%= _('tag:charity to find all public authorities or requests with a given tag. You can include multiple tags, - and tag values, e.g. tag:openlylocal AND tag:financial_transaction:335633. Note that by default any of the tags - can be present, you have to put AND explicitly if you only want results them all present.')%>
      • -
      • <%= _('Read about advanced search operators, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %>
      • -
      - -

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

      -

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

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

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

      -

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

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

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

      + <%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:", + :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %> +
        + <% for popular_body in @popular_bodies %> +
      • <%=public_body_link(popular_body)%> + <%= n_('%d request', '%d requests', popular_body.info_requests_count) % popular_body.info_requests_count %> +
      • + <% end%> +
      +

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

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

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

      - <%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:", - :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %> -
        - <% for popular_body in @popular_bodies %> -
      • <%=public_body_link(popular_body)%> - <%= n_('%d request', '%d requests', popular_body.info_requests_count) % popular_body.info_requests_count %> -
      • - <% end%> -
      -

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

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

      + Your Right to Know +

      +

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

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

      - Your Right to Know -

      -

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

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

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

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

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

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

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

      + <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", + :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %> +
        + <% for event in @request_events %> +
      • + <% if @request_events_all_successful %> + <%= _("{{public_body_link}} answered a request about", + :public_body_link => public_body_link(event.info_request.public_body)) %> + <% else %> + <%= _("{{public_body_link}} was sent a request about", + :public_body_link => public_body_link(event.info_request.public_body)) %> + <% end %> + + <%=link_to h(event.info_request.title), request_url(event.info_request)%> + <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> +

        <%= excerpt(event.search_text_main(true), "", 200) %>

        +
      • + <% end %> +
      +

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

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

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

      - <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", - :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %> -
        - <% for event in @request_events %> -
      • - <% if @request_events_all_successful %> - <%= _("{{public_body_link}} answered a request about", - :public_body_link => public_body_link(event.info_request.public_body)) %> - <% else %> - <%= _("{{public_body_link}} was sent a request about", - :public_body_link => public_body_link(event.info_request.public_body)) %> - <% end %> - - <%=link_to h(event.info_request.title), request_url(event.info_request)%> - <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> -

        <%= excerpt(event.search_text_main(true), "", 200) %>

        -
      • - <% end %> -
      -

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

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

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

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

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

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

      <%=@title %>

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

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

      +

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

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

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

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

      <%=@title %>

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

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

      -

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

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

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

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

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

      + +

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

      + +
        +
      • <%= _("Check for mistakes if you typed or copied the address.")%>
      • +
      • <%= _("Search the site to find what you were looking for.")%> + <%= form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %> + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= submit_tag _("Search") %> + <% end %> +
      • +
      + <% else %> +

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

      +

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

      + + <% end %> +

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

      +

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

      +

      <%= h(@exception_message) %>

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

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

      - -

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

      - -
        -
      • <%= _("Check for mistakes if you typed or copied the address.")%>
      • -
      • <%= _("Search the site to find what you were looking for.")%> - <%= form_tag({:controller => "general", :action => "search_redirect"}, {:id => "search_form"}) do %> - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= submit_tag _("Search") %> - <% end %> -
      • -
      - <% else %> -

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

      -

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

      - - <% end %> -

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

      -

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

      -

      <%= h(@exception_message) %>

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

      <%= _("Search") %>

      + <% else %> +

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

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

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

      + +
      +
      +

      <%= _("Showing") %>

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

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

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

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

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

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

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

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

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

      <%=@title %>

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

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

      + <% else %> +

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

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

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

      + <% end %> +

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

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

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

      + <% else %> +

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

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

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

      + <% else %> +

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

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

      <%= _("Search") %>

      - <% else %> -

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

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

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

      - -
      -
      -

      <%= _("Showing") %>

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

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

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

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

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

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

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

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

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

      <%=@title %>

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

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

      - <% else %> -

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

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

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

      - <% end %> -

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

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

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

      - <% else %> -

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

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

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

      - <% else %> -

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

      - <% end %> - -
      - <% for result in @xapian_requests.results %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> -
      - - <%= will_paginate WillPaginate::Collection.new(@page, @requests_per_page, @xapian_requests.matches_estimated) %> - <% end %> -
      -<% end %> - -<% if @advanced %> - <%= render :partial => 'general/advanced_search_tips' %> -<% end %> diff --git a/app/views/help/_sidebar.html.erb b/app/views/help/_sidebar.html.erb new file mode 100644 index 000000000..2b7ed5647 --- /dev/null +++ b/app/views/help/_sidebar.html.erb @@ -0,0 +1,20 @@ +
      +

      Help pages

      +
        +
      • <%= link_to_unless_current "Introduction", help_about_path %>
      • +
      • <%= link_to_unless_current "Making requests", help_requesting_path %>
      • +
      • <%= link_to_unless_current "Your privacy", help_privacy_path %>
      • +
      • <%= link_to_unless_current "FOI officers", help_officers_path %>
      • +
      • <%= link_to_unless_current "About the software", help_alaveteli_path %>
      • +
      • <%= link_to_unless_current "Credits", help_credits_path %>
      • +
      • <%= link_to_unless_current "Programmers API", help_api_path %>
      • +
      • <%= link_to_unless_current "Advanced search", advanced_search_path %>
      • +
      + +

      Contact us

      +

      If your question isn't answered here, or you just wanted to let us know + something about the site, contact us. +

      +
      + + diff --git a/app/views/help/_sidebar.rhtml b/app/views/help/_sidebar.rhtml deleted file mode 100644 index 2b7ed5647..000000000 --- a/app/views/help/_sidebar.rhtml +++ /dev/null @@ -1,20 +0,0 @@ -
      -

      Help pages

      -
        -
      • <%= link_to_unless_current "Introduction", help_about_path %>
      • -
      • <%= link_to_unless_current "Making requests", help_requesting_path %>
      • -
      • <%= link_to_unless_current "Your privacy", help_privacy_path %>
      • -
      • <%= link_to_unless_current "FOI officers", help_officers_path %>
      • -
      • <%= link_to_unless_current "About the software", help_alaveteli_path %>
      • -
      • <%= link_to_unless_current "Credits", help_credits_path %>
      • -
      • <%= link_to_unless_current "Programmers API", help_api_path %>
      • -
      • <%= link_to_unless_current "Advanced search", advanced_search_path %>
      • -
      - -

      Contact us

      -

      If your question isn't answered here, or you just wanted to let us know - something about the site, contact us. -

      -
      - - diff --git a/app/views/help/_why_they_should_reply_by_email.html.erb b/app/views/help/_why_they_should_reply_by_email.html.erb new file mode 100644 index 000000000..faaa2b2e2 --- /dev/null +++ b/app/views/help/_why_they_should_reply_by_email.html.erb @@ -0,0 +1,3 @@ +The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (more details). + +At the bottom of this page, write a reply to the authority explaining this to them. diff --git a/app/views/help/_why_they_should_reply_by_email.rhtml b/app/views/help/_why_they_should_reply_by_email.rhtml deleted file mode 100644 index faaa2b2e2..000000000 --- a/app/views/help/_why_they_should_reply_by_email.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (more details). - -At the bottom of this page, write a reply to the authority explaining this to them. diff --git a/app/views/help/about.html.erb b/app/views/help/about.html.erb new file mode 100644 index 000000000..477f0e750 --- /dev/null +++ b/app/views/help/about.html.erb @@ -0,0 +1,53 @@ +<% @title = "About" %> + +<%= render :partial => 'sidebar' %> + +
      +

      Introduction

      +
      + +
      What is WhatDoTheyKnow for? #
      +
      To help you find out inside information about what the UK government + is doing. +
      + +
      How does the site work? #
      +
      You choose the public authority that you would like information from, then + write a brief note describing what you want to know. We then send your request + to the public authority. Any response they make is automatically published on the + website for you and anyone else to find and read. +
      + +
      Why would I bother to do this? #
      +
      You pay taxes, and then government does things with the money. All sorts of + things that affect your life, from healthcare through to national defence. Some + it does badly, some it does well. The more we find out about how government + works, the better able we are to make suggestions to improve the things that + are done badly, and to celebrate the things that are done well. +
      + +
      Why would the public authority bother to reply? #
      +
      Under Freedom of Information (FOI) law, they have to respond. The response + will either contain the information you want, or give a valid legal reason why + it must be kept confidential. +
      + +
      Who makes WhatDoTheyKnow? #
      +
      WhatDoTheyKnow is created and run by mySociety, + and was initially funded by the JRSST Charitable Trust. mySociety is a project of the + registered charity UK Citizens Online Democracy. + If you like what we're doing, then you can + make a donation. +
      + +
      How can I keep up with news about WhatDoTheyKnow?#
      +
      We have a blog and a twitter feed. +
      + + +
      + +

      Next, read about making requests --> + +

      +
      diff --git a/app/views/help/about.rhtml b/app/views/help/about.rhtml deleted file mode 100644 index 477f0e750..000000000 --- a/app/views/help/about.rhtml +++ /dev/null @@ -1,53 +0,0 @@ -<% @title = "About" %> - -<%= render :partial => 'sidebar' %> - -
      -

      Introduction

      -
      - -
      What is WhatDoTheyKnow for? #
      -
      To help you find out inside information about what the UK government - is doing. -
      - -
      How does the site work? #
      -
      You choose the public authority that you would like information from, then - write a brief note describing what you want to know. We then send your request - to the public authority. Any response they make is automatically published on the - website for you and anyone else to find and read. -
      - -
      Why would I bother to do this? #
      -
      You pay taxes, and then government does things with the money. All sorts of - things that affect your life, from healthcare through to national defence. Some - it does badly, some it does well. The more we find out about how government - works, the better able we are to make suggestions to improve the things that - are done badly, and to celebrate the things that are done well. -
      - -
      Why would the public authority bother to reply? #
      -
      Under Freedom of Information (FOI) law, they have to respond. The response - will either contain the information you want, or give a valid legal reason why - it must be kept confidential. -
      - -
      Who makes WhatDoTheyKnow? #
      -
      WhatDoTheyKnow is created and run by mySociety, - and was initially funded by the JRSST Charitable Trust. mySociety is a project of the - registered charity UK Citizens Online Democracy. - If you like what we're doing, then you can - make a donation. -
      - -
      How can I keep up with news about WhatDoTheyKnow?#
      -
      We have a blog and a twitter feed. -
      - - -
      - -

      Next, read about making requests --> - -

      -
      diff --git a/app/views/help/alaveteli.html.erb b/app/views/help/alaveteli.html.erb new file mode 100644 index 000000000..6210f9f24 --- /dev/null +++ b/app/views/help/alaveteli.html.erb @@ -0,0 +1,30 @@ +<% @title = "Making requests" %> + +<%= render :partial => 'sidebar' %> +
      + <% if params[:country_name] %> +

      <%= _("Would you like to see a website like this in your country?") %>

      + <% else %> +

      Powered by Alaveteli

      + <% end %> +

      This website is powered by Alaveteli. Alaveteli is free software + for making Freedom of Information requests. It can easily be + translated into any language, and customised for variations of FOI + law.

      + +

      The development of Alaveteli is sponsored and supported by a + number of foundations and charities who are interested in + transparency across the world.

      + +

      If you would like to set up an Alaveteli website in your own + country, we can help. You will need a few days to get the site + configured and ready to use, and will then have to spend at least an + hour a week moderating and managing the site (more for busy + websites).

      + +

      Read more on the Alaveteli + website, or drop us an + email.

      + + +
      diff --git a/app/views/help/alaveteli.rhtml b/app/views/help/alaveteli.rhtml deleted file mode 100644 index 6210f9f24..000000000 --- a/app/views/help/alaveteli.rhtml +++ /dev/null @@ -1,30 +0,0 @@ -<% @title = "Making requests" %> - -<%= render :partial => 'sidebar' %> -
      - <% if params[:country_name] %> -

      <%= _("Would you like to see a website like this in your country?") %>

      - <% else %> -

      Powered by Alaveteli

      - <% end %> -

      This website is powered by Alaveteli. Alaveteli is free software - for making Freedom of Information requests. It can easily be - translated into any language, and customised for variations of FOI - law.

      - -

      The development of Alaveteli is sponsored and supported by a - number of foundations and charities who are interested in - transparency across the world.

      - -

      If you would like to set up an Alaveteli website in your own - country, we can help. You will need a few days to get the site - configured and ready to use, and will then have to spend at least an - hour a week moderating and managing the site (more for busy - websites).

      - -

      Read more on the Alaveteli - website, or drop us an - email.

      - - -
      diff --git a/app/views/help/api.html.erb b/app/views/help/api.html.erb new file mode 100644 index 000000000..da6253f87 --- /dev/null +++ b/app/views/help/api.html.erb @@ -0,0 +1,81 @@ +<% @title = "About our API" %> + +<%= render :partial => 'sidebar' %> + +
      +

      <%=@title %>

      +
      +
      Introduction
      +
      +

      This page explains how programmers can make other websites and software + interact with WhatDoTheyKnow via an "API". +

      + +

      WhatDoTheyKnow does not have a full API yet, but we are gradually adding + lots of things that are similar in use to an API as they are requested. +

      +
      + +
      Linking to new requests
      +
      +

      To encourage your users to make links to a particular public authority, use URLs of the form + <%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>. + These are the parameters you can add to those URLs, either in the URL or from a form. + +

        +
      • title - default summary of the new request.
      • +
      • default_letter - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this.
      • +
      • body - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff.
      • +
      • tags - space separated list of tags, so you can find and link up any requests made later, e.g. openlylocal spending_id:12345. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs. +
      +
      + +
      RSS (actually, Atom) feeds +
      +

      There are Atom feeds on most pages which list FOI requests, which you can + use to get updates and links in XML format. Find the URL of the Atom feed in + one of these ways: +

        +
      • Look for the RSS feed links.
      • +
      • Examine the <link rel="alternate" type="application/atom+xml"> tag in the head of the HTML.
      • +
      • Add /feed to the start of another URL. +
      + +

      In particular, even complicated search queries have Atom feeds. + You can do all sorts of things with them, such as query by authority, by file + type, by date range, or by status. See the advanced search + tips for details. +

      + +
      JSON structured data
      +
      +

      Quite a few pages have JSON versions, which let you download information about + objects in a structured form. Find them by: +

      +
        +
      • Adding .json to the end of the URL.
      • +
      • Look for the <link rel="alternate" type="application/json"> tag in the head of the HTML.
      • +
      + +

      Requests, users and authorities all have JSON versions containing basic + information about them. Every Atom feed has a JSON equivalent, containing + information about the list of events in the feed. +

      +
      + +
      Spreadsheet of all authorities
      +
      +

      + A spreadsheet file listing every body in WhatDoTheyKnow is available: + <%= link_to "all-authorities.csv", all_public_bodies_csv_url() %> +

      + +
      +
      + +

      Please contact us if you need an API feature that isn't there yet. It's + very much a work in progress, and we do add things when people ask us to.

      + + +
      + diff --git a/app/views/help/api.rhtml b/app/views/help/api.rhtml deleted file mode 100644 index da6253f87..000000000 --- a/app/views/help/api.rhtml +++ /dev/null @@ -1,81 +0,0 @@ -<% @title = "About our API" %> - -<%= render :partial => 'sidebar' %> - -
      -

      <%=@title %>

      -
      -
      Introduction
      -
      -

      This page explains how programmers can make other websites and software - interact with WhatDoTheyKnow via an "API". -

      - -

      WhatDoTheyKnow does not have a full API yet, but we are gradually adding - lots of things that are similar in use to an API as they are requested. -

      -
      - -
      Linking to new requests
      -
      -

      To encourage your users to make links to a particular public authority, use URLs of the form - <%= link_to new_request_to_body_url(:url_name => "liverpool_city_council") , new_request_to_body_url(:url_name => "liverpool_city_council") %>. - These are the parameters you can add to those URLs, either in the URL or from a form. - -

        -
      • title - default summary of the new request.
      • -
      • default_letter - default text of the body of the letter. The salutation (Dear...) and signoff (Yours...) are wrapped round this.
      • -
      • body - as an alternative to default_letter, this sets the default entire text of the request, so you can customise the salutation and signoff.
      • -
      • tags - space separated list of tags, so you can find and link up any requests made later, e.g. openlylocal spending_id:12345. The : indicates it is a machine tag. The values of machine tags may also include colons, useful for URIs. -
      -
      - -
      RSS (actually, Atom) feeds -
      -

      There are Atom feeds on most pages which list FOI requests, which you can - use to get updates and links in XML format. Find the URL of the Atom feed in - one of these ways: -

        -
      • Look for the RSS feed links.
      • -
      • Examine the <link rel="alternate" type="application/atom+xml"> tag in the head of the HTML.
      • -
      • Add /feed to the start of another URL. -
      - -

      In particular, even complicated search queries have Atom feeds. - You can do all sorts of things with them, such as query by authority, by file - type, by date range, or by status. See the advanced search - tips for details. -

      - -
      JSON structured data
      -
      -

      Quite a few pages have JSON versions, which let you download information about - objects in a structured form. Find them by: -

      -
        -
      • Adding .json to the end of the URL.
      • -
      • Look for the <link rel="alternate" type="application/json"> tag in the head of the HTML.
      • -
      - -

      Requests, users and authorities all have JSON versions containing basic - information about them. Every Atom feed has a JSON equivalent, containing - information about the list of events in the feed. -

      -
      - -
      Spreadsheet of all authorities
      -
      -

      - A spreadsheet file listing every body in WhatDoTheyKnow is available: - <%= link_to "all-authorities.csv", all_public_bodies_csv_url() %> -

      - -
      -
      - -

      Please contact us if you need an API feature that isn't there yet. It's - very much a work in progress, and we do add things when people ask us to.

      - - -
      - diff --git a/app/views/help/contact.html.erb b/app/views/help/contact.html.erb new file mode 100644 index 000000000..0c245ace7 --- /dev/null +++ b/app/views/help/contact.html.erb @@ -0,0 +1,97 @@ +<% @title = "Contact us" %> + +<%= foi_error_messages_for :contact %> + +

      <%= @title %>

      + +
      + + <% if !flash[:notice] %> +

      Contact an authority to get official information

      +
        +
      • Go here to make a request, in public, for information + from public authorities.
      • + +
      • + Asking for private information about yourself? + Please read our + help page. +
      • +
      + + <% end %> + +

      Contact the <%= site_name %> team

      + <% if !flash[:notice] %> +
        +
      • + Please read the help page first, as it may + answer your question quicker. +
      • + +
      • We'd love to hear how you've found using this site. + Either fill in this form, or send an email to <%=@contact_email%> +
      • + +
      • We are a charity and not part of the + Government.
      • +
      + <% end %> +
      + +<%= form_for :contact do |f| %> + + <% if not @user %> +

      + + <%= f.text_field :name, :size => 20 %> + (or <%= link_to "sign in", signin_url(:r => request.fullpath) %>) +

      + +

      + + <%= f.text_field :email, :size => 20 %> +

      + <% end %> + +

      + + <%= f.text_field :subject, :size => 50 %> +

      + +

      + + <%= f.text_area :message, :rows => 10, :cols => 60 %> +

      + + <% if !@last_request.nil? %> +

      + + <%=request_link(@last_request) %> + <%= submit_tag "remove", :name => 'remove' %> +

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

      + + <%=public_body_link(@last_body) %> + <%= submit_tag "remove", :name => 'remove' %> +

      + <% end %> + +

      + We can only help you with technical problems, or questions + about Freedom of Information. +

      + + +
      + <%= hidden_field_tag(:submitted_contact_form, 1) %> + <%= submit_tag "Send message to the charity" %> + <-- we run this site, not the Government! +
      + +<% end %> + + diff --git a/app/views/help/contact.rhtml b/app/views/help/contact.rhtml deleted file mode 100644 index 0c245ace7..000000000 --- a/app/views/help/contact.rhtml +++ /dev/null @@ -1,97 +0,0 @@ -<% @title = "Contact us" %> - -<%= foi_error_messages_for :contact %> - -

      <%= @title %>

      - -
      - - <% if !flash[:notice] %> -

      Contact an authority to get official information

      -
        -
      • Go here to make a request, in public, for information - from public authorities.
      • - -
      • - Asking for private information about yourself? - Please read our - help page. -
      • -
      - - <% end %> - -

      Contact the <%= site_name %> team

      - <% if !flash[:notice] %> -
        -
      • - Please read the help page first, as it may - answer your question quicker. -
      • - -
      • We'd love to hear how you've found using this site. - Either fill in this form, or send an email to <%=@contact_email%> -
      • - -
      • We are a charity and not part of the - Government.
      • -
      - <% end %> -
      - -<%= form_for :contact do |f| %> - - <% if not @user %> -

      - - <%= f.text_field :name, :size => 20 %> - (or <%= link_to "sign in", signin_url(:r => request.fullpath) %>) -

      - -

      - - <%= f.text_field :email, :size => 20 %> -

      - <% end %> - -

      - - <%= f.text_field :subject, :size => 50 %> -

      - -

      - - <%= f.text_area :message, :rows => 10, :cols => 60 %> -

      - - <% if !@last_request.nil? %> -

      - - <%=request_link(@last_request) %> - <%= submit_tag "remove", :name => 'remove' %> -

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

      - - <%=public_body_link(@last_body) %> - <%= submit_tag "remove", :name => 'remove' %> -

      - <% end %> - -

      - We can only help you with technical problems, or questions - about Freedom of Information. -

      - - -
      - <%= hidden_field_tag(:submitted_contact_form, 1) %> - <%= submit_tag "Send message to the charity" %> - <-- we run this site, not the Government! -
      - -<% end %> - - diff --git a/app/views/help/credits.html.erb b/app/views/help/credits.html.erb new file mode 100644 index 000000000..02f1e40e8 --- /dev/null +++ b/app/views/help/credits.html.erb @@ -0,0 +1,91 @@ +<% @title = "Credit where credit's due" %> + +<%= render :partial => 'sidebar' %> + +
      +

      <%= @title%>

      + +
      +
      Who made WhatDoTheyKnow? #
      +
      Oh, nearly everyone (and maybe you too)! +
        +
      • + Heather Brooke + (vampy!) has + been pushing the idea of a UK FOI archive for years now. +
      • +
      • + Both Phil Rodgers and Francis Irving + entered it in a mySociety competition for ideas for public interest websites to build. +
      • +
      • + It won, + and then Chris Lightfoot (RIP :() + thought up the wheeze of intercepting email responses to requests and + automatically publishing them. +
      • +
      • + Tom Steinberg got the cash to pay for the site from + a dead chocolate mogul (thank you!) ... +
      • +
      • + ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville + and Tom Steinberg could do the complex mixture of design and coding to build + what you see today. +
      • +
      • + Thanks particularly to Julian Todd (great blog!), + Francis Davey, and Etienne Pollard for using the site early on and giving + feedback (and/or legal advice!), and also to all our other users and + testers. +
      • +
      • + The amazing team of volunteers who run the site, answer your support + emails, maintain the database of public authorities and + so much more. + Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene, + Richard Taylor. +
      • +
      • + Volunteers who have provided patches to the code - thanks Peter Collingbourne + and Tony Bowden. +
      • +
      • + Everyone who has helped look up FOI email addresses. +
      • +
      • + We couldn't do any of this without those + crazy people who volunteer, + amongst many other things, to do the accounts and fill in our VAT return. +
      • +
      • + Finally, all the officers and servants who have answered the many requests + made through the site. Their diligence, patience and professionalism is + what has actually made the information that you see here. Thank them for + helping make Government more transparent. +
      • +
      + You're all stars. +
      + +
      Can I help out? #
      +
      +

      Yes please! We're built out of our supporters and volunteers.

      +
        +
      • You can make a donation. We're a registered charity.
      • +
      • Help people find successful requests, and monitor performance of authorities, by + playing the categorisation game.
      • +
      • Find out FOI email addresses of authorities that we're missing.
      • +
      • Write a blog post about either WhatDoTheyKnow or an interesting request that you've + found. Post about it on a forum that you frequent. Tell friends about it.
      • If you're + a programmer, get the source code for our parent project, Alaveteli + and tell us about patches we can pull. It's made in Ruby on Rails. +
      • Read more about volunteering with mySociety. +
      +
      +
      + + +
      + + diff --git a/app/views/help/credits.rhtml b/app/views/help/credits.rhtml deleted file mode 100644 index 02f1e40e8..000000000 --- a/app/views/help/credits.rhtml +++ /dev/null @@ -1,91 +0,0 @@ -<% @title = "Credit where credit's due" %> - -<%= render :partial => 'sidebar' %> - -
      -

      <%= @title%>

      - -
      -
      Who made WhatDoTheyKnow? #
      -
      Oh, nearly everyone (and maybe you too)! -
        -
      • - Heather Brooke - (vampy!) has - been pushing the idea of a UK FOI archive for years now. -
      • -
      • - Both Phil Rodgers and Francis Irving - entered it in a mySociety competition for ideas for public interest websites to build. -
      • -
      • - It won, - and then Chris Lightfoot (RIP :() - thought up the wheeze of intercepting email responses to requests and - automatically publishing them. -
      • -
      • - Tom Steinberg got the cash to pay for the site from - a dead chocolate mogul (thank you!) ... -
      • -
      • - ... so that Francis Irving, Angie Ahl, Tommy Martin, Louise Crow, Matthew Somerville - and Tom Steinberg could do the complex mixture of design and coding to build - what you see today. -
      • -
      • - Thanks particularly to Julian Todd (great blog!), - Francis Davey, and Etienne Pollard for using the site early on and giving - feedback (and/or legal advice!), and also to all our other users and - testers. -
      • -
      • - The amazing team of volunteers who run the site, answer your support - emails, maintain the database of public authorities and - so much more. - Thanks to John Cross, Ben Harris, Adam McGreggor, Alex Skene, - Richard Taylor. -
      • -
      • - Volunteers who have provided patches to the code - thanks Peter Collingbourne - and Tony Bowden. -
      • -
      • - Everyone who has helped look up FOI email addresses. -
      • -
      • - We couldn't do any of this without those - crazy people who volunteer, - amongst many other things, to do the accounts and fill in our VAT return. -
      • -
      • - Finally, all the officers and servants who have answered the many requests - made through the site. Their diligence, patience and professionalism is - what has actually made the information that you see here. Thank them for - helping make Government more transparent. -
      • -
      - You're all stars. -
      - -
      Can I help out? #
      -
      -

      Yes please! We're built out of our supporters and volunteers.

      -
        -
      • You can make a donation. We're a registered charity.
      • -
      • Help people find successful requests, and monitor performance of authorities, by - playing the categorisation game.
      • -
      • Find out FOI email addresses of authorities that we're missing.
      • -
      • Write a blog post about either WhatDoTheyKnow or an interesting request that you've - found. Post about it on a forum that you frequent. Tell friends about it.
      • If you're - a programmer, get the source code for our parent project, Alaveteli - and tell us about patches we can pull. It's made in Ruby on Rails. -
      • Read more about volunteering with mySociety. -
      -
      -
      - - -
      - - diff --git a/app/views/help/officers.html.erb b/app/views/help/officers.html.erb new file mode 100644 index 000000000..b13e225fe --- /dev/null +++ b/app/views/help/officers.html.erb @@ -0,0 +1,247 @@ +<% @title = "FOI officer questions" %> + +<%= render :partial => 'sidebar' %> + +
      +

      <%= @title %> #

      + +
      + +
      I just got here from bottom of an FOI request, what is going on? #
      + +

      WhatDoTheyKnow is a service run by a charity. It helps ordinary members + of the public make FOI requests, and easily track and share the responses.

      + +

      The FOI request you received was made by someone using WhatDoTheyKnow. You can + simply reply to the request as you would any other request from an individual. + The only difference is that your response will be automatically published on + the Internet. +

      +

      If you have privacy or other concerns, please read the answers below. + You might also like to read the introduction to WhatDoTheyKnow to find out more about what + the site does from the point of view of a user. You can also search the + site to find the authority that you work for, and view the status of + any requests made using the site. + +

      Finally, we welcome comments and + thoughts from FOI officers, please get in touch. +

      +
      + +
      Why are you publishing responses to FOI requests? #
      + +
      We think there are lots of benefits. Most importantly it will encourage the + public to be more interested and involved in the work of government. We + also hope that it will reduce the number of duplicate requests on any + subject that a public body will receive. Given that Freedom of Information + responses contain public information, which anybody could easily request + again from the public authority, we think there should be no reason not to + publish it widely. +
      + +
      Are the people making requests real people? #
      + +
      Yes. For the purposes of keeping track of responses we use + computer-generated email addresses for each request. However, before + they can send a request, each user must register on the site with a + unique email address that we then verify. You can search this site and + find a page listing all requests that each person has made. +
      + +
      An email isn't a sufficient address for an FOI request! #
      + +
      Yes it is. This + letter from the ICO to Rother District Council gives guidance on the matter, specifically + in the context of requests made via WhatDoTheyKnow. +
      + +
      Aren't you making lots of vexatious requests? #
      + +

      WhatDoTheyKnow is not making any requests. We are sending requests on + behalf of our users, who are real people making the requests.

      +

      Look at it like this - if lots of different people made requests from + different Hotmail email addresses, then you would not think that Microsoft were + making vexatious requests. It is exactly the same if lots of requests are made + via WhatDoTheyKnow. Moreover, since all requests are public it is much easier + for you to see if one of our users is making vexatious requests.

      +

      If that isn't enough for you, the + letter from the ICO to Rother District Council gives some guidance on the matter.

      +
      + +
      I can see a request on WhatDoTheyKnow, but we never got it by email!#
      + +

      If a request appears on the site, then we have attempted to send it to + the authority by email. Any delivery failure messages will automatically + appear on the site. You can check the address we're using with the "View FOI + email address" link which appears on the page for the authority. Contact us if there is a better address we can + use.

      +

      Requests are sometimes not delivered because they are quietly removed by + "spam filters" in the IT department of the authority. Authorities can make + sure this doesn't happen by asking their IT departments to "whitelist" + any email from @whatdotheyknow.com. + If you ask us we will resend any request, + and/or give technical details of delivery so an IT department can chase + up what happened to the message. +

      +

      Finally, you can respond to any request from your web browser, without + needing any email, using the "respond to request" link at the bottom of + each request page. +

      + +
      How do you calculate the deadline shown on request pages?#
      + +
      +

      The Freedom of Information Act says:

      + +

      A public authority must comply with section 1(1) promptly and + in any event not later than the twentieth working day following the date of + receipt.

      + +

      The nerdy detail of exactly how weekends are counted, and what happens if + the request arrives out of office hours, is just that - detail. What matters + here is that the law says authorities must respond promptly.

      + +

      If you've got a good reason why the request is going to take a while to + process, requesters find it really helpful if you can send a quick email with a + sentence or two saying what is happening.

      + +

      FOI officers often have to do a lot of hard work to answer + requests, and this is hidden from the public. We think it would help everyone + to have more of that complexity visible.

      + +
      + +
      But really, how do you calculate the deadline?#
      + +
      + +

      Please read the answer to the previous question first. Legally, authorities + must respond promptly to FOI requests. If they fail to do that, + it is best if they show the hard work they are doing by explaining what is + taking the extra time to do. +

      + +

      That said, WhatDoTheyKnow does show the maximum legal deadline + for response on each request. Here's how we calculate it.

      + +
        + +
      • If the day we deliver the request by email is a working day, we count that + as "day zero", even if it was delivered late in the evening. Days end at + midnight. We then count the next working day as "day one", and so on up to + 20 working days.
      • + +
      • If the day the request email was delivered was a non-working day, we count + the next working day as "day one". Delivery is delivery, even if it happened on + the weekend. Some authorities disagree with this, our lawyer disagrees with them.
      • + +
      • Requesters are encouraged to mark when they have clarified + their request so the clock resets, but sometimes they get this wrong. If you + see a problem with a particular request, let us know and we'll fix it.
      • +
      + +

      The date thus calculated is shown on requests with the text "By law, + Liverpool City Council should normally have responded by...". There is only + one case which is not normal, see the next question about + public interest test time extensions. +

      + +

      Schools are also a special case, which WhatDoTheyKnow displays differently. +

      + +
        +
      • Since June 2009, schools have "20 working days + disregarding any working day which is not a school day, or 60 working days, + whichever is first" (FOI (Time for Compliance with Request) Regulations 2009). WhatDoTheyKnow indicates on requests to schools that the 20 day deadline is only + during term time, and shows them as definitely overdue after 60 working days +
      • +
      + +

      If you're getting really nerdy about all this, read the detailed ICO guidance. + Meanwhile, remember that the law says authorities must respond + promptly. That's really what matters.

      + +
      + +
      How do you reflect time extensions for public interest tests?#
      + +
      + +

      The Freedom of Information Act lets authorities claim an indefinite time + extension when applying a public interest test. Information + Commissioner guidance says that it should only be used in "exceptionally + complex" cases + (FOI Good Practice Guidance No. 4). + WhatDoTheyKnow doesn't specifically handle this case, which is why we use the + phrase "should normally have responded by" when the 20 working day time is + exceeded. +

      + +

      The same guidance says that, even in exceptionally complex cases, no + Freedom of Information request should take more than 40 working days + to answer. WhatDoTheyKnow displays requests which are overdue by that much + with stronger wording to indicate they are definitely late. +

      + +

      The Freedom of Information (Scotland) Act does not allow such a public + interest extension. WhatDoTheyKnow would like to see the law changed to either + remove the extension from the UK Act, or to reintroduce an absolute time limit + of 40 working days even with the extension (the House of Lords voted + to remove provision for such a time limit during the initial passage + of the UK Act through Parliament). +

      +
      + +
      How can I send a large file, which won't go by email?#
      + +
      Instead of email, you can respond to a request directly from your web + browser, including uploading a file. To do this, choose "respond to request" at + the bottom of the request's page. Contact us if it + is too big for even that (more than, say, 50Mb). +
      + +
      Why do you publish the names of civil servants and the text of emails? #
      + +
      We consider what officers or servants do in the course of their employment + to be public information. We will only remove content in exceptional + circumstances, see our take down policy. +
      + +
      Do you publish email addresses or mobile phone numbers? #
      + +

      To prevent spam, we automatically remove most emails and some mobile numbers from + responses to requests. Please contact us if we've + missed one. + For technical reasons we don't always remove them from attachments, such as certain PDFs.

      +

      If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address + forms an important part of a response and we will post it up in an obscured + form in an annotation. +

      + + + +
      Our Freedom of Information law is "applicant blind", so anyone in the + world can request the same document and get a copy of it. + + If you think our making a document available on the internet infringes your + copyright, you may contact us and ask us + to take it down. However, to save tax payers' money by preventing duplicate + requests, and for good public relations, we'd advise you not to do that. +
      + +
      + + + + +

      If you haven't already, read the introduction --> +
      Otherwise, the credits or the programmers API --> + +

      +
      + + diff --git a/app/views/help/officers.rhtml b/app/views/help/officers.rhtml deleted file mode 100644 index b13e225fe..000000000 --- a/app/views/help/officers.rhtml +++ /dev/null @@ -1,247 +0,0 @@ -<% @title = "FOI officer questions" %> - -<%= render :partial => 'sidebar' %> - -
      -

      <%= @title %> #

      - -
      - -
      I just got here from bottom of an FOI request, what is going on? #
      - -

      WhatDoTheyKnow is a service run by a charity. It helps ordinary members - of the public make FOI requests, and easily track and share the responses.

      - -

      The FOI request you received was made by someone using WhatDoTheyKnow. You can - simply reply to the request as you would any other request from an individual. - The only difference is that your response will be automatically published on - the Internet. -

      -

      If you have privacy or other concerns, please read the answers below. - You might also like to read the introduction to WhatDoTheyKnow to find out more about what - the site does from the point of view of a user. You can also search the - site to find the authority that you work for, and view the status of - any requests made using the site. - -

      Finally, we welcome comments and - thoughts from FOI officers, please get in touch. -

      -
      - -
      Why are you publishing responses to FOI requests? #
      - -
      We think there are lots of benefits. Most importantly it will encourage the - public to be more interested and involved in the work of government. We - also hope that it will reduce the number of duplicate requests on any - subject that a public body will receive. Given that Freedom of Information - responses contain public information, which anybody could easily request - again from the public authority, we think there should be no reason not to - publish it widely. -
      - -
      Are the people making requests real people? #
      - -
      Yes. For the purposes of keeping track of responses we use - computer-generated email addresses for each request. However, before - they can send a request, each user must register on the site with a - unique email address that we then verify. You can search this site and - find a page listing all requests that each person has made. -
      - -
      An email isn't a sufficient address for an FOI request! #
      - -
      Yes it is. This - letter from the ICO to Rother District Council gives guidance on the matter, specifically - in the context of requests made via WhatDoTheyKnow. -
      - -
      Aren't you making lots of vexatious requests? #
      - -

      WhatDoTheyKnow is not making any requests. We are sending requests on - behalf of our users, who are real people making the requests.

      -

      Look at it like this - if lots of different people made requests from - different Hotmail email addresses, then you would not think that Microsoft were - making vexatious requests. It is exactly the same if lots of requests are made - via WhatDoTheyKnow. Moreover, since all requests are public it is much easier - for you to see if one of our users is making vexatious requests.

      -

      If that isn't enough for you, the - letter from the ICO to Rother District Council gives some guidance on the matter.

      -
      - -
      I can see a request on WhatDoTheyKnow, but we never got it by email!#
      - -

      If a request appears on the site, then we have attempted to send it to - the authority by email. Any delivery failure messages will automatically - appear on the site. You can check the address we're using with the "View FOI - email address" link which appears on the page for the authority. Contact us if there is a better address we can - use.

      -

      Requests are sometimes not delivered because they are quietly removed by - "spam filters" in the IT department of the authority. Authorities can make - sure this doesn't happen by asking their IT departments to "whitelist" - any email from @whatdotheyknow.com. - If you ask us we will resend any request, - and/or give technical details of delivery so an IT department can chase - up what happened to the message. -

      -

      Finally, you can respond to any request from your web browser, without - needing any email, using the "respond to request" link at the bottom of - each request page. -

      - -
      How do you calculate the deadline shown on request pages?#
      - -
      -

      The Freedom of Information Act says:

      - -

      A public authority must comply with section 1(1) promptly and - in any event not later than the twentieth working day following the date of - receipt.

      - -

      The nerdy detail of exactly how weekends are counted, and what happens if - the request arrives out of office hours, is just that - detail. What matters - here is that the law says authorities must respond promptly.

      - -

      If you've got a good reason why the request is going to take a while to - process, requesters find it really helpful if you can send a quick email with a - sentence or two saying what is happening.

      - -

      FOI officers often have to do a lot of hard work to answer - requests, and this is hidden from the public. We think it would help everyone - to have more of that complexity visible.

      - -
      - -
      But really, how do you calculate the deadline?#
      - -
      - -

      Please read the answer to the previous question first. Legally, authorities - must respond promptly to FOI requests. If they fail to do that, - it is best if they show the hard work they are doing by explaining what is - taking the extra time to do. -

      - -

      That said, WhatDoTheyKnow does show the maximum legal deadline - for response on each request. Here's how we calculate it.

      - -
        - -
      • If the day we deliver the request by email is a working day, we count that - as "day zero", even if it was delivered late in the evening. Days end at - midnight. We then count the next working day as "day one", and so on up to - 20 working days.
      • - -
      • If the day the request email was delivered was a non-working day, we count - the next working day as "day one". Delivery is delivery, even if it happened on - the weekend. Some authorities disagree with this, our lawyer disagrees with them.
      • - -
      • Requesters are encouraged to mark when they have clarified - their request so the clock resets, but sometimes they get this wrong. If you - see a problem with a particular request, let us know and we'll fix it.
      • -
      - -

      The date thus calculated is shown on requests with the text "By law, - Liverpool City Council should normally have responded by...". There is only - one case which is not normal, see the next question about - public interest test time extensions. -

      - -

      Schools are also a special case, which WhatDoTheyKnow displays differently. -

      - -
        -
      • Since June 2009, schools have "20 working days - disregarding any working day which is not a school day, or 60 working days, - whichever is first" (FOI (Time for Compliance with Request) Regulations 2009). WhatDoTheyKnow indicates on requests to schools that the 20 day deadline is only - during term time, and shows them as definitely overdue after 60 working days -
      • -
      - -

      If you're getting really nerdy about all this, read the detailed ICO guidance. - Meanwhile, remember that the law says authorities must respond - promptly. That's really what matters.

      - -
      - -
      How do you reflect time extensions for public interest tests?#
      - -
      - -

      The Freedom of Information Act lets authorities claim an indefinite time - extension when applying a public interest test. Information - Commissioner guidance says that it should only be used in "exceptionally - complex" cases - (FOI Good Practice Guidance No. 4). - WhatDoTheyKnow doesn't specifically handle this case, which is why we use the - phrase "should normally have responded by" when the 20 working day time is - exceeded. -

      - -

      The same guidance says that, even in exceptionally complex cases, no - Freedom of Information request should take more than 40 working days - to answer. WhatDoTheyKnow displays requests which are overdue by that much - with stronger wording to indicate they are definitely late. -

      - -

      The Freedom of Information (Scotland) Act does not allow such a public - interest extension. WhatDoTheyKnow would like to see the law changed to either - remove the extension from the UK Act, or to reintroduce an absolute time limit - of 40 working days even with the extension (the House of Lords voted - to remove provision for such a time limit during the initial passage - of the UK Act through Parliament). -

      -
      - -
      How can I send a large file, which won't go by email?#
      - -
      Instead of email, you can respond to a request directly from your web - browser, including uploading a file. To do this, choose "respond to request" at - the bottom of the request's page. Contact us if it - is too big for even that (more than, say, 50Mb). -
      - -
      Why do you publish the names of civil servants and the text of emails? #
      - -
      We consider what officers or servants do in the course of their employment - to be public information. We will only remove content in exceptional - circumstances, see our take down policy. -
      - -
      Do you publish email addresses or mobile phone numbers? #
      - -

      To prevent spam, we automatically remove most emails and some mobile numbers from - responses to requests. Please contact us if we've - missed one. - For technical reasons we don't always remove them from attachments, such as certain PDFs.

      -

      If you need to know what an address was that we've removed, please get in touch with us. Occasionally, an email address - forms an important part of a response and we will post it up in an obscured - form in an annotation. -

      - - - -
      Our Freedom of Information law is "applicant blind", so anyone in the - world can request the same document and get a copy of it. - - If you think our making a document available on the internet infringes your - copyright, you may contact us and ask us - to take it down. However, to save tax payers' money by preventing duplicate - requests, and for good public relations, we'd advise you not to do that. -
      - -
      - - - - -

      If you haven't already, read the introduction --> -
      Otherwise, the credits or the programmers API --> - -

      -
      - - diff --git a/app/views/help/privacy.html.erb b/app/views/help/privacy.html.erb new file mode 100644 index 000000000..8e5293892 --- /dev/null +++ b/app/views/help/privacy.html.erb @@ -0,0 +1,184 @@ +<% @title = "Your privacy" %> + +<%= render :partial => 'sidebar' %> + +
      +

      <%= @title %>

      +
      + +
      Who gets to see my email address? #
      + +

      We will not disclose your email address to anyone unless we are obliged to by law, + or you ask us to. This includes the public authority that you are sending a + request to. They only get to see an email address + @whatdotheyknow.com which is specific to that request.

      +

      If you send a message to another user on the site, then it will reveal your + email address to them. You will be told that this is going to happen.

      +
      + +
      Will you send nasty, brutish spam to my email address? #
      +
      Nope. After you sign up to WhatDoTheyKnow we will only send you emails + relating to a request you made, an email alert that you have signed up for, + or for other reasons that you specifically authorise. We will never give or + sell your email addresses to anyone else, unless we are obliged to by law, or + you ask us to. +
      + +
      Why will my name and my request appear publicly on the site? #
      + +
      +

      We publish your request on the Internet so that anybody can read it and + make use of the information that you have found. We do not normally delete + requests (more details). +

      +

      + Your name is tangled up with your request, so has to be published as well. + It is only fair, as we're going to publish the name of the civil servant who + writes the response to your request. Using your real name also helps people + get in touch with you to assist you with your research or to campaign with you. +

      +

      By law, you must use your real name for the request to be a valid Freedom of + Information request. See the next question for alternatives if you do not want + to publish your full name. +

      +
      + +
      Can I make an FOI request using a pseudonym? #
      + + +
      +

      Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this + guidance from the Information Commissioner (January 2009). +

      + +

      However, the same guidance also says it is good practice for the public +authority to still consider a request made using an obvious pseudonym. +You should refer to this if a public authority refuses a request because you +used a pseudonym.

      + +

      Be careful though, even if the authority follows this good practice, the +pseudonym will probably make it impossible for you to complain to the +Information Commissioner later about the handling of your request. +

      + +

      There are several good alternatives to using a pseudonym.

      + +
        +
      • Use a different form of your name. The guidance says +that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts", +"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.". +
      • +
      • Women may use their maiden name.
      • +
      • In most cases, you may use any name by which you are "widely known and/or +is regularly used". +
      • Use the name of an organisation, the name of a company, the trading name of +a company, or the trading name of a sole trader. +
      • Ask someone else to make the request on your behalf. +
      • You may, if you are really stuck, ask us to make the request on +your behalf. Please contact us with +a good reason why you cannot make the request yourself and cannot +ask a friend to. We don't have the resources to do this for everyone. +
      + +

      Please do not try to impersonate someone else.

      + +
      + +
      They've asked for my postal address! #
      + +
      +

      If a public authority asks you for your full, physical address, reply to them saying +that section 8.1.b of the FOI Act asks for an "address for correspondence", +and that the email address you are using is sufficient. +

      +

      +The Ministry of Justice has guidance +on this – +"As well as hard copy written correspondence, requests that are +transmitted electronically (for example, in emails) are acceptable +... If a request is received by email and no postal address is given, the email +address should be treated as the return address." + +

      +

      As if that isn't enough, the Information Commissioner's +Hints for Practitioners say +"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation." +

      +
      + +
      No no, they need a postal address to send a paper response! #
      + +
      +

      If an authority only has a paper copy of the information that you want, +they may ask you for a postal address. To start with, try persuading them +to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case +embarrassed the authority into finding one they had already.

      + +

      If that doesn't work, and you want to provide your postal address privately +in order to receive the documents, mark your request as "They are going to reply by post", and it will +give you an email address to use for that purpose.

      +
      + +
      Can you delete my requests, or alter my name? #
      + +
      + +

      <%= site_name %> is a permanent, public archive of Freedom of +Information requests. Even though you may not find the response to +a request useful any more, it may be of interest to others. For this +reason, we will not delete requests. +

      + +

      Under exceptional circumstances we may remove or change your name +on the website, see the next question. +Similarly, we may also remove other personal information. +

      + +

      If you're worried about this before you make your request, +see the section on pseudonyms.

      + +
      + +
      Can you take down personal information about me? #
      + +
      + +

      If you see any personal information about you on the site which you'd like +us to remove or hide, then please let us know. +Specify exactly what information you believe to be problematic and why, and +where it appears on the site.

      + +

      If it is sensitive personal information that has been accidentally +posted, then we will usually remove it. Normally we will only consider +requests to remove personal information which come from the individual +concerned, but for sensitive information we would appreciate anyone +pointing out anything they see.

      + +

      We consider that there is a strong public interest in +retaining the names of officers or servants of public authorities. We will only +remove such names in exceptional circumstances, such as where the disclosure of +a name and position of employment would substantially risk an individual's +safety. If you are such an official and you wish to have your name removed for +such an urgent reason, you must supply us with a request to do so from your +line manager. This request must demonstrate that a risk has been perceived +which outweighs the public interest, and must demonstrate that efforts have +been made to conceal the name on the organisation's own website.

      + +

      For all other requests we apply a public interest test to decide +whether information should be removed. + Section 32 +of the Data Protection Act 1998 permits us to do this, as the material we +publish is journalistic. We cannot easily edit many types of attachments (such +as PDFs, or Microsoft Word or Excel files), so we will usually ask +that authorities resend these with the personal information removed.

      + +
      + + +
      + +

      Learn more from the help for FOI officers --> + +

      +
      + diff --git a/app/views/help/privacy.rhtml b/app/views/help/privacy.rhtml deleted file mode 100644 index 8e5293892..000000000 --- a/app/views/help/privacy.rhtml +++ /dev/null @@ -1,184 +0,0 @@ -<% @title = "Your privacy" %> - -<%= render :partial => 'sidebar' %> - -
      -

      <%= @title %>

      -
      - -
      Who gets to see my email address? #
      - -

      We will not disclose your email address to anyone unless we are obliged to by law, - or you ask us to. This includes the public authority that you are sending a - request to. They only get to see an email address - @whatdotheyknow.com which is specific to that request.

      -

      If you send a message to another user on the site, then it will reveal your - email address to them. You will be told that this is going to happen.

      -
      - -
      Will you send nasty, brutish spam to my email address? #
      -
      Nope. After you sign up to WhatDoTheyKnow we will only send you emails - relating to a request you made, an email alert that you have signed up for, - or for other reasons that you specifically authorise. We will never give or - sell your email addresses to anyone else, unless we are obliged to by law, or - you ask us to. -
      - -
      Why will my name and my request appear publicly on the site? #
      - -
      -

      We publish your request on the Internet so that anybody can read it and - make use of the information that you have found. We do not normally delete - requests (more details). -

      -

      - Your name is tangled up with your request, so has to be published as well. - It is only fair, as we're going to publish the name of the civil servant who - writes the response to your request. Using your real name also helps people - get in touch with you to assist you with your research or to campaign with you. -

      -

      By law, you must use your real name for the request to be a valid Freedom of - Information request. See the next question for alternatives if you do not want - to publish your full name. -

      -
      - -
      Can I make an FOI request using a pseudonym? #
      - - -
      -

      Technically, you must use your real name for your request to be a valid Freedom of Information request in law. See this - guidance from the Information Commissioner (January 2009). -

      - -

      However, the same guidance also says it is good practice for the public -authority to still consider a request made using an obvious pseudonym. -You should refer to this if a public authority refuses a request because you -used a pseudonym.

      - -

      Be careful though, even if the authority follows this good practice, the -pseudonym will probably make it impossible for you to complain to the -Information Commissioner later about the handling of your request. -

      - -

      There are several good alternatives to using a pseudonym.

      - -
        -
      • Use a different form of your name. The guidance says -that "Mr Arthur Thomas Roberts" can make a valid request as "Arthur Roberts", -"A. T. Roberts", or "Mr Roberts", but not as "Arthur" or "A.T.R.". -
      • -
      • Women may use their maiden name.
      • -
      • In most cases, you may use any name by which you are "widely known and/or -is regularly used". -
      • Use the name of an organisation, the name of a company, the trading name of -a company, or the trading name of a sole trader. -
      • Ask someone else to make the request on your behalf. -
      • You may, if you are really stuck, ask us to make the request on -your behalf. Please contact us with -a good reason why you cannot make the request yourself and cannot -ask a friend to. We don't have the resources to do this for everyone. -
      - -

      Please do not try to impersonate someone else.

      - -
      - -
      They've asked for my postal address! #
      - -
      -

      If a public authority asks you for your full, physical address, reply to them saying -that section 8.1.b of the FOI Act asks for an "address for correspondence", -and that the email address you are using is sufficient. -

      -

      -The Ministry of Justice has guidance -on this – -"As well as hard copy written correspondence, requests that are -transmitted electronically (for example, in emails) are acceptable -... If a request is received by email and no postal address is given, the email -address should be treated as the return address." - -

      -

      As if that isn't enough, the Information Commissioner's -Hints for Practitioners say -"Any correspondence could include a request for information. If it is written (this includes e-mail), legible, gives the name of the applicant, an address for reply (which could be electronic), and includes a description of the information required, then it will fall within the scope of the legislation." -

      -
      - -
      No no, they need a postal address to send a paper response! #
      - -
      -

      If an authority only has a paper copy of the information that you want, -they may ask you for a postal address. To start with, try persuading them -to scan in the documents for you. You can even offer to gift them a scanner, which in that particular case -embarrassed the authority into finding one they had already.

      - -

      If that doesn't work, and you want to provide your postal address privately -in order to receive the documents, mark your request as "They are going to reply by post", and it will -give you an email address to use for that purpose.

      -
      - -
      Can you delete my requests, or alter my name? #
      - -
      - -

      <%= site_name %> is a permanent, public archive of Freedom of -Information requests. Even though you may not find the response to -a request useful any more, it may be of interest to others. For this -reason, we will not delete requests. -

      - -

      Under exceptional circumstances we may remove or change your name -on the website, see the next question. -Similarly, we may also remove other personal information. -

      - -

      If you're worried about this before you make your request, -see the section on pseudonyms.

      - -
      - -
      Can you take down personal information about me? #
      - -
      - -

      If you see any personal information about you on the site which you'd like -us to remove or hide, then please let us know. -Specify exactly what information you believe to be problematic and why, and -where it appears on the site.

      - -

      If it is sensitive personal information that has been accidentally -posted, then we will usually remove it. Normally we will only consider -requests to remove personal information which come from the individual -concerned, but for sensitive information we would appreciate anyone -pointing out anything they see.

      - -

      We consider that there is a strong public interest in -retaining the names of officers or servants of public authorities. We will only -remove such names in exceptional circumstances, such as where the disclosure of -a name and position of employment would substantially risk an individual's -safety. If you are such an official and you wish to have your name removed for -such an urgent reason, you must supply us with a request to do so from your -line manager. This request must demonstrate that a risk has been perceived -which outweighs the public interest, and must demonstrate that efforts have -been made to conceal the name on the organisation's own website.

      - -

      For all other requests we apply a public interest test to decide -whether information should be removed. - Section 32 -of the Data Protection Act 1998 permits us to do this, as the material we -publish is journalistic. We cannot easily edit many types of attachments (such -as PDFs, or Microsoft Word or Excel files), so we will usually ask -that authorities resend these with the personal information removed.

      - -
      - - -
      - -

      Learn more from the help for FOI officers --> - -

      -
      - diff --git a/app/views/help/requesting.html.erb b/app/views/help/requesting.html.erb new file mode 100644 index 000000000..e7cfdd199 --- /dev/null +++ b/app/views/help/requesting.html.erb @@ -0,0 +1,293 @@ +<% @title = "Making requests" %> + +<%= render :partial => 'sidebar' %> +
      +

      <%= @title %>

      +
      + +
      I'm not sure which authority to make my request to, how can I find out? #
      + +
      +

      It can be hard to untangle government's complicated structured, and work out + who knows the information that you want. Here are a few tips: +

        +
      • Browse or search WhatDoTheyKnow looking for similar requests to yours.
      • +
      • When you've found an authority you think might have the information, use + the "home page" link on the right hand side of their page to check what they do + on their website.
      • +
      • Contact the authority by phone or email to ask if they hold the kind of + information you're after.
      • +
      • Don't worry excessively about getting the right authority. If you get it + wrong, they ought to advise you who to make the request to instead. +
      • +
      • If you've got a thorny case, please contact us for help.
      • +
      + +
      + + + +
      You're missing the public authority that I want to request from! #
      + +
      +

      Please contact us with the name of the public authority and, + if you can find it, their contact email address for Freedom of Information requests. +

      +

      If you'd like to help add a whole category of public authority to the site, we'd love + to hear from you too. +

      + +
      + +
      Why do you include some authorities that aren't formally subject to FOI?#
      + +
      +

      WhatDoTheyKnow lets you make requests for information to a range of + organisations:

      + +
        +
      • Those formally subject to the FOI Act
      • +
      • Those formally subject to the Environmental Regulations (a less well + defined group)
      • +
      • Those which voluntarily comply with the FOI Act
      • +
      • Those which aren't subject to the Act but we think should be, on grounds + such as them having significant public responsibilities. +
      • +
      + +

      In the last case, we're using the site to lobby for expansion of the + scope of the FOI Act. Even if an organisation is not legally obliged to respond + to an FOI request, they can still do so voluntarily. +

      + +
      + +
      Why must I keep my request focused?#
      + +
      + +

      + Please put in your request only what is needed so that someone can + easily identify what information you are asking for. Please do + not include any of the following: +

      + +
        +
      • arguments about your cause
      • +
      • statements that could defame or insult others
      • +
      + +

      + If you do, we may have to remove your request to avoid problems with + libel law, which is a pain for both you and us. Short, succinct messages + make it easier for authorities to be clear what information you are + requesting, which means you will get a reply more quickly. +

      + +

      + If you want information to support an argument or campaign, Freedom of + Information is a powerful tool. Although you may not use this site to + run your campaign, we encourage you to use it to get the information you + need. We also encourage to run your campaign elsewhere - one effective + and very easy way is to <%= link_to 'start your own blog', + "http://wordpress.com/"%>. You are welcome to link to your campaign + from this site in an annotation to your request (you can make + annotations after submitting the request). +

      + +
      + +
      Does it cost me anything to make a request?#
      + +
      + +

      Making an FOI request is nearly always free.

      + +

      Authorities often include unnecessary, scary, boilerplate in + acknowledgement messages saying they "may" charge a fee. Ignore such notices. + They hardly ever will actually charge a fee. If they do, they can only charge you if + you have specifically agreed in advance to pay. More + details from the Information Commissioner. +

      + +

      Sometimes an authority will refuse your request, saying that the cost + of handling it exceeds £600 (for central government) or £450 (for all other + public authorities). At this point you can refine your + request. e.g. it would be much cheaper for an authority to tell you the amount + spent on marshmallows in the past year than in the past ten years. +

      + +
      + + + +
      How quickly will I get a response? #
      + +
      +

      By law, public authorities must respond promptly to + requests. +

      + +

      Even if they are not prompt, in nearly all cases they must respond within + 20 working days. If you had to clarify your request, or they are a school, + or one or two other cases, then they may have more time + (full details). + +

      WhatDoTheyKnow will email you if you don't get a timely response. You can + then send the public authority a message to remind them, and tell them if they + are breaking the law.

      + +
      + +
      Deadline extended #
      + +
      +

      By law, public authorities must needs more time for request ... (TO DO) +

      + + +
      +
      What if I never get a response?#
      + +
      +

      There are several things you can do if you never get a response.

      +
        +
      • Sometimes there has been a genuine problem and the authority never + received the request. It is worth telephoning the authority and politely + checking that they received the request. It was sent to them by email. +
      • +
      • If they have not received it, the problem is most likely due to + "spam filters". Refer the authority to the measures in the answer + 'I can see a request on WhatDoTheyKnow, but we never got it by email!' + in the FOI officers section of this help. +
      • +
      • If you're still having no luck, then you can ask for an internal review, + and then complain to the Information Commissioner about the authority. + Read our page 'Unhappy about the response you got?'. +
      +
      + +
      What if I'm not satisfied with the response? #
      +
      If you didn't get the information you asked for, or you didn't get it in time, + then read our page 'Unhappy about the response you got?'. +
      + +
      It says I can't re-use the information I got!#
      +
      +

      Authorities often add legal boilerplate about the + "Re-Use of Public Sector + Information Regulations 2005", which at first glance implies you may not + be able do anything with the information. +

      + +

      You can, of course, write articles about the information or summarise it, or + quote parts of it. We also think you should feel free to republish the + information in full, just as we do, even though in theory you might not be + allowed to do so. See our policy on copyright.

      + +
      + +
      Can you tell me more of the nitty gritty about the process of making requests? #
      + +
      +

      Have a look at the + access to official information + pages on the Information Commissioner's website.

      + +

      If you're requesting information from a Scottish public authority, + the process is very similar. There are differences around time + limits for compliance. + See the Scottish + Information Commissioner's guidance for details.

      +
      + +
      Can I request information about myself? #
      + +
      +

      No. Requests made using WhatDoTheyKnow are public, made under the Freedom of + Information Act, and cannot help you find information about a private + individual.

      + +

      If you would like to know what information a public + authority holds about yourself, you should make a "Subject Access Request" in + private using Data Protection law. The leaflet "How to access your information" (on the Information Commissioner's + website) explains how to do this.

      + +

      If you see that somebody has included personal information, perhaps + unwittingly, in a request, please contact us + immediately so we can remove it.

      +
      + + +
      I'd like to keep my request secret! (At least until I publish my story) #
      + +

      WhatDoTheyKnow is currently only designed for public requests. All + responses that we receive are automatically published on the website for anyone + to read.

      +

      You should contact the public authority directly if you would like to + make a request in private. If you're interested in buying a system which helps + you manage FOI requests in secret, then contact us. +

      +
      + +
      Why can I only request information about the environment from some authorities? #
      + +
      +

      Some public authorities, such as South East Water, + don't come under the Freedom of Information Act, but do come under another law called + the Environmental Information Regulations (EIR). +

      + +

      It's a very similar law, so you make a request + to them using WhatDoTheyKnow in just the same way as an FOI request. The only + difference is that on the page where your write you request, it reminds you + that you can only request "environmental information" and tells you what that + means. It is quite broad. +

      + +

      You can, of course, request environmental information from other + authorities. Just make a Freedom of Information (FOI) request as normal. The + authority has a duty to work out if the Environmental Information Regulations + (EIR) is the more appropriate legislation to reply under. +

      +
      + +
      Can I make the same to request to lots of authorities, e.g. all councils? #
      + +
      We ask you to first send a test version of your request to a few + authorities. Their responses will help you improve the wording of your request, + so that you get the best information when you send the request to all of + the authorities. There is currently no automated system for sending the request + to the other authorities, you must copy and paste it by hand. + +
      + +
      I made a request off the site, how do I upload it to the archive?#
      + +
      WhatDoTheyKnow is an archive of requests made through the site, + and does not try to be an archive of all FOI requests. We'll never support uploading + other requests. For one thing, we wouldn't be able to verify that other + responses actually came from the authority. If this really matters to you, + you can always make the same request again via WhatDoTheyKnow. +
      + +
      How do you moderate request annotations? #
      + +
      +

      Annotations on WhatDoTheyKnow are to help + people get the information they want, or to give them pointers to places they + can go to help them act on it. We reserve the right to remove anything else. +

      +

      Endless, political discussions are not allowed. + Post a link to a suitable forum or campaign site elsewhere.

      +
      + +
      + +

      Next, read about your privacy --> + +

      +
      + diff --git a/app/views/help/requesting.rhtml b/app/views/help/requesting.rhtml deleted file mode 100644 index e7cfdd199..000000000 --- a/app/views/help/requesting.rhtml +++ /dev/null @@ -1,293 +0,0 @@ -<% @title = "Making requests" %> - -<%= render :partial => 'sidebar' %> -
      -

      <%= @title %>

      -
      - -
      I'm not sure which authority to make my request to, how can I find out? #
      - -
      -

      It can be hard to untangle government's complicated structured, and work out - who knows the information that you want. Here are a few tips: -

        -
      • Browse or search WhatDoTheyKnow looking for similar requests to yours.
      • -
      • When you've found an authority you think might have the information, use - the "home page" link on the right hand side of their page to check what they do - on their website.
      • -
      • Contact the authority by phone or email to ask if they hold the kind of - information you're after.
      • -
      • Don't worry excessively about getting the right authority. If you get it - wrong, they ought to advise you who to make the request to instead. -
      • -
      • If you've got a thorny case, please contact us for help.
      • -
      - -
      - - - -
      You're missing the public authority that I want to request from! #
      - -
      -

      Please contact us with the name of the public authority and, - if you can find it, their contact email address for Freedom of Information requests. -

      -

      If you'd like to help add a whole category of public authority to the site, we'd love - to hear from you too. -

      - -
      - -
      Why do you include some authorities that aren't formally subject to FOI?#
      - -
      -

      WhatDoTheyKnow lets you make requests for information to a range of - organisations:

      - -
        -
      • Those formally subject to the FOI Act
      • -
      • Those formally subject to the Environmental Regulations (a less well - defined group)
      • -
      • Those which voluntarily comply with the FOI Act
      • -
      • Those which aren't subject to the Act but we think should be, on grounds - such as them having significant public responsibilities. -
      • -
      - -

      In the last case, we're using the site to lobby for expansion of the - scope of the FOI Act. Even if an organisation is not legally obliged to respond - to an FOI request, they can still do so voluntarily. -

      - -
      - -
      Why must I keep my request focused?#
      - -
      - -

      - Please put in your request only what is needed so that someone can - easily identify what information you are asking for. Please do - not include any of the following: -

      - -
        -
      • arguments about your cause
      • -
      • statements that could defame or insult others
      • -
      - -

      - If you do, we may have to remove your request to avoid problems with - libel law, which is a pain for both you and us. Short, succinct messages - make it easier for authorities to be clear what information you are - requesting, which means you will get a reply more quickly. -

      - -

      - If you want information to support an argument or campaign, Freedom of - Information is a powerful tool. Although you may not use this site to - run your campaign, we encourage you to use it to get the information you - need. We also encourage to run your campaign elsewhere - one effective - and very easy way is to <%= link_to 'start your own blog', - "http://wordpress.com/"%>. You are welcome to link to your campaign - from this site in an annotation to your request (you can make - annotations after submitting the request). -

      - -
      - -
      Does it cost me anything to make a request?#
      - -
      - -

      Making an FOI request is nearly always free.

      - -

      Authorities often include unnecessary, scary, boilerplate in - acknowledgement messages saying they "may" charge a fee. Ignore such notices. - They hardly ever will actually charge a fee. If they do, they can only charge you if - you have specifically agreed in advance to pay. More - details from the Information Commissioner. -

      - -

      Sometimes an authority will refuse your request, saying that the cost - of handling it exceeds £600 (for central government) or £450 (for all other - public authorities). At this point you can refine your - request. e.g. it would be much cheaper for an authority to tell you the amount - spent on marshmallows in the past year than in the past ten years. -

      - -
      - - - -
      How quickly will I get a response? #
      - -
      -

      By law, public authorities must respond promptly to - requests. -

      - -

      Even if they are not prompt, in nearly all cases they must respond within - 20 working days. If you had to clarify your request, or they are a school, - or one or two other cases, then they may have more time - (full details). - -

      WhatDoTheyKnow will email you if you don't get a timely response. You can - then send the public authority a message to remind them, and tell them if they - are breaking the law.

      - -
      - -
      Deadline extended #
      - -
      -

      By law, public authorities must needs more time for request ... (TO DO) -

      - - -
      -
      What if I never get a response?#
      - -
      -

      There are several things you can do if you never get a response.

      -
        -
      • Sometimes there has been a genuine problem and the authority never - received the request. It is worth telephoning the authority and politely - checking that they received the request. It was sent to them by email. -
      • -
      • If they have not received it, the problem is most likely due to - "spam filters". Refer the authority to the measures in the answer - 'I can see a request on WhatDoTheyKnow, but we never got it by email!' - in the FOI officers section of this help. -
      • -
      • If you're still having no luck, then you can ask for an internal review, - and then complain to the Information Commissioner about the authority. - Read our page 'Unhappy about the response you got?'. -
      -
      - -
      What if I'm not satisfied with the response? #
      -
      If you didn't get the information you asked for, or you didn't get it in time, - then read our page 'Unhappy about the response you got?'. -
      - -
      It says I can't re-use the information I got!#
      -
      -

      Authorities often add legal boilerplate about the - "Re-Use of Public Sector - Information Regulations 2005", which at first glance implies you may not - be able do anything with the information. -

      - -

      You can, of course, write articles about the information or summarise it, or - quote parts of it. We also think you should feel free to republish the - information in full, just as we do, even though in theory you might not be - allowed to do so. See our policy on copyright.

      - -
      - -
      Can you tell me more of the nitty gritty about the process of making requests? #
      - -
      -

      Have a look at the - access to official information - pages on the Information Commissioner's website.

      - -

      If you're requesting information from a Scottish public authority, - the process is very similar. There are differences around time - limits for compliance. - See the Scottish - Information Commissioner's guidance for details.

      -
      - -
      Can I request information about myself? #
      - -
      -

      No. Requests made using WhatDoTheyKnow are public, made under the Freedom of - Information Act, and cannot help you find information about a private - individual.

      - -

      If you would like to know what information a public - authority holds about yourself, you should make a "Subject Access Request" in - private using Data Protection law. The leaflet "How to access your information" (on the Information Commissioner's - website) explains how to do this.

      - -

      If you see that somebody has included personal information, perhaps - unwittingly, in a request, please contact us - immediately so we can remove it.

      -
      - - -
      I'd like to keep my request secret! (At least until I publish my story) #
      - -

      WhatDoTheyKnow is currently only designed for public requests. All - responses that we receive are automatically published on the website for anyone - to read.

      -

      You should contact the public authority directly if you would like to - make a request in private. If you're interested in buying a system which helps - you manage FOI requests in secret, then contact us. -

      -
      - -
      Why can I only request information about the environment from some authorities? #
      - -
      -

      Some public authorities, such as South East Water, - don't come under the Freedom of Information Act, but do come under another law called - the Environmental Information Regulations (EIR). -

      - -

      It's a very similar law, so you make a request - to them using WhatDoTheyKnow in just the same way as an FOI request. The only - difference is that on the page where your write you request, it reminds you - that you can only request "environmental information" and tells you what that - means. It is quite broad. -

      - -

      You can, of course, request environmental information from other - authorities. Just make a Freedom of Information (FOI) request as normal. The - authority has a duty to work out if the Environmental Information Regulations - (EIR) is the more appropriate legislation to reply under. -

      -
      - -
      Can I make the same to request to lots of authorities, e.g. all councils? #
      - -
      We ask you to first send a test version of your request to a few - authorities. Their responses will help you improve the wording of your request, - so that you get the best information when you send the request to all of - the authorities. There is currently no automated system for sending the request - to the other authorities, you must copy and paste it by hand. - -
      - -
      I made a request off the site, how do I upload it to the archive?#
      - -
      WhatDoTheyKnow is an archive of requests made through the site, - and does not try to be an archive of all FOI requests. We'll never support uploading - other requests. For one thing, we wouldn't be able to verify that other - responses actually came from the authority. If this really matters to you, - you can always make the same request again via WhatDoTheyKnow. -
      - -
      How do you moderate request annotations? #
      - -
      -

      Annotations on WhatDoTheyKnow are to help - people get the information they want, or to give them pointers to places they - can go to help them act on it. We reserve the right to remove anything else. -

      -

      Endless, political discussions are not allowed. - Post a link to a suitable forum or campaign site elsewhere.

      -
      - -
      - -

      Next, read about your privacy --> - -

      -
      - diff --git a/app/views/help/unhappy.html.erb b/app/views/help/unhappy.html.erb new file mode 100644 index 000000000..2b00341c2 --- /dev/null +++ b/app/views/help/unhappy.html.erb @@ -0,0 +1,110 @@ +<% @title = "Unhappy about a Freedom of Information request?" %> + + +<% if !@info_request.nil? %> +

      Unhappy about the response you got +to your request '<%=request_link(@info_request) %>'? +

      +<% else %> +

      Unhappy about the response you got?

      +<% end %> + +

      If ...

      + +
        +
      • You didn't get a reply within 20 working days
      • +
      • You did not get all of the information that you requested or
      • +
      • Your request was refused, but without a reason valid under the law
      • +
      + +

      ... you can

      + +
        +
      1. Ask for an internal review at the public authority.
      2. +
      3. If that doesn't help, complain to the Information Commissioner.
      4. +
      5. Either way, also use other means to answer your question.
      6. +
      + +

      1. Asking for an internal review #

      + +

      +<% if !@info_request.nil? %> + <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup", :class => 'link_button_green' %> and then write a message asking the authority to review your request. +<% else %> + At the bottom of the relevant request page on <%= site_name %> choose + "request an internal review". Then write a message asking for an internal + review of your request. You may want to include a link to the + request page, to make it clear which request you are talking about. +<% end %> +

      + +

      Internal reviews should be quick. If one takes longer than 20 working days +then the authority should write and let you know, and it should never take +longer than 40 working days (see this +good +practice guide). +You will then either get the information that +you originally requested, or you will be told that the review upholds the +original decision. +

      + +

      2. Complaining to the Information Commissioner #

      + +

      If you are still unhappy after the public authority has done their internal review, +then you can complain to the Information Commissioner. To do this read +Complaints about Freedom of Information +on the Information Commissioner's website. If you requested information from a Scottish +authority, then appeal +to the Scottish Information Commissioner. +

      + +

      To make it easier to send the relevant information to the +Information Commissioner, either +<% if !@info_request.nil? %> + include a link to your request + <%=h main_url(request_url(@info_request)) %> +<% else %> + include a link to your request on <%= site_name %> +<% end %> +in your complaint or print out the whole page of your request and all attachments. +

      + +

      <%= site_name %> has no special facilities for handling a request at this stage - it +passes into the Information Commissioner's system. You can leave annotations on your +request keeping people informed of progress.

      + +

      A warning. There is a backlog of work at the Information Commissioner, and +it can take literally years to get resolution from them. If you reach this point, +you should accept that you won't get the information quickly by this means. Maybe +you want to help the fight to improve Freedom of Information, or maybe +getting the information slowly is still worthwhile. You can also try and +get the information by other means...

      + +

      3. Using other means to answer your question #

      + +

      You can try persuing your problem or your research in other ways. + +

        +
      • Make a new FOI request for summary information, or for +documentation relating indirectly to matters in your refused request. +Ask us for ideas if you're stuck.
      • +
      • If any other public authorities or publicly owned companies are involved, +then make FOI requests to them.
      • +
      • Write to your MP or other politician using WriteToThem and ask for their help +finding the answer. MPs can write directly to ministers or departments, and +can ask written questions in the House of Commons. Councillors in local authorities +can talk directly to council officers.
      • +
      • Ask other researchers who are interested in a similar +issue to yours for ideas. You can sometimes find them by browsing this site; +contact any registered user from their page. There may be an Internet +forum or group that they hang out in. If it is a local matter, use GroupsNearYou to find such a +forum.
      • +
      • Start a pledge on PledgeBank to get +others to act together with you. For example, you could arrange a meeting with +staff from the authority. Or you could form a small local campaigns group. +
      + + + diff --git a/app/views/help/unhappy.rhtml b/app/views/help/unhappy.rhtml deleted file mode 100644 index 2b00341c2..000000000 --- a/app/views/help/unhappy.rhtml +++ /dev/null @@ -1,110 +0,0 @@ -<% @title = "Unhappy about a Freedom of Information request?" %> - - -<% if !@info_request.nil? %> -

      Unhappy about the response you got -to your request '<%=request_link(@info_request) %>'? -

      -<% else %> -

      Unhappy about the response you got?

      -<% end %> - -

      If ...

      - -
        -
      • You didn't get a reply within 20 working days
      • -
      • You did not get all of the information that you requested or
      • -
      • Your request was refused, but without a reason valid under the law
      • -
      - -

      ... you can

      - -
        -
      1. Ask for an internal review at the public authority.
      2. -
      3. If that doesn't help, complain to the Information Commissioner.
      4. -
      5. Either way, also use other means to answer your question.
      6. -
      - -

      1. Asking for an internal review #

      - -

      -<% if !@info_request.nil? %> - <%= link_to "Request an internal review", show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup", :class => 'link_button_green' %> and then write a message asking the authority to review your request. -<% else %> - At the bottom of the relevant request page on <%= site_name %> choose - "request an internal review". Then write a message asking for an internal - review of your request. You may want to include a link to the - request page, to make it clear which request you are talking about. -<% end %> -

      - -

      Internal reviews should be quick. If one takes longer than 20 working days -then the authority should write and let you know, and it should never take -longer than 40 working days (see this -good -practice guide). -You will then either get the information that -you originally requested, or you will be told that the review upholds the -original decision. -

      - -

      2. Complaining to the Information Commissioner #

      - -

      If you are still unhappy after the public authority has done their internal review, -then you can complain to the Information Commissioner. To do this read -Complaints about Freedom of Information -on the Information Commissioner's website. If you requested information from a Scottish -authority, then appeal -to the Scottish Information Commissioner. -

      - -

      To make it easier to send the relevant information to the -Information Commissioner, either -<% if !@info_request.nil? %> - include a link to your request - <%=h main_url(request_url(@info_request)) %> -<% else %> - include a link to your request on <%= site_name %> -<% end %> -in your complaint or print out the whole page of your request and all attachments. -

      - -

      <%= site_name %> has no special facilities for handling a request at this stage - it -passes into the Information Commissioner's system. You can leave annotations on your -request keeping people informed of progress.

      - -

      A warning. There is a backlog of work at the Information Commissioner, and -it can take literally years to get resolution from them. If you reach this point, -you should accept that you won't get the information quickly by this means. Maybe -you want to help the fight to improve Freedom of Information, or maybe -getting the information slowly is still worthwhile. You can also try and -get the information by other means...

      - -

      3. Using other means to answer your question #

      - -

      You can try persuing your problem or your research in other ways. - -

        -
      • Make a new FOI request for summary information, or for -documentation relating indirectly to matters in your refused request. -Ask us for ideas if you're stuck.
      • -
      • If any other public authorities or publicly owned companies are involved, -then make FOI requests to them.
      • -
      • Write to your MP or other politician using WriteToThem and ask for their help -finding the answer. MPs can write directly to ministers or departments, and -can ask written questions in the House of Commons. Councillors in local authorities -can talk directly to council officers.
      • -
      • Ask other researchers who are interested in a similar -issue to yours for ideas. You can sometimes find them by browsing this site; -contact any registered user from their page. There may be an Internet -forum or group that they hang out in. If it is a local matter, use GroupsNearYou to find such a -forum.
      • -
      • Start a pledge on PledgeBank to get -others to act together with you. For example, you could arrange a meeting with -staff from the authority. Or you could form a small local campaigns group. -
      - - - diff --git a/app/views/holiday/due_date.html.erb b/app/views/holiday/due_date.html.erb new file mode 100644 index 000000000..6f8c2e51a --- /dev/null +++ b/app/views/holiday/due_date.html.erb @@ -0,0 +1,6 @@ +<% @title = "Due Date" %> + +

      Request made: <%= @request_date %> +

      Response due: <%= @due_date %> +

      Skipping: <%= @skipped.join(" and ") %> + diff --git a/app/views/holiday/due_date.rhtml b/app/views/holiday/due_date.rhtml deleted file mode 100644 index 6f8c2e51a..000000000 --- a/app/views/holiday/due_date.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<% @title = "Due Date" %> - -

      Request made: <%= @request_date %> -

      Response due: <%= @due_date %> -

      Skipping: <%= @skipped.join(" and ") %> - diff --git a/app/views/layouts/admin.html.erb b/app/views/layouts/admin.html.erb new file mode 100644 index 000000000..d85eecbf2 --- /dev/null +++ b/app/views/layouts/admin.html.erb @@ -0,0 +1,39 @@ + + + + + <%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%> + + <%= javascript_include_tag 'jquery.js', 'jquery-ui.min' %> + + <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> + <%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet" %> + + + +

      + <%= link_to 'Alaveteli', main_url('/') %> admin: + <%= link_to 'Summary', admin_url("") %> + | <%= link_to 'Timeline', admin_url("timeline") %> + | <%= link_to 'Stats', admin_url("stats") %> + | <%= link_to 'Debug', admin_url("debug") %> + View: + <%= link_to 'Authorities', admin_url("body/list") %> + | <%= link_to 'Requests', admin_url("request/list") %> + | <%= link_to 'Users', admin_url("user/list") %> + | <%= link_to 'Tracks', admin_url("track/list") %> +

      + <%= render :partial => 'general/locale_switcher' %> + + <% if flash[:error] %> +

      <%= flash[:error] %>

      + <% end %> + + <% if flash[:notice] %> +

      <%= flash[:notice] %>

      + <% end %> + + <%= yield %> + + + diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml deleted file mode 100644 index d85eecbf2..000000000 --- a/app/views/layouts/admin.rhtml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - <%= site_name %> admin<%= @title ? ":" : "" %> <%=@title%> - - <%= javascript_include_tag 'jquery.js', 'jquery-ui.min' %> - - <%= stylesheet_link_tag 'admin-theme/jquery-ui-1.8.15.custom.css', :rel => 'stylesheet'%> - <%= stylesheet_link_tag 'admin', :title => "Main", :rel => "stylesheet" %> - - - -

      - <%= link_to 'Alaveteli', main_url('/') %> admin: - <%= link_to 'Summary', admin_url("") %> - | <%= link_to 'Timeline', admin_url("timeline") %> - | <%= link_to 'Stats', admin_url("stats") %> - | <%= link_to 'Debug', admin_url("debug") %> - View: - <%= link_to 'Authorities', admin_url("body/list") %> - | <%= link_to 'Requests', admin_url("request/list") %> - | <%= link_to 'Users', admin_url("user/list") %> - | <%= link_to 'Tracks', admin_url("track/list") %> -

      - <%= render :partial => 'general/locale_switcher' %> - - <% if flash[:error] %> -

      <%= flash[:error] %>

      - <% end %> - - <% if flash[:notice] %> -

      <%= flash[:notice] %>

      - <% end %> - - <%= yield %> - - - diff --git a/app/views/layouts/contact_mailer.html.erb b/app/views/layouts/contact_mailer.html.erb new file mode 100644 index 000000000..3cdc75009 --- /dev/null +++ b/app/views/layouts/contact_mailer.html.erb @@ -0,0 +1 @@ +<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/layouts/contact_mailer.rhtml b/app/views/layouts/contact_mailer.rhtml deleted file mode 100644 index 3cdc75009..000000000 --- a/app/views/layouts/contact_mailer.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/layouts/default.html.erb b/app/views/layouts/default.html.erb new file mode 100644 index 000000000..28d099984 --- /dev/null +++ b/app/views/layouts/default.html.erb @@ -0,0 +1,156 @@ + + + + + <% if @title %> + <%=@title%> - <%= site_name %> + <% else %> + <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> + <% end %> + + + + + <%= render :partial => 'general/stylesheet_includes' %> + <% if is_admin? %> + <%= stylesheet_link_tag "/adminbootstraptheme/stylesheets/admin", :title => "Main", :rel => "stylesheet" %> + <% end %> + + <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %> + <% if @profile_photo_javascript %> + + + + <% end %> + + <% if @feed_autodetect %> + <% for feed in @feed_autodetect %> + + <% if feed[:has_json] %> + + <% end %> + <% end %> + <% end %> + <% if @has_json %> + + <% end %> + + <% if @no_crawl %> + + <% end %> + + <%= render :partial => 'general/before_head_end' %> + + + <% if Configuration::force_registration_on_new_request && !@user %> + <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> + + <% end %> + +<% if is_admin? %> + <%= render :partial => 'admin_general/admin_navbar' %> +<% end %> + +<% if !@popup_banner.blank? %> +
      + + <%= @popup_banner %> + +
      +<% end %> + +
      + +
      +
      + <% if flash[:notice] %> +
      <%= flash[:notice] %>
      + <% end %> + <% if flash[:error] %> +
      <%= flash[:error] %>
      + <% end %> + +
      " class="controller_<%= controller.controller_name %>"> + <%= yield :layout %> +
      +
      +
      +
      + + <%= render :partial => 'general/footer' %> + +
      +
      + + <% + unless Configuration::ga_code.empty? || (@user && @user.super?) %> + + + + <% end %> + + <%= render :partial => 'general/before_body_end' %> + + diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml deleted file mode 100644 index 28d099984..000000000 --- a/app/views/layouts/default.rhtml +++ /dev/null @@ -1,156 +0,0 @@ - - - - - <% if @title %> - <%=@title%> - <%= site_name %> - <% else %> - <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> - <% end %> - - - - - <%= render :partial => 'general/stylesheet_includes' %> - <% if is_admin? %> - <%= stylesheet_link_tag "/adminbootstraptheme/stylesheets/admin", :title => "Main", :rel => "stylesheet" %> - <% end %> - - <%= javascript_include_tag 'jquery.js', 'jquery-ui.min','jquery.cookie.js', 'general.js' %> - <% if @profile_photo_javascript %> - - - - <% end %> - - <% if @feed_autodetect %> - <% for feed in @feed_autodetect %> - - <% if feed[:has_json] %> - - <% end %> - <% end %> - <% end %> - <% if @has_json %> - - <% end %> - - <% if @no_crawl %> - - <% end %> - - <%= render :partial => 'general/before_head_end' %> - - - <% if Configuration::force_registration_on_new_request && !@user %> - <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> - - <% end %> - -<% if is_admin? %> - <%= render :partial => 'admin_general/admin_navbar' %> -<% end %> - -<% if !@popup_banner.blank? %> -
      - - <%= @popup_banner %> - -
      -<% end %> - -
      - -
      -
      - <% if flash[:notice] %> -
      <%= flash[:notice] %>
      - <% end %> - <% if flash[:error] %> -
      <%= flash[:error] %>
      - <% end %> - -
      " class="controller_<%= controller.controller_name %>"> - <%= yield :layout %> -
      -
      -
      -
      - - <%= render :partial => 'general/footer' %> - -
      -
      - - <% - unless Configuration::ga_code.empty? || (@user && @user.super?) %> - - - - <% end %> - - <%= render :partial => 'general/before_body_end' %> - - diff --git a/app/views/layouts/no_chrome.html.erb b/app/views/layouts/no_chrome.html.erb new file mode 100644 index 000000000..74c79b701 --- /dev/null +++ b/app/views/layouts/no_chrome.html.erb @@ -0,0 +1,41 @@ + + + + + <% if @title %> + <%=@title%> - <%= site_name %> + <% else %> + <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> + <% end %> + + + + + <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> + <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %> + <%= stylesheet_link_tag 'theme', :rel => "stylesheet" %> + + + <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> + + +
      +
      + <% if flash[:notice] %> +
      <%= flash[:notice] %>
      + <% end %> + <% if flash[:error] %> +
      <%= flash[:error] %>
      + <% end %> + +
      " class="controller_<%= controller.controller_name %>"> + <%= yield :layout %> +
      +
      +
      + + \ No newline at end of file diff --git a/app/views/layouts/no_chrome.rhtml b/app/views/layouts/no_chrome.rhtml deleted file mode 100644 index 74c79b701..000000000 --- a/app/views/layouts/no_chrome.rhtml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - <% if @title %> - <%=@title%> - <%= site_name %> - <% else %> - <%= site_name %> - <%= _('Make and browse Freedom of Information (FOI) requests') %> - <% end %> - - - - - <%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> - <%= stylesheet_link_tag 'fonts', :rel => "stylesheet" %> - <%= stylesheet_link_tag 'theme', :rel => "stylesheet" %> - - - <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> - - -
      -
      - <% if flash[:notice] %> -
      <%= flash[:notice] %>
      - <% end %> - <% if flash[:error] %> -
      <%= flash[:error] %>
      - <% end %> - -
      " class="controller_<%= controller.controller_name %>"> - <%= yield :layout %> -
      -
      -
      - - \ No newline at end of file diff --git a/app/views/layouts/outgoing_mailer.html.erb b/app/views/layouts/outgoing_mailer.html.erb new file mode 100644 index 000000000..8bf8ef216 --- /dev/null +++ b/app/views/layouts/outgoing_mailer.html.erb @@ -0,0 +1 @@ +<%= raw MySociety::Format.wrap_email_body_by_lines(yield) %> diff --git a/app/views/layouts/outgoing_mailer.rhtml b/app/views/layouts/outgoing_mailer.rhtml deleted file mode 100644 index 8bf8ef216..000000000 --- a/app/views/layouts/outgoing_mailer.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw MySociety::Format.wrap_email_body_by_lines(yield) %> diff --git a/app/views/layouts/request_mailer.html.erb b/app/views/layouts/request_mailer.html.erb new file mode 100644 index 000000000..3cdc75009 --- /dev/null +++ b/app/views/layouts/request_mailer.html.erb @@ -0,0 +1 @@ +<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/layouts/request_mailer.rhtml b/app/views/layouts/request_mailer.rhtml deleted file mode 100644 index 3cdc75009..000000000 --- a/app/views/layouts/request_mailer.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb new file mode 100644 index 000000000..3cdc75009 --- /dev/null +++ b/app/views/layouts/user_mailer.html.erb @@ -0,0 +1 @@ +<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/layouts/user_mailer.rhtml b/app/views/layouts/user_mailer.rhtml deleted file mode 100644 index 3cdc75009..000000000 --- a/app/views/layouts/user_mailer.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= raw MySociety::Format.wrap_email_body_by_paragraphs(yield) %> diff --git a/app/views/outgoing_mailer/_followup_footer.html.erb b/app/views/outgoing_mailer/_followup_footer.html.erb new file mode 100644 index 000000000..d7bc7c5aa --- /dev/null +++ b/app/views/outgoing_mailer/_followup_footer.html.erb @@ -0,0 +1,4 @@ +<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%> +<%= help_officers_url %> + +<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%> diff --git a/app/views/outgoing_mailer/_followup_footer.rhtml b/app/views/outgoing_mailer/_followup_footer.rhtml deleted file mode 100644 index d7bc7c5aa..000000000 --- a/app/views/outgoing_mailer/_followup_footer.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -<%= _('Disclaimer: This message and any reply that you make will be published on the internet. Our privacy and copyright policies:')%> -<%= help_officers_url %> - -<%= _('If you find this service useful as an FOI officer, please ask your web manager to link to us from your organisation\'s FOI page.')%> diff --git a/app/views/outgoing_mailer/followup.html.erb b/app/views/outgoing_mailer/followup.html.erb new file mode 100644 index 000000000..7050a295b --- /dev/null +++ b/app/views/outgoing_mailer/followup.html.erb @@ -0,0 +1,10 @@ +<%= @outgoing_message.body.strip %> + +<%= @outgoing_message.quoted_part_to_append_to_email.strip %> + +------------------------------------------------------------------- +<%= _('Please use this email address for all replies to this request:')%> +<%= @info_request.incoming_email %> + +<%= render :partial => 'followup_footer' %> +------------------------------------------------------------------- diff --git a/app/views/outgoing_mailer/followup.rhtml b/app/views/outgoing_mailer/followup.rhtml deleted file mode 100644 index 7050a295b..000000000 --- a/app/views/outgoing_mailer/followup.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -<%= @outgoing_message.body.strip %> - -<%= @outgoing_message.quoted_part_to_append_to_email.strip %> - -------------------------------------------------------------------- -<%= _('Please use this email address for all replies to this request:')%> -<%= @info_request.incoming_email %> - -<%= render :partial => 'followup_footer' %> -------------------------------------------------------------------- diff --git a/app/views/outgoing_mailer/initial_request.html.erb b/app/views/outgoing_mailer/initial_request.html.erb new file mode 100644 index 000000000..d537a20bc --- /dev/null +++ b/app/views/outgoing_mailer/initial_request.html.erb @@ -0,0 +1,13 @@ +<%= @outgoing_message.body.strip %> + +------------------------------------------------------------------- + +<%= _('Please use this email address for all replies to this request:')%> +<%= @info_request.incoming_email %> + +<%= _('Is {{email_address}} the wrong address for {{type_of_request}} requests to {{public_body_name}}? If so, please contact us using this form:', :email_address => @info_request.public_body.request_email, :type_of_request => @info_request.law_used_full, :public_body_name => @info_request.public_body.name)%> +<%= help_contact_url %> + +<%= render :partial => 'followup_footer' %> + +------------------------------------------------------------------- diff --git a/app/views/outgoing_mailer/initial_request.rhtml b/app/views/outgoing_mailer/initial_request.rhtml deleted file mode 100644 index d537a20bc..000000000 --- a/app/views/outgoing_mailer/initial_request.rhtml +++ /dev/null @@ -1,13 +0,0 @@ -<%= @outgoing_message.body.strip %> - -------------------------------------------------------------------- - -<%= _('Please use this email address for all replies to this request:')%> -<%= @info_request.incoming_email %> - -<%= _('Is {{email_address}} the wrong address for {{type_of_request}} requests to {{public_body_name}}? If so, please contact us using this form:', :email_address => @info_request.public_body.request_email, :type_of_request => @info_request.law_used_full, :public_body_name => @info_request.public_body.name)%> -<%= help_contact_url %> - -<%= render :partial => 'followup_footer' %> - -------------------------------------------------------------------- diff --git a/app/views/public_body/_alphabet.html.erb b/app/views/public_body/_alphabet.html.erb new file mode 100644 index 000000000..a3359f3ab --- /dev/null +++ b/app/views/public_body/_alphabet.html.erb @@ -0,0 +1,3 @@ +<%= "A".upto("Z") do |l| -%> + <%= link_to_unless (@tag == l), l, list_public_bodies_url(:tag => l.downcase) %> +<% end %> diff --git a/app/views/public_body/_alphabet.rhtml b/app/views/public_body/_alphabet.rhtml deleted file mode 100644 index a3359f3ab..000000000 --- a/app/views/public_body/_alphabet.rhtml +++ /dev/null @@ -1,3 +0,0 @@ -<%= "A".upto("Z") do |l| -%> - <%= link_to_unless (@tag == l), l, list_public_bodies_url(:tag => l.downcase) %> -<% end %> diff --git a/app/views/public_body/_body_listing.html.erb b/app/views/public_body/_body_listing.html.erb new file mode 100644 index 000000000..864ab8c9b --- /dev/null +++ b/app/views/public_body/_body_listing.html.erb @@ -0,0 +1,9 @@ +<% if public_bodies.empty? %> +

      + <%= _("None found.")%> +

      +<% else %> + <% for public_body in public_bodies %> + <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %> + <% end %> +<% end %> diff --git a/app/views/public_body/_body_listing.rhtml b/app/views/public_body/_body_listing.rhtml deleted file mode 100644 index 864ab8c9b..000000000 --- a/app/views/public_body/_body_listing.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -<% if public_bodies.empty? %> -

      - <%= _("None found.")%> -

      -<% else %> - <% for public_body in public_bodies %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => public_body } %> - <% end %> -<% end %> diff --git a/app/views/public_body/_body_listing_single.html.erb b/app/views/public_body/_body_listing_single.html.erb new file mode 100644 index 000000000..b01d2ebb2 --- /dev/null +++ b/app/views/public_body/_body_listing_single.html.erb @@ -0,0 +1,31 @@ +<% if @highlight_words.nil? + @highlight_words = [] + end %> + +
      + + <%= link_to highlight_words(public_body.name, @highlight_words), public_body_url(public_body) %> + + + <% if !public_body.short_name.empty? || !public_body.notes_without_html.empty? %> + <% if !public_body.short_name.empty? %> + <%= _("Also called {{other_name}}.", :other_name => highlight_words(public_body.short_name, @highlight_words)) %> + <% end %> + <% if !public_body.notes_without_html.empty? %> + <%= highlight_and_excerpt(public_body.notes_without_html, @highlight_words, 150) %> + <% end %> +
      + <% end %> +
      + + <%= n_('%d request made.', '%d requests made.', public_body.info_requests.size) % public_body.info_requests.size %> + <% if !@include_request_link_in_authority_listing.nil? %> + <%= link_to _("Make your own request"), public_body_url(public_body) %>. + <% end %> +
      + + <%= _("Added on {{date}}", :date => simple_date(public_body.created_at)) %>. + +
      +
      + diff --git a/app/views/public_body/_body_listing_single.rhtml b/app/views/public_body/_body_listing_single.rhtml deleted file mode 100644 index b01d2ebb2..000000000 --- a/app/views/public_body/_body_listing_single.rhtml +++ /dev/null @@ -1,31 +0,0 @@ -<% if @highlight_words.nil? - @highlight_words = [] - end %> - -
      - - <%= link_to highlight_words(public_body.name, @highlight_words), public_body_url(public_body) %> - - - <% if !public_body.short_name.empty? || !public_body.notes_without_html.empty? %> - <% if !public_body.short_name.empty? %> - <%= _("Also called {{other_name}}.", :other_name => highlight_words(public_body.short_name, @highlight_words)) %> - <% end %> - <% if !public_body.notes_without_html.empty? %> - <%= highlight_and_excerpt(public_body.notes_without_html, @highlight_words, 150) %> - <% end %> -
      - <% end %> -
      - - <%= n_('%d request made.', '%d requests made.', public_body.info_requests.size) % public_body.info_requests.size %> - <% if !@include_request_link_in_authority_listing.nil? %> - <%= link_to _("Make your own request"), public_body_url(public_body) %>. - <% end %> -
      - - <%= _("Added on {{date}}", :date => simple_date(public_body.created_at)) %>. - -
      -
      - 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..54f20a736 --- /dev/null +++ b/app/views/public_body/_list_sidebar_extra.html.erb @@ -0,0 +1,6 @@ +

      + <%= raw(_('Are we missing a public authority?') % [help_requesting_path + '#missing_body']) %> +

      +

      + <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> +

      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 54f20a736..000000000 --- a/app/views/public_body/_list_sidebar_extra.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -

      - <%= raw(_('Are we missing a public authority?') % [help_requesting_path + '#missing_body']) %> -

      -

      - <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> -

      diff --git a/app/views/public_body/_search_ahead.html.erb b/app/views/public_body/_search_ahead.html.erb new file mode 100644 index 000000000..7ade89b8e --- /dev/null +++ b/app/views/public_body/_search_ahead.html.erb @@ -0,0 +1,21 @@ +
      + <% if !@xapian_requests.nil? %> + <% if @xapian_requests.results.size > 0 %> +

      <%= _('Top search results:') %>

      +

      + <%= _('Select one to see more information about the authority.')%> +

      + <% else %> +

      <%= _('No results found.') %>

      + <% end %> +
      + <% for result in @xapian_requests.results %> + <%= render :partial => 'body_listing_single', :locals => { :public_body => result[:model] } %> + <% end %> +
      + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %> + <% end %> +
      + + + diff --git a/app/views/public_body/_search_ahead.rhtml b/app/views/public_body/_search_ahead.rhtml deleted file mode 100644 index 7ade89b8e..000000000 --- a/app/views/public_body/_search_ahead.rhtml +++ /dev/null @@ -1,21 +0,0 @@ -
      - <% if !@xapian_requests.nil? %> - <% if @xapian_requests.results.size > 0 %> -

      <%= _('Top search results:') %>

      -

      - <%= _('Select one to see more information about the authority.')%> -

      - <% else %> -

      <%= _('No results found.') %>

      - <% end %> -
      - <% for result in @xapian_requests.results %> - <%= render :partial => 'body_listing_single', :locals => { :public_body => result[:model] } %> - <% end %> -
      - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %> - <% end %> -
      - - - diff --git a/app/views/public_body/list.html.erb b/app/views/public_body/list.html.erb new file mode 100644 index 000000000..171e02679 --- /dev/null +++ b/app/views/public_body/list.html.erb @@ -0,0 +1,47 @@ +
      +

      <%=_('Show only...')%>

      + +

      <%=_('Beginning with') %>

      +
      • + <%= render :partial => 'alphabet' %> +
      • +
      + <% first_row = true %> + <% for row in PublicBodyCategories::get().with_headings() %> + <% if row.instance_of?(Array) %> +
    3. + <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %> +
    4. + <% else %> + <% if not first_row %> + + <% else %> + <% first_row = false %> + <% end %> +

      <%=h row%>

      +
        + <% end %> + <% end %> + <% if not first_row %> +
      + <% end %> + <%= render :partial => "list_sidebar_extra" %> +
      + +<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %> +
      +

      <%= _('Public authorities') %>

      + +<%= form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> +
      + <%= text_field_tag(:public_body_query, params[:public_body_query]) %> + <%= submit_tag(_("Search")) %> +
      +<% end %> + +

      <%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %>

      +<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> + + <%= will_paginate(@public_bodies) %>
      + <%= raw _('Can\'t find the one you want?') % [help_requesting_path + '#missing_body'] %> +
      diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml deleted file mode 100644 index 171e02679..000000000 --- a/app/views/public_body/list.rhtml +++ /dev/null @@ -1,47 +0,0 @@ -
      -

      <%=_('Show only...')%>

      - -

      <%=_('Beginning with') %>

      -
      • - <%= render :partial => 'alphabet' %> -
      • -
      - <% first_row = true %> - <% for row in PublicBodyCategories::get().with_headings() %> - <% if row.instance_of?(Array) %> -
    5. - <%= link_to_unless (@tag == row[0]), row[1], list_public_bodies_url(:tag => row[0]) %> -
    6. - <% else %> - <% if not first_row %> - - <% else %> - <% first_row = false %> - <% end %> -

      <%=h row%>

      -
        - <% end %> - <% end %> - <% if not first_row %> -
      - <% end %> - <%= render :partial => "list_sidebar_extra" %> -
      - -<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %> -
      -

      <%= _('Public authorities') %>

      - -<%= form_tag(list_public_bodies_default_url, :method => "get", :id=>"search_form") do %> -
      - <%= text_field_tag(:public_body_query, params[:public_body_query]) %> - <%= submit_tag(_("Search")) %> -
      -<% end %> - -

      <%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %>

      -<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> - - <%= will_paginate(@public_bodies) %>
      - <%= raw _('Can\'t find the one you want?') % [help_requesting_path + '#missing_body'] %> -
      diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb new file mode 100644 index 000000000..6431b4742 --- /dev/null +++ b/app/views/public_body/show.html.erb @@ -0,0 +1,132 @@ +<% @title = h(@public_body.name) + _(" - view and make Freedom of Information requests") %> +
      +
      +

      <%= _('Follow this authority')%>

      + + <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %> +

      <%= raw(n_("%d person is following this authority", "%d people are following this authority", follower_count) % follower_count) %>

      + + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> +

      <%= _('More about this authority')%>

      + <% if !@public_body.calculated_home_page.nil? %> + <%= link_to _('Home page of authority'), @public_body.calculated_home_page %>
      + <% end %> + <% if !@public_body.publication_scheme.empty? %> + <%= link_to _('Publication scheme'), @public_body.publication_scheme %>
      + <% end %> + <% unless @public_body.disclosure_log.empty? %> + <%= link_to _('Disclosure log'), @public_body.disclosure_log %>
      + <% end %> + <% if @public_body.has_tag?("charity") %> + <% for tag_value in @public_body.get_tag_values("charity") %> + <% if tag_value.match(/^SC/) %> + <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %>
      + <% else %> + <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %>
      + <% end %> + <% end %> + <% end %> + <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %>
      +
      + +
      +

      <%= _("Freedom of information requests to") %>

      +

      <%=h(@public_body.name)%>

      + +

      + <%=@public_body.type_of_authority(true)%><% if not @public_body.short_name.empty? %>, + <%= _('also called {{public_body_short_name}}', :public_body_short_name => h(@public_body.short_name))%><% end %> + <% if !@user.nil? && @user.admin_page_links? %> + (<%= link_to _("admin"), public_body_admin_url(@public_body) %>) + <% end %> +

      + + <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %> +

      <%= @public_body.notes_as_html %>

      + <% end %> + + <% if @public_body.eir_only? %> +

      <%= _('You can only request information about the environment from this authority.')%>

      + <% end %> + +
      + <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> + <% if @public_body.eir_only? %> + <%= _('Make a new Environmental Information request')%> + <% else %> + <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%> + <% end %> +  <%= _('{{text}}', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> + <% elsif @public_body.has_notes? %> + <%= @public_body.notes_as_html %> + <% elsif @public_body.not_requestable_reason == 'not_apply' %> + <%= _('Freedom of Information law does not apply to this authority, so you cannot make + a request to it.')%> + <% elsif @public_body.not_requestable_reason == 'defunct' %> + <%= _('This authority no longer exists, so you cannot make a request to it.')%> + <% else %> + <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> + <% end %> + + <% if @public_body.override_request_email %> +

      + <%= _("Note: Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %> +

      + <% end %> +
      +
      + +
      + <% if @public_body.info_requests.size == 0 %> + <% if @public_body.eir_only? %> +

      <%= _('Environmental Information Regulations requests made using this site') %>

      +

      Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.

      + <% else %> +

      <%= _('Freedom of Information requests made using this site')%>

      +

      <%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>

      + <% end %> + <% else %> +

      + <% if @public_body.eir_only? %> + <%= 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] %> + <% 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] %> + <% end %> + <% end %> + <%= @page_desc %> +

      + + + <% if @public_body.info_requests.size > 4 %> + <%= render :partial => 'request/request_filter_form' %> + <% end %> + <% end %> + +
       
      + <% if !@xapian_requests.nil? %> + + <% for result in @xapian_requests.results %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %> + + <% if @xapian_requests.results.empty? %> +

      <% _('There were no requests matching your query.') %>

      + <% else %> +

      <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>

      + <% end %> + + <% else %> + <% if @public_body.eir_only? %> +

      <%= _('Environmental Information Regulations requests made') %>

      + <% else %> +

      <%= _('Freedom of Information requests made')%>

      + <% end %> +

      <%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>

      + <% end %> +
      +
      diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml deleted file mode 100644 index 6431b4742..000000000 --- a/app/views/public_body/show.rhtml +++ /dev/null @@ -1,132 +0,0 @@ -<% @title = h(@public_body.name) + _(" - view and make Freedom of Information requests") %> -
      -
      -

      <%= _('Follow this authority')%>

      - - <% follower_count = TrackThing.count(:all, :conditions => ["public_body_id = ?", @public_body.id]) %> -

      <%= raw(n_("%d person is following this authority", "%d people are following this authority", follower_count) % follower_count) %>

      - - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> -

      <%= _('More about this authority')%>

      - <% if !@public_body.calculated_home_page.nil? %> - <%= link_to _('Home page of authority'), @public_body.calculated_home_page %>
      - <% end %> - <% if !@public_body.publication_scheme.empty? %> - <%= link_to _('Publication scheme'), @public_body.publication_scheme %>
      - <% end %> - <% unless @public_body.disclosure_log.empty? %> - <%= link_to _('Disclosure log'), @public_body.disclosure_log %>
      - <% end %> - <% if @public_body.has_tag?("charity") %> - <% for tag_value in @public_body.get_tag_values("charity") %> - <% if tag_value.match(/^SC/) %> - <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %>
      - <% else %> - <%= link_to _('Charity registration'), "http://www.charity-commission.gov.uk/SHOWCHARITY/RegisterOfCharities/CharityFramework.aspx?RegisteredCharityNumber=" + tag_value %>
      - <% end %> - <% end %> - <% end %> - <%= link_to _('View FOI email address'), view_public_body_email_url(@public_body.url_name) %>
      -
      - -
      -

      <%= _("Freedom of information requests to") %>

      -

      <%=h(@public_body.name)%>

      - -

      - <%=@public_body.type_of_authority(true)%><% if not @public_body.short_name.empty? %>, - <%= _('also called {{public_body_short_name}}', :public_body_short_name => h(@public_body.short_name))%><% end %> - <% if !@user.nil? && @user.admin_page_links? %> - (<%= link_to _("admin"), public_body_admin_url(@public_body) %>) - <% end %> -

      - - <% if @public_body.has_notes? && (@public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact') %> -

      <%= @public_body.notes_as_html %>

      - <% end %> - - <% if @public_body.eir_only? %> -

      <%= _('You can only request information about the environment from this authority.')%>

      - <% end %> - -
      - <% if @public_body.is_requestable? || @public_body.not_requestable_reason == 'bad_contact' %> - <% if @public_body.eir_only? %> - <%= _('Make a new Environmental Information request')%> - <% else %> - <%= _('Make a new Freedom of Information request to {{public_body}}', :public_body => h(@public_body.name))%> - <% end %> -  <%= _('{{text}}', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> - <% elsif @public_body.has_notes? %> - <%= @public_body.notes_as_html %> - <% elsif @public_body.not_requestable_reason == 'not_apply' %> - <%= _('Freedom of Information law does not apply to this authority, so you cannot make - a request to it.')%> - <% elsif @public_body.not_requestable_reason == 'defunct' %> - <%= _('This authority no longer exists, so you cannot make a request to it.')%> - <% else %> - <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> - <% end %> - - <% if @public_body.override_request_email %> -

      - <%= _("Note: Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %> -

      - <% end %> -
      -
      - -
      - <% if @public_body.info_requests.size == 0 %> - <% if @public_body.eir_only? %> -

      <%= _('Environmental Information Regulations requests made using this site') %>

      -

      Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.

      - <% else %> -

      <%= _('Freedom of Information requests made using this site')%>

      -

      <%= _('Nobody has made any Freedom of Information requests to {{public_body_name}} using this site yet.', :public_body_name => h(@public_body.name))%>

      - <% end %> - <% else %> -

      - <% if @public_body.eir_only? %> - <%= 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] %> - <% 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] %> - <% end %> - <% end %> - <%= @page_desc %> -

      - - - <% if @public_body.info_requests.size > 4 %> - <%= render :partial => 'request/request_filter_form' %> - <% end %> - <% end %> - -
       
      - <% if !@xapian_requests.nil? %> - - <% for result in @xapian_requests.results %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> - - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @xapian_requests.matches_estimated) %> - - <% if @xapian_requests.results.empty? %> -

      <% _('There were no requests matching your query.') %>

      - <% else %> -

      <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>

      - <% end %> - - <% else %> - <% if @public_body.eir_only? %> -

      <%= _('Environmental Information Regulations requests made') %>

      - <% else %> -

      <%= _('Freedom of Information requests made')%>

      - <% end %> -

      <%= _('The search index is currently offline, so we can\'t show the Freedom of Information requests that have been made to this authority.')%>

      - <% end %> -
      -
      diff --git a/app/views/public_body/view_email.html.erb b/app/views/public_body/view_email.html.erb new file mode 100644 index 000000000..79d7f7f4c --- /dev/null +++ b/app/views/public_body/view_email.html.erb @@ -0,0 +1,46 @@ +<% @title = "FOI email address for '" + h(@public_body.name) + "'" %> + +

      <%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>

      + +

      +<% if @public_body.is_requestable? %> +<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%> +<% else %> + <% if @public_body.not_requestable_reason == 'not_apply' %> +

      <%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>. +

      + <% elsif @public_body.not_requestable_reason == 'defunct' %> +

      <%=h @public_body.name %> no longer exists. + <%= _('Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>. +

      + <% elsif @public_body.not_requestable_reason == 'bad_contact' %> +

      <%= _('We do not have a working request email address for this authority.')%> +

      + <% else %> + <% raise "unknown reason " + @reason %> + <% end %> + +<% end %> +

      + +

      + <% 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 contact us.')% [help_contact_path]%> + <% else %> + <%= raw _(' If you know the address to use, then please send it to us. + You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %> + <% end %> +

      + +
      + + <% if @public_body.eir_only? %> + <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%> + <% else %> + <%= link_to "Make a new FOI request", new_request_to_body_url(:url_name => @public_body.url_name)%> + <% end %> + to <%= h(@public_body.name) %> + +
      + + diff --git a/app/views/public_body/view_email.rhtml b/app/views/public_body/view_email.rhtml deleted file mode 100644 index 79d7f7f4c..000000000 --- a/app/views/public_body/view_email.rhtml +++ /dev/null @@ -1,46 +0,0 @@ -<% @title = "FOI email address for '" + h(@public_body.name) + "'" %> - -

      <%= _('FOI email address for {{public_body}}',:public_body=> public_body_link(@public_body))%>

      - -

      -<% if @public_body.is_requestable? %> -<%= _('{{site_name}} sends new requests to {{request_email}} for this authority.', :site_name=>site_name, :request_email=> h(@public_body.request_email))%> -<% else %> - <% if @public_body.not_requestable_reason == 'not_apply' %> -

      <%= _('Freedom of Information law no longer applies to this authority.Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>. -

      - <% elsif @public_body.not_requestable_reason == 'defunct' %> -

      <%=h @public_body.name %> no longer exists. - <%= _('Follow up messages to existing requests are sent to ')%><%=h @public_body.request_email%>. -

      - <% elsif @public_body.not_requestable_reason == 'bad_contact' %> -

      <%= _('We do not have a working request email address for this authority.')%> -

      - <% else %> - <% raise "unknown reason " + @reason %> - <% end %> - -<% end %> -

      - -

      - <% 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 contact us.')% [help_contact_path]%> - <% else %> - <%= raw _(' If you know the address to use, then please send it to us. - You may be able to find the address on their website, or by phoning them up and asking.')% [help_contact_path] %> - <% end %> -

      - -
      - - <% if @public_body.eir_only? %> - <%= link_to "Make a new EIR request", new_request_to_body_url(:url_name => @public_body.url_name)%> - <% else %> - <%= link_to "Make a new FOI request", new_request_to_body_url(:url_name => @public_body.url_name)%> - <% end %> - to <%= h(@public_body.name) %> - -
      - - diff --git a/app/views/public_body/view_email_captcha.html.erb b/app/views/public_body/view_email_captcha.html.erb new file mode 100644 index 000000000..4f6db5b67 --- /dev/null +++ b/app/views/public_body/view_email_captcha.html.erb @@ -0,0 +1,13 @@ +<% @title = _("View FOI email address for '{{public_body_name}}'",:public_body_name => h(@public_body.name)) %> + +

      <%= _('View FOI email address for {{public_body_name}}',:public_body_name=>public_body_link(@public_body))%>

      + +

      <%= _('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))%>

      + +<%= form_for :contact do |f| %> + <%= recaptcha_tags %> + + <%= hidden_field_tag(:submitted_view_email, { :value => 1 } ) %> + +

      <%= submit_tag _("View email") %>

      +<% end %> diff --git a/app/views/public_body/view_email_captcha.rhtml b/app/views/public_body/view_email_captcha.rhtml deleted file mode 100644 index 4f6db5b67..000000000 --- a/app/views/public_body/view_email_captcha.rhtml +++ /dev/null @@ -1,13 +0,0 @@ -<% @title = _("View FOI email address for '{{public_body_name}}'",:public_body_name => h(@public_body.name)) %> - -

      <%= _('View FOI email address for {{public_body_name}}',:public_body_name=>public_body_link(@public_body))%>

      - -

      <%= _('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))%>

      - -<%= form_for :contact do |f| %> - <%= recaptcha_tags %> - - <%= hidden_field_tag(:submitted_view_email, { :value => 1 } ) %> - -

      <%= submit_tag _("View email") %>

      -<% end %> diff --git a/app/views/request/_after_actions.html.erb b/app/views/request/_after_actions.html.erb new file mode 100644 index 000000000..3d74cf42d --- /dev/null +++ b/app/views/request/_after_actions.html.erb @@ -0,0 +1,57 @@ +
      + +

      <%= _('Things to do with this request') %>

      + +
      + <%= _('Anyone:') %> +
        + <% if @info_request.comments_allowed? %> +
      • + <%= raw(_('Add an annotation (to help the requester or others)') % [new_comment_url(:url_title => @info_request.url_title)]) %> +
      • + <% end %> + <% if @old_unclassified %> +
      • + <%= link_to _('Update the status of this request'), '#describe_state_form_1' %> +
      • + <% end %> + <% if @info_request.all_can_view? %> +
      • + <%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %> +
      • + <% end %> +
      +
      + <% if ! @info_request.is_external? %> +
      + <%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user_name)) %> +
        + +
      • + <% if @last_response.nil? %> + <%= link_to _("Send a followup"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %> + <% else %> + <%= link_to _("Write a reply"), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %> + <% end %> +
      • + <% if !@old_unclassified %> +
      • + <%= link_to _("Update the status of this request"), request_url(@info_request, :update_status => 1) %> +
      • + <% end %> +
      • + <%= link_to _("Request an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> +
      • +
      +
      + <% end %> + +
      + <%= _('{{public_body_name}} only:',:public_body_name=>h(@info_request.public_body.name) ) %> +
        +
      • + <%= link_to _("Respond to request"), upload_response_url(:url_title => @info_request.url_title) %> +
      • +
      +
      +
      diff --git a/app/views/request/_after_actions.rhtml b/app/views/request/_after_actions.rhtml deleted file mode 100644 index 3d74cf42d..000000000 --- a/app/views/request/_after_actions.rhtml +++ /dev/null @@ -1,57 +0,0 @@ -
      - -

      <%= _('Things to do with this request') %>

      - -
      - <%= _('Anyone:') %> -
        - <% if @info_request.comments_allowed? %> -
      • - <%= raw(_('Add an annotation (to help the requester or others)') % [new_comment_url(:url_title => @info_request.url_title)]) %> -
      • - <% end %> - <% if @old_unclassified %> -
      • - <%= link_to _('Update the status of this request'), '#describe_state_form_1' %> -
      • - <% end %> - <% if @info_request.all_can_view? %> -
      • - <%= link_to _("Download a zip file of all correspondence"), download_entire_request_url(:url_title => @info_request.url_title) %> -
      • - <% end %> -
      -
      - <% if ! @info_request.is_external? %> -
      - <%= _('{{info_request_user_name}} only:',:info_request_user_name=>h(@info_request.user_name)) %> -
        - -
      • - <% if @last_response.nil? %> - <%= link_to _("Send a followup"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "#followup" %> - <% else %> - <%= link_to _("Write a reply"), show_response_url(:id => @info_request.id, :incoming_message_id => @last_response.id) + "#followup" %> - <% end %> -
      • - <% if !@old_unclassified %> -
      • - <%= link_to _("Update the status of this request"), request_url(@info_request, :update_status => 1) %> -
      • - <% end %> -
      • - <%= link_to _("Request an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %> -
      • -
      -
      - <% end %> - -
      - <%= _('{{public_body_name}} only:',:public_body_name=>h(@info_request.public_body.name) ) %> -
        -
      • - <%= link_to _("Respond to request"), upload_response_url(:url_title => @info_request.url_title) %> -
      • -
      -
      -
      diff --git a/app/views/request/_bubble.html.erb b/app/views/request/_bubble.html.erb new file mode 100644 index 000000000..747e2aa1f --- /dev/null +++ b/app/views/request/_bubble.html.erb @@ -0,0 +1,37 @@ +
      + <% if not attachments.nil? and attachments.size > 0 %> +
      +
      + <% attachments.each do |a| %> +

      + <% + attachment_url = get_attachment_url(:id => incoming_message.info_request_id, + :incoming_message_id => incoming_message.id, :part => a.url_part_number, + :file_name => a.display_filename) + attachment_as_html_url = get_attachment_as_html_url(:id => incoming_message.info_request_id, + :incoming_message_id => incoming_message.id, :part => a.url_part_number, + :file_name => a.display_filename + '.html') + %> + <% img_filename = "icon_" + a.content_type.sub('/', '_') + "_large.png" + full_filename = File.expand_path(File.join(File.dirname(__FILE__), "../../../public/images", img_filename)) + if File.exist?(full_filename) %> + Attachment + <% else %> + Attachment + <% end %> + <%= h a.display_filename %> +
      + <%= a.display_size %> + <%= link_to "Download", attachment_url %> + <% if a.has_body_as_html? && incoming_message.info_request.all_can_view? %> + <%= link_to "View as HTML", attachment_as_html_url %> + <% end %> + + <%= a.extra_note %> +

      + <% end %> +
      +
      + <% end %> +

      <%= body %>

      +
      diff --git a/app/views/request/_bubble.rhtml b/app/views/request/_bubble.rhtml deleted file mode 100644 index 747e2aa1f..000000000 --- a/app/views/request/_bubble.rhtml +++ /dev/null @@ -1,37 +0,0 @@ -
      - <% if not attachments.nil? and attachments.size > 0 %> -
      -
      - <% attachments.each do |a| %> -

      - <% - attachment_url = get_attachment_url(:id => incoming_message.info_request_id, - :incoming_message_id => incoming_message.id, :part => a.url_part_number, - :file_name => a.display_filename) - attachment_as_html_url = get_attachment_as_html_url(:id => incoming_message.info_request_id, - :incoming_message_id => incoming_message.id, :part => a.url_part_number, - :file_name => a.display_filename + '.html') - %> - <% img_filename = "icon_" + a.content_type.sub('/', '_') + "_large.png" - full_filename = File.expand_path(File.join(File.dirname(__FILE__), "../../../public/images", img_filename)) - if File.exist?(full_filename) %> - Attachment - <% else %> - Attachment - <% end %> - <%= h a.display_filename %> -
      - <%= a.display_size %> - <%= link_to "Download", attachment_url %> - <% if a.has_body_as_html? && incoming_message.info_request.all_can_view? %> - <%= link_to "View as HTML", attachment_as_html_url %> - <% end %> - - <%= a.extra_note %> -

      - <% end %> -
      -
      - <% end %> -

      <%= body %>

      -
      diff --git a/app/views/request/_correspondence.html.erb b/app/views/request/_correspondence.html.erb new file mode 100644 index 000000000..99c6c7d26 --- /dev/null +++ b/app/views/request/_correspondence.html.erb @@ -0,0 +1,80 @@ +
      +<% +if !info_request_event.nil? && info_request_event.event_type == 'response' + incoming_message = info_request_event.incoming_message +end + +if not incoming_message.nil? +%> +
      +

      + <% if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %> + <%= _("From:") %> <%=h incoming_message.safe_mail_from %>
      + <% end %> + <% if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %> + <%=h @info_request.public_body.name %>
      + <% end %> +
      <%= simple_date(incoming_message.sent_at) %> +

      + + <%= render :partial => 'bubble', :locals => { :incoming_message => incoming_message, :body => incoming_message.get_body_for_html_display(@collapse_quotes), :attachments => incoming_message.get_attachments_for_display } %> + +

      + <% if !@user.nil? && @user.admin_page_links? %> + <%= link_to "Admin", admin_url("request/show_raw_email/" + incoming_message.raw_email_id.to_s) %> | + <% end %> + <%= link_to _("Link to this"), incoming_message_url(incoming_message), :class => "link_to_this" %> +

      +
      +<% +elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type) + outgoing_message = info_request_event.outgoing_message + %> +
      + +

      + <%= _("From:") %> <%=h @info_request.user_name %>
      +
      <%= simple_date(info_request_event.created_at) %> +

      + + <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil } %> + +

      + <% if outgoing_message.status == 'ready' && !@info_request.is_external? %> + Warning: This message has not yet been sent for an unknown reason. + <% end %> + + + + <%= link_to _("Link to this"), outgoing_message_url(outgoing_message), :class => "link_to_this" %> +

      +
      +<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> +
      +

      + <%= simple_date(info_request_event.created_at) %> +

      +

      + Sent + <% if info_request_event.outgoing_message.message_type == 'initial_request' %> + request + <% elsif info_request_event.outgoing_message.message_type == 'followup' %> + a follow up + <% else %> + <% raise "unknown message_type" %> + <% end %> + + to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>. +

      +
      +<% elsif info_request_event.event_type == 'comment' + comment = info_request_event.comment +%> + <%= render :partial => 'comment/single_comment', :locals => { :comment => comment } %> +<% end %> + diff --git a/app/views/request/_correspondence.rhtml b/app/views/request/_correspondence.rhtml deleted file mode 100644 index 99c6c7d26..000000000 --- a/app/views/request/_correspondence.rhtml +++ /dev/null @@ -1,80 +0,0 @@ -
      -<% -if !info_request_event.nil? && info_request_event.event_type == 'response' - incoming_message = info_request_event.incoming_message -end - -if not incoming_message.nil? -%> -
      -

      - <% if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %> - <%= _("From:") %> <%=h incoming_message.safe_mail_from %>
      - <% end %> - <% if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %> - <%=h @info_request.public_body.name %>
      - <% end %> -
      <%= simple_date(incoming_message.sent_at) %> -

      - - <%= render :partial => 'bubble', :locals => { :incoming_message => incoming_message, :body => incoming_message.get_body_for_html_display(@collapse_quotes), :attachments => incoming_message.get_attachments_for_display } %> - -

      - <% if !@user.nil? && @user.admin_page_links? %> - <%= link_to "Admin", admin_url("request/show_raw_email/" + incoming_message.raw_email_id.to_s) %> | - <% end %> - <%= link_to _("Link to this"), incoming_message_url(incoming_message), :class => "link_to_this" %> -

      -
      -<% -elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type) - outgoing_message = info_request_event.outgoing_message - %> -
      - -

      - <%= _("From:") %> <%=h @info_request.user_name %>
      -
      <%= simple_date(info_request_event.created_at) %> -

      - - <%= render :partial => 'bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil } %> - -

      - <% if outgoing_message.status == 'ready' && !@info_request.is_external? %> - Warning: This message has not yet been sent for an unknown reason. - <% end %> - - - - <%= link_to _("Link to this"), outgoing_message_url(outgoing_message), :class => "link_to_this" %> -

      -
      -<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> -
      -

      - <%= simple_date(info_request_event.created_at) %> -

      -

      - Sent - <% if info_request_event.outgoing_message.message_type == 'initial_request' %> - request - <% elsif info_request_event.outgoing_message.message_type == 'followup' %> - a follow up - <% else %> - <% raise "unknown message_type" %> - <% end %> - - to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>. -

      -
      -<% elsif info_request_event.event_type == 'comment' - comment = info_request_event.comment -%> - <%= render :partial => 'comment/single_comment', :locals => { :comment => comment } %> -<% end %> - diff --git a/app/views/request/_describe_state.html.erb b/app/views/request/_describe_state.html.erb new file mode 100644 index 000000000..23eddabb4 --- /dev/null +++ b/app/views/request/_describe_state.html.erb @@ -0,0 +1,114 @@ +<% if @is_owning_user %> + + <%= form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> +

      <%= _('What best describes the status of this request now?') %>

      + +
      +

      <%= _('This request is still in progress:') %>

      + <% if @info_request.described_state != 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %> + +
      + <% end %> + <% if @info_request.described_state == 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> + +
      + <% end %> + + <% if @info_request.described_state != 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %> + +
      + <% end %> + + <% if @update_status && @info_request.described_state != 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> + +
      + <% end %> + +
      + <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %> + +
      + + <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %> + +
      +

      <%= _('This particular request is finished:') %>

      + + <% if @info_request.described_state == 'internal_review' %> +

      <%= _('The review has finished and overall:') %>

      + <% end %> + +
      + <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %> + +
      + + <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %> + + +
      +

      <%= _('Other:') %>

      + +
      + <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %> + +
      + + <% if @update_status %> +
      + <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %> + +
      + +
      + <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %> + +
      + <% end %> + +
      + +

      + <%= 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 what to do next') %>) +

      + <% end %> +<% elsif @old_unclassified %> + <%= 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 sign in 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/_describe_state.rhtml b/app/views/request/_describe_state.rhtml deleted file mode 100644 index 23eddabb4..000000000 --- a/app/views/request/_describe_state.rhtml +++ /dev/null @@ -1,114 +0,0 @@ -<% if @is_owning_user %> - - <%= form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> -

      <%= _('What best describes the status of this request now?') %>

      - -
      -

      <%= _('This request is still in progress:') %>

      - <% if @info_request.described_state != 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %> - -
      - <% end %> - <% if @info_request.described_state == 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> - -
      - <% end %> - - <% if @info_request.described_state != 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %> - -
      - <% end %> - - <% if @update_status && @info_request.described_state != 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> - -
      - <% end %> - -
      - <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %> - -
      - - <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %> - -
      -

      <%= _('This particular request is finished:') %>

      - - <% if @info_request.described_state == 'internal_review' %> -

      <%= _('The review has finished and overall:') %>

      - <% end %> - -
      - <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %> - -
      - - <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %> - - -
      -

      <%= _('Other:') %>

      - -
      - <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %> - -
      - - <% if @update_status %> -
      - <%= radio_button "incoming_message", "described_state", "requires_admin", :id => 'requires_admin' + id_suffix %> - -
      - -
      - <%= radio_button "incoming_message", "described_state", "user_withdrawn", :id => 'user_withdrawn' + id_suffix %> - -
      - <% end %> - -
      - -

      - <%= 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 what to do next') %>) -

      - <% end %> -<% elsif @old_unclassified %> - <%= 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 sign in 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.html.erb b/app/views/request/_followup.html.erb new file mode 100644 index 000000000..127866d5d --- /dev/null +++ b/app/views/request/_followup.html.erb @@ -0,0 +1,140 @@ +
      + <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?) + # TRANSLATORS: This phrase completes the following sentences: + # Request an internal review from... + # Send a public follow up message to... + # Send a public reply to... + # Don't want to address your message to... ? + name_for_followup = _("the main FOI contact at {{public_body}}", :public_body => h(OutgoingMailer.name_for_followup(@info_request, nil))) + else + name_for_followup = h(OutgoingMailer.name_for_followup(@info_request, incoming_message)) + end %> + <% if @internal_review %> +

      <%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %> +

      + <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %> +

      <%= _('Send a public follow up message to {{person_or_body}}', :person_or_body => name_for_followup) %> +

      + <% else %> +

      <%= _('Send a public reply to {{person_or_body}}', :person_or_body => name_for_followup) %> +

      + <% end %> +<% if @info_request.who_can_followup_to(incoming_message).count > 0 %> +
      + <%= _("Don't want to address your message to {{person_or_body}}? You can also write to:", :person_or_body => name_for_followup) %> +
        +<% @info_request.who_can_followup_to(incoming_message).each do |name, email, id| %> + <% if id.nil? && !incoming_message.nil? && incoming_message.valid_to_reply_to? %> +
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • + <% else %> + <% if !id.nil? %> + <% if @info_request.public_body.request_email == email %> + <% if !incoming_message.nil? %> +
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • + <% end %> + <% else %> +
      • <%= link_to name, show_response_url(:id => @info_request.id, :incoming_message_id => id)%>
      • + <% end %> + <% else %> +
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • + <% end %> + <% end %> + +<% end %> +
      +
      +<% end %> + <% if @info_request.allow_new_responses_from == 'nobody' %> +

      <%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please contact us if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %>

      + <% else %> + <% if @internal_review %> +

      + <%= raw(_('If you are dissatisfied by the response you got from + the public authority, you have the right to + complain (details).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %> +

      + <% end %> + +

      + <%= _('Please only write messages directly relating to your request {{request_link}}. If you would like to ask for information that was not in your original request, then file a new request.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %> +

      + + <% status = @info_request.calculate_status %> + <% if status == 'waiting_response_overdue' %> +

      <%= _('The response to your request has been delayed. You can say that, + by law, the authority should normally have responded + promptly and') %> + <% if @info_request.public_body.is_school? %> + <%= _('in term time') %> + <% end %> + <%= _('by {{date}}',:date=>simple_date(@info_request.date_response_required_by)) %> + (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>). + +

      + <% elsif status == 'waiting_response_very_overdue' %> +

      + <%= _('The response to your request is long overdue. You can say that, by + law, under all circumstances, the authority should have responded + by now') %> (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>). +

      + <% 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| %> +

      + <%= o.text_area :body, :rows => 15, :cols => 55 %> +

      + + <% if @internal_review %> + <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %> + <% else %> +

      <%= _('What are you doing?') %>

      + + <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> +
      + <% else %> +
      + <% end %> + +
      + <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> + +
      +
      + <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %> + +
      +
      + <% end %> + + <% if @internal_review %> +

      <%= _('Edit and add more details to the message above, + explaining why you are dissatisfied with their response.') %> +

      + <% end %> + +

      + <%= hidden_field_tag 'submitted_followup', 1 %> + <%= hidden_field_tag(:preview, 1 ) %> + <% if @internal_review_pass_on %> + <%= hidden_field_tag(:internal_review, 1 ) %> + <% end %> + <%= submit_tag _("Preview your message") %> +

      + <% end %> + +

      + <% if not @is_owning_user %> + (You will be asked to sign in as <%= user_link(@info_request.user) %>) + <% end %> +

      + <% end %> + +
      + diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml deleted file mode 100644 index 127866d5d..000000000 --- a/app/views/request/_followup.rhtml +++ /dev/null @@ -1,140 +0,0 @@ -
      - <% if (incoming_message.nil? || !incoming_message.valid_to_reply_to?) - # TRANSLATORS: This phrase completes the following sentences: - # Request an internal review from... - # Send a public follow up message to... - # Send a public reply to... - # Don't want to address your message to... ? - name_for_followup = _("the main FOI contact at {{public_body}}", :public_body => h(OutgoingMailer.name_for_followup(@info_request, nil))) - else - name_for_followup = h(OutgoingMailer.name_for_followup(@info_request, incoming_message)) - end %> - <% if @internal_review %> -

      <%= _('Request an internal review from {{person_or_body}}', :person_or_body => name_for_followup) %> -

      - <% elsif incoming_message.nil? || !incoming_message.valid_to_reply_to? %> -

      <%= _('Send a public follow up message to {{person_or_body}}', :person_or_body => name_for_followup) %> -

      - <% else %> -

      <%= _('Send a public reply to {{person_or_body}}', :person_or_body => name_for_followup) %> -

      - <% end %> -<% if @info_request.who_can_followup_to(incoming_message).count > 0 %> -
      - <%= _("Don't want to address your message to {{person_or_body}}? You can also write to:", :person_or_body => name_for_followup) %> -
        -<% @info_request.who_can_followup_to(incoming_message).each do |name, email, id| %> - <% if id.nil? && !incoming_message.nil? && incoming_message.valid_to_reply_to? %> -
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • - <% else %> - <% if !id.nil? %> - <% if @info_request.public_body.request_email == email %> - <% if !incoming_message.nil? %> -
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • - <% end %> - <% else %> -
      • <%= link_to name, show_response_url(:id => @info_request.id, :incoming_message_id => id)%>
      • - <% end %> - <% else %> -
      • <%= link_to(_("the main FOI contact address for {{public_body}}", :public_body => name), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil)) %>
      • - <% end %> - <% end %> - -<% end %> -
      -
      -<% end %> - <% if @info_request.allow_new_responses_from == 'nobody' %> -

      <%= _('Follow ups and new responses to this request have been stopped to prevent spam. Please contact us if you are {{user_link}} and need to send a follow up.',:user_link=>user_link(@info_request.user), :url=>help_contact_path) %>

      - <% else %> - <% if @internal_review %> -

      - <%= raw(_('If you are dissatisfied by the response you got from - the public authority, you have the right to - complain (details).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %> -

      - <% end %> - -

      - <%= _('Please only write messages directly relating to your request {{request_link}}. If you would like to ask for information that was not in your original request, then file a new request.', :request_link=>request_link(@info_request), :new_request_link => new_request_to_body_url(:url_name => @info_request.public_body.url_name)) %> -

      - - <% status = @info_request.calculate_status %> - <% if status == 'waiting_response_overdue' %> -

      <%= _('The response to your request has been delayed. You can say that, - by law, the authority should normally have responded - promptly and') %> - <% if @info_request.public_body.is_school? %> - <%= _('in term time') %> - <% end %> - <%= _('by {{date}}',:date=>simple_date(@info_request.date_response_required_by)) %> - (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>). - -

      - <% elsif status == 'waiting_response_very_overdue' %> -

      - <%= _('The response to your request is long overdue. You can say that, by - law, under all circumstances, the authority should have responded - by now') %> (<%= raw(_('details') % ["#{help_requesting_path}#quickly_response"]) %>). -

      - <% 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| %> -

      - <%= o.text_area :body, :rows => 15, :cols => 55 %> -

      - - <% if @internal_review %> - <%= hidden_field_tag "outgoing_message[what_doing]", "internal_review" %> - <% else %> -

      <%= _('What are you doing?') %>

      - - <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> -
      - <% else %> -
      - <% end %> - -
      - <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> - -
      -
      - <%= radio_button "outgoing_message", "what_doing", "normal_sort", :id => "sort_normal" %> - -
      -
      - <% end %> - - <% if @internal_review %> -

      <%= _('Edit and add more details to the message above, - explaining why you are dissatisfied with their response.') %> -

      - <% end %> - -

      - <%= hidden_field_tag 'submitted_followup', 1 %> - <%= hidden_field_tag(:preview, 1 ) %> - <% if @internal_review_pass_on %> - <%= hidden_field_tag(:internal_review, 1 ) %> - <% end %> - <%= submit_tag _("Preview your message") %> -

      - <% end %> - -

      - <% if not @is_owning_user %> - (You will be asked to sign in as <%= user_link(@info_request.user) %>) - <% end %> -

      - <% end %> - -
      - diff --git a/app/views/request/_hidden_correspondence.html.erb b/app/views/request/_hidden_correspondence.html.erb new file mode 100644 index 000000000..a5e680385 --- /dev/null +++ b/app/views/request/_hidden_correspondence.html.erb @@ -0,0 +1,33 @@ +<% if info_request_event.prominence == 'requester_only' %> + <% + if !info_request_event.nil? && info_request_event.event_type == 'response' + incoming_message = info_request_event.incoming_message + end + if not incoming_message.nil? + %> +
      +

      + <%= raw(_('This response has been hidden. See annotations to find out why. + If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> +

      +
      + <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> +
      +

      + <%= raw(_('This outgoing message has been hidden. See annotations to + find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> +

      +
      + <% elsif info_request_event.event_type == 'comment' %> +
      +

      <%= raw(_('This comment has been hidden. See annotations to + find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> +

      +
      + <% end %> + +<% elsif info_request_event.prominence == 'hidden' %> + <% # show nothing when hidden %> +<% else %> + <% raise _("unexpected prominence on request event") %> +<% end %> diff --git a/app/views/request/_hidden_correspondence.rhtml b/app/views/request/_hidden_correspondence.rhtml deleted file mode 100644 index a5e680385..000000000 --- a/app/views/request/_hidden_correspondence.rhtml +++ /dev/null @@ -1,33 +0,0 @@ -<% if info_request_event.prominence == 'requester_only' %> - <% - if !info_request_event.nil? && info_request_event.event_type == 'response' - incoming_message = info_request_event.incoming_message - end - if not incoming_message.nil? - %> -
      -

      - <%= raw(_('This response has been hidden. See annotations to find out why. - If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> -

      -
      - <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> -
      -

      - <%= raw(_('This outgoing message has been hidden. See annotations to - find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> -

      -
      - <% elsif info_request_event.event_type == 'comment' %> -
      -

      <%= raw(_('This comment has been hidden. See annotations to - find out why. If you are the requester, then you may sign in to view the response.') % [signin_url(:r => request.fullpath)]) %> -

      -
      - <% end %> - -<% elsif info_request_event.prominence == 'hidden' %> - <% # show nothing when hidden %> -<% else %> - <% raise _("unexpected prominence on request event") %> -<% end %> diff --git a/app/views/request/_next_actions.html.erb b/app/views/request/_next_actions.html.erb new file mode 100644 index 000000000..f318df6e4 --- /dev/null +++ b/app/views/request/_next_actions.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/request/_next_actions.rhtml b/app/views/request/_next_actions.rhtml deleted file mode 100644 index f318df6e4..000000000 --- a/app/views/request/_next_actions.rhtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/views/request/_other_describe_state.html.erb b/app/views/request/_other_describe_state.html.erb new file mode 100644 index 000000000..735353e86 --- /dev/null +++ b/app/views/request/_other_describe_state.html.erb @@ -0,0 +1,81 @@ + + +<%= form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> +

      <%= _('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? + Thanks.') %>

      + +
      +

      <%= _('This request is still in progress:') %>

      + <% if @info_request.described_state != 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %> + +
      + <% end %> + <% if @info_request.described_state == 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> + +
      + <% end %> + + <% if @info_request.described_state != 'internal_review' %> +
      + <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %> + +
      + <% end %> + +
      + <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %> + +
      + + <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %> + +
      +

      <%= _('This particular request is finished:') %>

      + + <% if @info_request.described_state == 'internal_review' %> +

      <%= _('The review has finished and overall:') %>

      + <% end %> + +
      + <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %> + +
      +
      + <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %> + +
      + + <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %> + +
      + +
      + <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %> + +
      + +
      + +

      + <%= 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" %> +

      +<% end %> diff --git a/app/views/request/_other_describe_state.rhtml b/app/views/request/_other_describe_state.rhtml deleted file mode 100644 index 735353e86..000000000 --- a/app/views/request/_other_describe_state.rhtml +++ /dev/null @@ -1,81 +0,0 @@ - - -<%= form_for(:incoming_message, @info_request, :url => describe_state_url(:id => @info_request.id)) do |f| %> -

      <%= _('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? - Thanks.') %>

      - -
      -

      <%= _('This request is still in progress:') %>

      - <% if @info_request.described_state != 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "waiting_response", :id => 'waiting_response' + id_suffix %> - -
      - <% end %> - <% if @info_request.described_state == 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "internal_review", :id => 'internal_review' + id_suffix %> - -
      - <% end %> - - <% if @info_request.described_state != 'internal_review' %> -
      - <%= radio_button "incoming_message", "described_state", "waiting_clarification", :id => 'waiting_clarification' + id_suffix %> - -
      - <% end %> - -
      - <%= radio_button "incoming_message", "described_state", "gone_postal", :id => 'gone_postal' + id_suffix %> - -
      - - <%= render :partial => 'general/custom_state_transitions_pending', :locals => {:id_suffix => id_suffix } %> - -
      -

      <%= _('This particular request is finished:') %>

      - - <% if @info_request.described_state == 'internal_review' %> -

      <%= _('The review has finished and overall:') %>

      - <% end %> - -
      - <%= radio_button "incoming_message", "described_state", "not_held", :id => 'not_held' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "partially_successful", :id => 'partially_successful' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "successful", :id => 'successful' + id_suffix %> - -
      -
      - <%= radio_button "incoming_message", "described_state", "rejected", :id => 'rejected' + id_suffix %> - -
      - - <%= render :partial => 'general/custom_state_transitions_complete', :locals => {:id_suffix => id_suffix } %> - -
      - -
      - <%= radio_button "incoming_message", "described_state", "error_message", :id => 'error_message' + id_suffix %> - -
      - -
      - -

      - <%= 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" %> -

      -<% end %> diff --git a/app/views/request/_request_filter_form.html.erb b/app/views/request/_request_filter_form.html.erb new file mode 100644 index 000000000..090db01df --- /dev/null +++ b/app/views/request/_request_filter_form.html.erb @@ -0,0 +1,54 @@ +<%= render :partial => 'general/localised_datepicker' %> + +
      + <%= form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> +
      + <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> + <%= text_field_tag(:query, params[:query]) %> +
      +<% if false # don't think we want this, but leaving as an example %> +
      + <%= _("Search for words in:") %>
      + <% [["sent", _("messages from users")], + ["response", _("messages from authorities")], + ["comment", _("comments")]].each_with_index do |item, index| + variety, title = item %> + + <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> + <%= label_tag("request_variety_#{index}", title) %>
      + <% end %> +
      +<% end %> +
      + <%= label_tag(:query, _("Made between"), :class=>"form_label title") %> + <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %>   + <%= label_tag(:query, _("and"), :class=>"form_label") %> + <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> +
      +
      +

      <%= _("Showing") %>

      +
      + <% statuses = [["all", _("all requests")], + ["successful", _("successful requests")], + ["unsuccessful", _("unsuccessful requests")], + ["awaiting", _("unresolved requests")]] %> + <% for status, label in statuses %> + <% if params[:view] != status %> + <% if params[:controller] == "public_body" %> + <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string + '#results' %> + <% else %> + <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string + '#results' %> + <% end %> + <% else %> + <%= label %> + <% end %> + <%= "|" unless statuses.last[0] == status %> + <% end %> +
      +
      + +
      + <%= submit_tag(_("Search")) %> +
      +<% end %> +
      diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.rhtml deleted file mode 100644 index 090db01df..000000000 --- a/app/views/request/_request_filter_form.rhtml +++ /dev/null @@ -1,54 +0,0 @@ -<%= render :partial => 'general/localised_datepicker' %> - -
      - <%= form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> -
      - <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> - <%= text_field_tag(:query, params[:query]) %> -
      -<% if false # don't think we want this, but leaving as an example %> -
      - <%= _("Search for words in:") %>
      - <% [["sent", _("messages from users")], - ["response", _("messages from authorities")], - ["comment", _("comments")]].each_with_index do |item, index| - variety, title = item %> - - <%= check_box_tag "request_variety[]", variety, params[:request_variety].nil? ? true : params[:request_variety].include?(variety), :id => "request_variety_#{index}" %> - <%= label_tag("request_variety_#{index}", title) %>
      - <% end %> -
      -<% end %> -
      - <%= label_tag(:query, _("Made between"), :class=>"form_label title") %> - <%= text_field_tag(:request_date_after, params[:request_date_after], {:class => "use-datepicker", :size => 10}) %>   - <%= label_tag(:query, _("and"), :class=>"form_label") %> - <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> -
      -
      -

      <%= _("Showing") %>

      -
      - <% statuses = [["all", _("all requests")], - ["successful", _("successful requests")], - ["unsuccessful", _("unsuccessful requests")], - ["awaiting", _("unresolved requests")]] %> - <% for status, label in statuses %> - <% if params[:view] != status %> - <% if params[:controller] == "public_body" %> - <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string + '#results' %> - <% else %> - <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string + '#results' %> - <% end %> - <% else %> - <%= label %> - <% end %> - <%= "|" unless statuses.last[0] == status %> - <% end %> -
      -
      - -
      - <%= submit_tag(_("Search")) %> -
      -<% end %> -
      diff --git a/app/views/request/_request_listing.html.erb b/app/views/request/_request_listing.html.erb new file mode 100644 index 000000000..492f874f3 --- /dev/null +++ b/app/views/request/_request_listing.html.erb @@ -0,0 +1,8 @@ +<% if info_requests.empty? %> + <%= _('None found.') %> +<% else %> + <% for info_request in info_requests %> + <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> + <% end %> +<% end %> + diff --git a/app/views/request/_request_listing.rhtml b/app/views/request/_request_listing.rhtml deleted file mode 100644 index 492f874f3..000000000 --- a/app/views/request/_request_listing.rhtml +++ /dev/null @@ -1,8 +0,0 @@ -<% if info_requests.empty? %> - <%= _('None found.') %> -<% else %> - <% for info_request in info_requests %> - <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> - <% end %> -<% end %> - diff --git a/app/views/request/_request_listing_short_via_event.html.erb b/app/views/request/_request_listing_short_via_event.html.erb new file mode 100644 index 000000000..d93a91070 --- /dev/null +++ b/app/views/request/_request_listing_short_via_event.html.erb @@ -0,0 +1,14 @@ +<% if @highlight_words.nil? + @highlight_words = [] +end %> + +
      +

      <%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %>

      +

      + +<%= _('To {{public_body_link_absolute}}',:public_body_link_absolute => public_body_link_absolute(info_request.public_body))%> +<%= _('by {{user_link_absolute}}',:user_link_absolute => request_user_link_absolute(info_request))%> + <%= simple_date(info_request.created_at) %> +

      +
      + diff --git a/app/views/request/_request_listing_short_via_event.rhtml b/app/views/request/_request_listing_short_via_event.rhtml deleted file mode 100644 index d93a91070..000000000 --- a/app/views/request/_request_listing_short_via_event.rhtml +++ /dev/null @@ -1,14 +0,0 @@ -<% if @highlight_words.nil? - @highlight_words = [] -end %> - -
      -

      <%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %>

      -

      - -<%= _('To {{public_body_link_absolute}}',:public_body_link_absolute => public_body_link_absolute(info_request.public_body))%> -<%= _('by {{user_link_absolute}}',:user_link_absolute => request_user_link_absolute(info_request))%> - <%= simple_date(info_request.created_at) %> -

      -
      - diff --git a/app/views/request/_request_listing_single.html.erb b/app/views/request/_request_listing_single.html.erb new file mode 100644 index 000000000..25f63b367 --- /dev/null +++ b/app/views/request/_request_listing_single.html.erb @@ -0,0 +1,15 @@ +
      + + <%= link_to h(info_request.title), request_path(:url_title => info_request.url_title).html_safe %> + + + <%= excerpt(info_request.initial_request_text, "", 150) %> + + + + <%= info_request.display_status %> +
      + <%= _('Requested from {{public_body_name}} by {{info_request_user}} on {{date}}',:public_body_name=>public_body_link(info_request.public_body),:info_request_user=>user_link(info_request.user),:date=>simple_date(info_request.created_at)) %> +
      +
      + diff --git a/app/views/request/_request_listing_single.rhtml b/app/views/request/_request_listing_single.rhtml deleted file mode 100644 index 25f63b367..000000000 --- a/app/views/request/_request_listing_single.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -
      - - <%= link_to h(info_request.title), request_path(:url_title => info_request.url_title).html_safe %> - - - <%= excerpt(info_request.initial_request_text, "", 150) %> - - - - <%= info_request.display_status %> -
      - <%= _('Requested from {{public_body_name}} by {{info_request_user}} on {{date}}',:public_body_name=>public_body_link(info_request.public_body),:info_request_user=>user_link(info_request.user),:date=>simple_date(info_request.created_at)) %> -
      -
      - diff --git a/app/views/request/_request_listing_via_event.html.erb b/app/views/request/_request_listing_via_event.html.erb new file mode 100644 index 000000000..2ba9613e5 --- /dev/null +++ b/app/views/request/_request_listing_via_event.html.erb @@ -0,0 +1,48 @@ +<% if @highlight_words.nil? + @highlight_words = [] +end %> + +
      +
      + + <% if event.is_incoming_message? %> + <%= link_to highlight_words(info_request.title, @highlight_words), incoming_message_url(event.incoming_message_selective_columns("incoming_messages.id")) %> + <% elsif event.is_outgoing_message? and event.event_type == 'followup_sent' %> + <%= link_to highlight_words(info_request.title, @highlight_words), outgoing_message_url(event.outgoing_message) %> + <% elsif event.is_comment? %> + <%= link_to highlight_words(info_request.title, @highlight_words), comment_url(event.comment) %> + <% else %> + <%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %> + <% end %> + +
      + <% if event.event_type == 'sent' %> + <%= _('Request 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 )) %> + <% elsif event.event_type == 'followup_sent' %> + <%=event.display_status %> + <%= _('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 )) %> + <% elsif event.event_type == 'response' %> + <%=event.display_status %> + <%= _('by {{public_body_name}} to {{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 )) %> + <% elsif event.event_type == 'comment' %> + <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %> + <% else %> + <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? + However, it can happen that we see other types of event transiently here in the period + between a change being made and the update-xapian-index job being run. %> + + <% end %> +
      + + + <%= info_request.display_status(cached_value_ok=true) %> +
      +
      +
      +
      + + <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> + +
      +
      + diff --git a/app/views/request/_request_listing_via_event.rhtml b/app/views/request/_request_listing_via_event.rhtml deleted file mode 100644 index 2ba9613e5..000000000 --- a/app/views/request/_request_listing_via_event.rhtml +++ /dev/null @@ -1,48 +0,0 @@ -<% if @highlight_words.nil? - @highlight_words = [] -end %> - -
      -
      - - <% if event.is_incoming_message? %> - <%= link_to highlight_words(info_request.title, @highlight_words), incoming_message_url(event.incoming_message_selective_columns("incoming_messages.id")) %> - <% elsif event.is_outgoing_message? and event.event_type == 'followup_sent' %> - <%= link_to highlight_words(info_request.title, @highlight_words), outgoing_message_url(event.outgoing_message) %> - <% elsif event.is_comment? %> - <%= link_to highlight_words(info_request.title, @highlight_words), comment_url(event.comment) %> - <% else %> - <%= link_to highlight_words(info_request.title, @highlight_words), request_url(info_request) %> - <% end %> - -
      - <% if event.event_type == 'sent' %> - <%= _('Request 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 )) %> - <% elsif event.event_type == 'followup_sent' %> - <%=event.display_status %> - <%= _('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 )) %> - <% elsif event.event_type == 'response' %> - <%=event.display_status %> - <%= _('by {{public_body_name}} to {{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 )) %> - <% elsif event.event_type == 'comment' %> - <%= _('Request to {{public_body_name}} by {{info_request_user}}. Annotated by {{event_comment_user}} on {{date}}.',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at)) %> - <% else %> - <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? - However, it can happen that we see other types of event transiently here in the period - between a change being made and the update-xapian-index job being run. %> - - <% end %> -
      - - - <%= info_request.display_status(cached_value_ok=true) %> -
      -
      -
      -
      - - <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> - -
      -
      - diff --git a/app/views/request/_search_ahead.html.erb b/app/views/request/_search_ahead.html.erb new file mode 100644 index 000000000..1e65a5458 --- /dev/null +++ b/app/views/request/_search_ahead.html.erb @@ -0,0 +1,14 @@ +
      + <% if !@xapian_requests.nil? %> + <% if @xapian_requests.results.size > 0 %> +

      <%= _("Possibly related requests:") %>

      + <% end %> + <% for result in @xapian_requests.results %> + <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + +

      + <%= _("Or search in their website for this information.") %> +

      + <% end %> +
      diff --git a/app/views/request/_search_ahead.rhtml b/app/views/request/_search_ahead.rhtml deleted file mode 100644 index 1e65a5458..000000000 --- a/app/views/request/_search_ahead.rhtml +++ /dev/null @@ -1,14 +0,0 @@ -
      - <% if !@xapian_requests.nil? %> - <% if @xapian_requests.results.size > 0 %> -

      <%= _("Possibly related requests:") %>

      - <% end %> - <% for result in @xapian_requests.results %> - <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> - -

      - <%= _("Or search in their website for this information.") %> -

      - <% end %> -
      diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb new file mode 100644 index 000000000..781671529 --- /dev/null +++ b/app/views/request/_sidebar.html.erb @@ -0,0 +1,68 @@ +
      +
      +

      <%= _('Follow this request') %>

      + + <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %> +

      <%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %>

      + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user && @info_request.user == @user, :location => 'sidebar' } %> +
      + <% if @info_request.described_state != "attention_requested" %> +

      <%= _('Offensive? Unsuitable?') %>

      + <% 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.html.erb %> +

      <%= _('This request has prominence \'hidden\'. You can only see it because you are logged + in as a super user.') %>

      + <% 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.html.erb %> +

      <%= raw(_('This request is hidden, so that only you the requester can see it. Please + contact us if you are not sure why.') % [help_requesting_path]) %>

      + <% else %> +

      <%= 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 contact us.') % [help_requesting_path]) %>

      + <% end %> + <% else %> +

      <%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>

      +

      <%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>

      + <%= button_to _("Report this request"), report_path, :class => "link_button_green" %> + <% end %> + <% end %> +

      <%= _("Act on what you've learnt") %>

      + + + + + <%= render :partial => 'request/next_actions' %> + + <% # TODO: Cache for 1 day %> + <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %> +

      <%= _('Similar requests')%>

      + <% for result in @xapian_similar.results %> + <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + <% if @xapian_similar_more %> +

      <%= link_to _("More similar requests"), request_similar_url(@info_request) %>

      + <% end %> + + <% end %> + +

      <%= link_to _('Event history details'), request_details_url(@info_request) %>

      + + +

      <%= raw(_('Are you the owner of + any commercial copyright on this page?') % [help_officers_path+"#copyright"]) %>

      + +
      diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml deleted file mode 100644 index 43e1e7435..000000000 --- a/app/views/request/_sidebar.rhtml +++ /dev/null @@ -1,68 +0,0 @@ -
      -
      -

      <%= _('Follow this request') %>

      - - <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %> -

      <%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %>

      - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user && @info_request.user == @user, :location => 'sidebar' } %> -
      - <% if @info_request.described_state != "attention_requested" %> -

      <%= _('Offensive? Unsuitable?') %>

      - <% 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 %> -

      <%= _('This request has prominence \'hidden\'. You can only see it because you are logged - in as a super user.') %>

      - <% 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 %> -

      <%= raw(_('This request is hidden, so that only you the requester can see it. Please - contact us if you are not sure why.') % [help_requesting_path]) %>

      - <% else %> -

      <%= 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 contact us.') % [help_requesting_path]) %>

      - <% end %> - <% else %> -

      <%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (read more).') %>

      -

      <%= _('If you believe this request is not suitable, you can report it for attention by the site administrators') %>

      - <%= button_to _("Report this request"), report_path, :class => "link_button_green" %> - <% end %> - <% end %> -

      <%= _("Act on what you've learnt") %>

      - - - - - <%= render :partial => 'request/next_actions' %> - - <% # TODO: Cache for 1 day %> - <% if !@xapian_similar.nil? && @xapian_similar.results.size > 0 %> -

      <%= _('Similar requests')%>

      - <% for result in @xapian_similar.results %> - <%= render :partial => 'request/request_listing_short_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> - <% if @xapian_similar_more %> -

      <%= link_to _("More similar requests"), request_similar_url(@info_request) %>

      - <% end %> - - <% end %> - -

      <%= link_to _('Event history details'), request_details_url(@info_request) %>

      - - -

      <%= raw(_('Are you the owner of - any commercial copyright on this page?') % [help_officers_path+"#copyright"]) %>

      - -
      diff --git a/app/views/request/_sidebar_request_listing.html.erb b/app/views/request/_sidebar_request_listing.html.erb new file mode 100644 index 000000000..ec5a5813d --- /dev/null +++ b/app/views/request/_sidebar_request_listing.html.erb @@ -0,0 +1,16 @@ +<% for info_request in info_requests %> +
      + + <%= request_link(info_request) %> + + + <%=h excerpt(info_request.initial_request_text, "", 100) %> + + + + <%= info_request.display_status %> +
      + <% _('Requested on {{date}}',:date=>simple_date(info_request.created_at)) %>. +
      +
      +<% end %> diff --git a/app/views/request/_sidebar_request_listing.rhtml b/app/views/request/_sidebar_request_listing.rhtml deleted file mode 100644 index ec5a5813d..000000000 --- a/app/views/request/_sidebar_request_listing.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% for info_request in info_requests %> -
      - - <%= request_link(info_request) %> - - - <%=h excerpt(info_request.initial_request_text, "", 100) %> - - - - <%= info_request.display_status %> -
      - <% _('Requested on {{date}}',:date=>simple_date(info_request.created_at)) %>. -
      -
      -<% end %> diff --git a/app/views/request/_summary_suggestion.html.erb b/app/views/request/_summary_suggestion.html.erb new file mode 100644 index 000000000..a5da09cda --- /dev/null +++ b/app/views/request/_summary_suggestion.html.erb @@ -0,0 +1,5 @@ +<% if @info_request.law_used == 'eir' %> + <%= _("'Pollution levels over time for the River Tyne'") %> +<% else %> + <%= _("'Crime statistics by ward level for Wales'") %> +<% end %> diff --git a/app/views/request/_summary_suggestion.rhtml b/app/views/request/_summary_suggestion.rhtml deleted file mode 100644 index a5da09cda..000000000 --- a/app/views/request/_summary_suggestion.rhtml +++ /dev/null @@ -1,5 +0,0 @@ -<% if @info_request.law_used == 'eir' %> - <%= _("'Pollution levels over time for the River Tyne'") %> -<% else %> - <%= _("'Crime statistics by ward level for Wales'") %> -<% end %> diff --git a/app/views/request/_view_html_prefix.html.erb b/app/views/request/_view_html_prefix.html.erb new file mode 100644 index 000000000..b29830ac7 --- /dev/null +++ b/app/views/request/_view_html_prefix.html.erb @@ -0,0 +1,12 @@ +
      + + + <%= _('This is an HTML version of an attachment to the Freedom of Information request')%> + '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'. +
      + diff --git a/app/views/request/_view_html_prefix.rhtml b/app/views/request/_view_html_prefix.rhtml deleted file mode 100644 index b29830ac7..000000000 --- a/app/views/request/_view_html_prefix.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -
      - - - <%= _('This is an HTML version of an attachment to the Freedom of Information request')%> - '<%=link_to h(@info_request.title), incoming_message_url(@incoming_message)%>'. -
      - diff --git a/app/views/request/_view_html_stylesheet.html.erb b/app/views/request/_view_html_stylesheet.html.erb new file mode 100644 index 000000000..d6cb932a8 --- /dev/null +++ b/app/views/request/_view_html_stylesheet.html.erb @@ -0,0 +1 @@ +<%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> diff --git a/app/views/request/_view_html_stylesheet.rhtml b/app/views/request/_view_html_stylesheet.rhtml deleted file mode 100644 index d6cb932a8..000000000 --- a/app/views/request/_view_html_stylesheet.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= stylesheet_link_tag 'main', :title => "Main", :rel => "stylesheet" %> diff --git a/app/views/request/_wall_listing.html.erb b/app/views/request/_wall_listing.html.erb new file mode 100644 index 000000000..26d34e1a1 --- /dev/null +++ b/app/views/request/_wall_listing.html.erb @@ -0,0 +1,30 @@ +<% if @highlight_words.nil? + @highlight_words = [] +end %> + +
      +
      +
      + <% if event.event_type == 'sent' %> + <%= _('A new request, {{request_title}}, 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_url(info_request),:request_title=>info_request.title) %> + <% elsif event.event_type == 'followup_sent' %> + <%= _('A follow up to {{request_title}} 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) %> + <% elsif event.event_type == 'response' %> + <%= _('A response to {{request_title}} 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_url(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %> + <% elsif event.event_type == 'comment' %> + <%= _('An annotation to {{request_title}} was made by {{event_comment_user}} on {{date}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at),:request_url=>comment_url(event.comment),:request_title=>info_request.title) %> + <% else %> + <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? + However, it can happen that we see other types of event transiently here in the period + between a change being made and the update-xapian-index job being run. %> + + <% end %> +
      +
      +
      + + <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> + +
      +
      + diff --git a/app/views/request/_wall_listing.rhtml b/app/views/request/_wall_listing.rhtml deleted file mode 100644 index 26d34e1a1..000000000 --- a/app/views/request/_wall_listing.rhtml +++ /dev/null @@ -1,30 +0,0 @@ -<% if @highlight_words.nil? - @highlight_words = [] -end %> - -
      -
      -
      - <% if event.event_type == 'sent' %> - <%= _('A new request, {{request_title}}, 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_url(info_request),:request_title=>info_request.title) %> - <% elsif event.event_type == 'followup_sent' %> - <%= _('A follow up to {{request_title}} 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) %> - <% elsif event.event_type == 'response' %> - <%= _('A response to {{request_title}} 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_url(event.incoming_message_selective_columns("incoming_messages.id")),:request_title=>info_request.title,:request_status=>info_request.display_status) %> - <% elsif event.event_type == 'comment' %> - <%= _('An annotation to {{request_title}} was made by {{event_comment_user}} on {{date}}',:public_body_name=>public_body_link_absolute(info_request.public_body),:info_request_user=>request_user_link_absolute(info_request),:event_comment_user=>user_link_absolute(event.comment.user),:date=>simple_date(event.created_at),:request_url=>comment_url(event.comment),:request_title=>info_request.title) %> - <% else %> - <%# Events of other types will not be indexed: see InfoRequestEvent#indexed_by_search? - However, it can happen that we see other types of event transiently here in the period - between a change being made and the update-xapian-index job being run. %> - - <% end %> -
      -
      -
      - - <%= highlight_and_excerpt(event.search_text_main(true), @highlight_words, 150) %> - -
      -
      - diff --git a/app/views/request/details.html.erb b/app/views/request/details.html.erb new file mode 100644 index 000000000..d4c63902f --- /dev/null +++ b/app/views/request/details.html.erb @@ -0,0 +1,60 @@ +<% @title = _("Details of request '") + h(@info_request.title) + "'" %> +

      <%= _("Details of request '") + request_link(@info_request) + "'" %>

      + +

      <%= _('Event history') %>

      + +

      <%= _('This table shows the technical details of the internal events that happened +to this request on {{site_name}}. This could be used to generate information about +the speed with which authorities respond to requests, the number of requests +which require a postal response and much more.', :site_name=>site_name) %> +

      + +

      <%= _('Caveat emptor! To use this data in an honourable way, you will need +a good internal knowledge of user behaviour on {{site_name}}. How, +why and by whom requests are categorised is not straightforward, and there will +be user error and ambiguity. You will also need to understand FOI law, and the +way authorities use it. Plus you\'ll need to be an elite statistician. Please +contact us with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %> +

      + +<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %> + + + + <% for column in @columns%> + + <% end %> + + + +<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> + + <% for column in @columns %> + + <% end %> + + +<% end %> +
      <%= column %>link
      + <%=h info_request_event.send(column) %> + + <% if info_request_event.outgoing_message %> + <%= link_to "outgoing", outgoing_message_url(info_request_event.outgoing_message) %> + <% end %> + <% if info_request_event.incoming_message %> + <%= link_to "incoming", incoming_message_url(info_request_event.incoming_message) %> + <% end %> +
      + +

      +<%= _('Here described means when a user selected a status for the request, and +the most recent event had its status updated to that value. calculated is then inferred by +{{site_name}} for intermediate events, which weren\'t given an explicit +description by a user. See the search tips for description of the states.', +:site_name=>site_name, :search_path=>search_redirect_path) %> +

      + +

      +<%= _('You can get this page in computer-readable format as part of the main JSON +page for the request. See the API documentation.', :api_path=>help_api_path) %> +

      diff --git a/app/views/request/details.rhtml b/app/views/request/details.rhtml deleted file mode 100644 index d4c63902f..000000000 --- a/app/views/request/details.rhtml +++ /dev/null @@ -1,60 +0,0 @@ -<% @title = _("Details of request '") + h(@info_request.title) + "'" %> -

      <%= _("Details of request '") + request_link(@info_request) + "'" %>

      - -

      <%= _('Event history') %>

      - -

      <%= _('This table shows the technical details of the internal events that happened -to this request on {{site_name}}. This could be used to generate information about -the speed with which authorities respond to requests, the number of requests -which require a postal response and much more.', :site_name=>site_name) %> -

      - -

      <%= _('Caveat emptor! To use this data in an honourable way, you will need -a good internal knowledge of user behaviour on {{site_name}}. How, -why and by whom requests are categorised is not straightforward, and there will -be user error and ambiguity. You will also need to understand FOI law, and the -way authorities use it. Plus you\'ll need to be an elite statistician. Please -contact us with questions.', :site_name=>site_name, :contact_path=>help_contact_path) %> -

      - -<% columns = ['id', 'event_type', 'created_at', 'described_state', 'calculated_state', 'last_described_at' ] %> - - - - <% for column in @columns%> - - <% end %> - - - -<% for info_request_event in @info_request.info_request_events.find(:all, :order => "created_at, id") %> - - <% for column in @columns %> - - <% end %> - - -<% end %> -
      <%= column %>link
      - <%=h info_request_event.send(column) %> - - <% if info_request_event.outgoing_message %> - <%= link_to "outgoing", outgoing_message_url(info_request_event.outgoing_message) %> - <% end %> - <% if info_request_event.incoming_message %> - <%= link_to "incoming", incoming_message_url(info_request_event.incoming_message) %> - <% end %> -
      - -

      -<%= _('Here described means when a user selected a status for the request, and -the most recent event had its status updated to that value. calculated is then inferred by -{{site_name}} for intermediate events, which weren\'t given an explicit -description by a user. See the search tips for description of the states.', -:site_name=>site_name, :search_path=>search_redirect_path) %> -

      - -

      -<%= _('You can get this page in computer-readable format as part of the main JSON -page for the request. See the API documentation.', :api_path=>help_api_path) %> -

      diff --git a/app/views/request/followup_bad.html.erb b/app/views/request/followup_bad.html.erb new file mode 100644 index 000000000..c892263e6 --- /dev/null +++ b/app/views/request/followup_bad.html.erb @@ -0,0 +1,34 @@ +<% if @incoming_message.nil? || !@incoming_message.valid_to_reply_to? %> + <% @title = _("Unable to send follow up message to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, nil)) %> +<% else %> + <% @title = _("Unable to send a reply to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, @incoming_message)) %> +<% end %> + +

      <%=@title%>

      + +<% if @reason == 'not_apply' %> + +

      <%= _('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 + a general followup. If you need to make a general followup, and know + an email which will go to the right place, please send it to us.') % [help_contact_path]) %> +

      +<% elsif @reason == 'defunct' %> + +

      <%=h @info_request.public_body.name %> <%= raw(_('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 send it to us.') % [help_contact_path]) %> +

      +<% elsif @reason == 'bad_contact' %> +

      <%= _('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 + one on their website, or by phoning them up and asking. If you manage + to find one, then please send it to us.') % [help_contact_path]) %> +

      +<% elsif @reason == 'external' %> +

      <%= _("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)) %> +

      +<% else %> + <% raise _("unknown reason ") + @reason %> +<% end %> + diff --git a/app/views/request/followup_bad.rhtml b/app/views/request/followup_bad.rhtml deleted file mode 100644 index c892263e6..000000000 --- a/app/views/request/followup_bad.rhtml +++ /dev/null @@ -1,34 +0,0 @@ -<% if @incoming_message.nil? || !@incoming_message.valid_to_reply_to? %> - <% @title = _("Unable to send follow up message to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, nil)) %> -<% else %> - <% @title = _("Unable to send a reply to {{username}}",:username=>OutgoingMailer.name_for_followup(@info_request, @incoming_message)) %> -<% end %> - -

      <%=@title%>

      - -<% if @reason == 'not_apply' %> - -

      <%= _('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 - a general followup. If you need to make a general followup, and know - an email which will go to the right place, please send it to us.') % [help_contact_path]) %> -

      -<% elsif @reason == 'defunct' %> - -

      <%=h @info_request.public_body.name %> <%= raw(_('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 send it to us.') % [help_contact_path]) %> -

      -<% elsif @reason == 'bad_contact' %> -

      <%= _('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 - one on their website, or by phoning them up and asking. If you manage - to find one, then please send it to us.') % [help_contact_path]) %> -

      -<% elsif @reason == 'external' %> -

      <%= _("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)) %> -

      -<% else %> - <% raise _("unknown reason ") + @reason %> -<% end %> - diff --git a/app/views/request/followup_preview.html.erb b/app/views/request/followup_preview.html.erb new file mode 100644 index 000000000..55afc0245 --- /dev/null +++ b/app/views/request/followup_preview.html.erb @@ -0,0 +1,56 @@ +<% @title = _("Preview follow up to '") + h(@info_request.public_body.name) + "'" %> + +
      + +<%= 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 %> +

      <%= _('Now preview your message asking for an internal review') %>

      + <% else %> +

      <%= _('Now preview your follow up') %>

      + <% end %> + +
        +
      • <%= _('Check you haven\'t included any personal information.') %>
      • +
      • <%= _('Your message will appear in search engines') %>
      • +
      + + <%= fields_for :outgoing_message do |o| %> + +
      +

      + <%= _('To:') %> <%=h OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> +
      <%= _('Subject:') %> <%=h OutgoingMailer.subject_for_followup(@info_request, @outgoing_message) %> +

      + +
      +

      <%= @outgoing_message.get_body_for_html_display %>

      + <%= o.hidden_field(:body) %> +
      + +

      +

      +
      + <% end %> + +

      + <%= _('Privacy warning: Your message, and any response + to it, will be displayed publicly on this website.') %> + + <%= o.hidden_field(:what_doing) %> +

      + +

      + <%= hidden_field_tag(:submitted_followup, 1) %> + <%= hidden_field_tag(:preview, 0 ) %> + <% if @internal_review_pass_on %> + <%= hidden_field_tag(:internal_review, 1 ) %> + <% end %> + <%= submit_tag _("Re-edit this message"), :name => 'reedit' %> + <%= submit_tag _("Send message"), :name => 'submit' %> +

      + +<% end %> + +
      + diff --git a/app/views/request/followup_preview.rhtml b/app/views/request/followup_preview.rhtml deleted file mode 100644 index 55afc0245..000000000 --- a/app/views/request/followup_preview.rhtml +++ /dev/null @@ -1,56 +0,0 @@ -<% @title = _("Preview follow up to '") + h(@info_request.public_body.name) + "'" %> - -
      - -<%= 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 %> -

      <%= _('Now preview your message asking for an internal review') %>

      - <% else %> -

      <%= _('Now preview your follow up') %>

      - <% end %> - -
        -
      • <%= _('Check you haven\'t included any personal information.') %>
      • -
      • <%= _('Your message will appear in search engines') %>
      • -
      - - <%= fields_for :outgoing_message do |o| %> - -
      -

      - <%= _('To:') %> <%=h OutgoingMailer.name_for_followup(@info_request, @incoming_message) %> -
      <%= _('Subject:') %> <%=h OutgoingMailer.subject_for_followup(@info_request, @outgoing_message) %> -

      - -
      -

      <%= @outgoing_message.get_body_for_html_display %>

      - <%= o.hidden_field(:body) %> -
      - -

      -

      -
      - <% end %> - -

      - <%= _('Privacy warning: Your message, and any response - to it, will be displayed publicly on this website.') %> - - <%= o.hidden_field(:what_doing) %> -

      - -

      - <%= hidden_field_tag(:submitted_followup, 1) %> - <%= hidden_field_tag(:preview, 0 ) %> - <% if @internal_review_pass_on %> - <%= hidden_field_tag(:internal_review, 1 ) %> - <% end %> - <%= submit_tag _("Re-edit this message"), :name => 'reedit' %> - <%= submit_tag _("Send message"), :name => 'submit' %> -

      - -<% end %> - -
      - diff --git a/app/views/request/hidden.html.erb b/app/views/request/hidden.html.erb new file mode 100644 index 000000000..41b2ff7e4 --- /dev/null +++ b/app/views/request/hidden.html.erb @@ -0,0 +1,19 @@ +<% @title = _("Request has been removed") %> + +

      <%=@title%>

      + +

      +<%=@details%> +

      + +

      <%= 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 contact us if you have any questions.') % [help_contact_path]) %> +

      +<% if @info_request.prominence == 'requester_only' %> +

      + <%= raw(_('If you are the requester, then you may sign in to view the request.') % [signin_url(:r => request.fullpath)]) %> +

      +<% end %> + + diff --git a/app/views/request/hidden.rhtml b/app/views/request/hidden.rhtml deleted file mode 100644 index 41b2ff7e4..000000000 --- a/app/views/request/hidden.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<% @title = _("Request has been removed") %> - -

      <%=@title%>

      - -

      -<%=@details%> -

      - -

      <%= 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 contact us if you have any questions.') % [help_contact_path]) %> -

      -<% if @info_request.prominence == 'requester_only' %> -

      - <%= raw(_('If you are the requester, then you may sign in to view the request.') % [signin_url(:r => request.fullpath)]) %> -

      -<% end %> - - diff --git a/app/views/request/list.html.erb b/app/views/request/list.html.erb new file mode 100644 index 000000000..062b77c3e --- /dev/null +++ b/app/views/request/list.html.erb @@ -0,0 +1,34 @@ + +
      +

      <%=@title%>

      + <%= render :partial => 'request/request_filter_form' %> +
      + +
      +

      <%= _("Follow these requests") %>

      + <% if @track_thing %> + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> + <% end %> +
      + +
      + +
      + <% # TODO: Cache for 5 minutes %> + <% if @list_results.empty? %> +

      <%= _('No requests of this sort yet.')%>

      + <% else %> +

      <%= _('{{count}} FOI requests found', :count => @matches_estimated) %>

      +
      + <% for result in @list_results%> + <% if result.class.to_s == 'InfoRequestEvent' %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %> + <% else %> +

      <%= _('Unexpected search result type') %> <%=result.class.to_s%>

      + <% end %> + <% end %> +
      + <% end %> + + <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %> +
      diff --git a/app/views/request/list.rhtml b/app/views/request/list.rhtml deleted file mode 100644 index 062b77c3e..000000000 --- a/app/views/request/list.rhtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      -

      <%=@title%>

      - <%= render :partial => 'request/request_filter_form' %> -
      - -
      -

      <%= _("Follow these requests") %>

      - <% if @track_thing %> - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> - <% end %> -
      - -
      - -
      - <% # TODO: Cache for 5 minutes %> - <% if @list_results.empty? %> -

      <%= _('No requests of this sort yet.')%>

      - <% else %> -

      <%= _('{{count}} FOI requests found', :count => @matches_estimated) %>

      -
      - <% for result in @list_results%> - <% if result.class.to_s == 'InfoRequestEvent' %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result, :info_request => result.info_request } %> - <% else %> -

      <%= _('Unexpected search result type') %> <%=result.class.to_s%>

      - <% end %> - <% end %> -
      - <% end %> - - <%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %> -
      diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb new file mode 100644 index 000000000..70719405c --- /dev/null +++ b/app/views/request/new.html.erb @@ -0,0 +1,154 @@ + + + +<% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %> + +

      <%= _('2. Ask for Information') %>

      + + <% if @existing_request %> +
        +
      • + <%= _('{{existing_request_user}} already + created the same request on {{date}}. You can either view the existing request, + or edit the details below to make a new but similar request.',:existing_request_user=>user_or_you_capital_link(@existing_request.user), :date=>simple_date(@existing_request.created_at), :existing_request=>request_url(@existing_request)) %> +
      • +
      + <% end %> + + <%= foi_error_messages_for :info_request, :outgoing_message %> + + <%= form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> + +
      +
      + + <%=h(@info_request.public_body.name)%> +
      + <% if @info_request.public_body.info_requests.size > 0 %> + <%= _("Browse other requests to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_url(@info_request.public_body)) %> + <% else %> + <%= _("Browse other requests for examples of how to word your request.", :url=>request_list_url) %> + <% end %> +
      + + <% if @info_request.public_body.has_notes? %> +
      +

      <%= _('Special note for this authority!') %>

      +

      <%= @info_request.public_body.notes_as_html %>

      +
      + <% end %> + + <% if @info_request.public_body.eir_only? %> +

      <%= _('Please ask for environmental information only') %>

      + +

      <%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>. + <%= _('However, you have the right to request environmental + information under a different law') %> (explanation). + <%= _('This covers a very wide spectrum of information about the state of + the natural and built environment, such as:') %> + +

        +
      • <%= _('Air, water, soil, land, flora and fauna (including how these effect + human beings)') %>
      • +
      • <%= _('Information on emissions and discharges (e.g. noise, energy, + radiation, waste materials)') %>
      • +
      • <%= _('Human health and safety') %>
      • +
      • <%= _('Cultural sites and built structures (as they may be affected by the + environmental factors listed above)') %>
      • +
      • <%= _('Plans and administrative measures that affect these matters') %>
      • +
      + +

      <%= _('Please only request information that comes under those categories, do not waste your + time or the time of the public authority by requesting unrelated information.') %>

      + <% end %> +
      + +
      +

      + + <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %> +

      +
      + (<%= _("a one line summary of the information you are requesting, \n\t\t\te.g.") %> + <%= render :partial => "summary_suggestion" %>) +
      +
      + +
      +
      +
      + +
      +
        +
      • <%= _('Write your request in simple, precise language.') %>
      • +
      • <%= _('Ask for specific documents or information, this site is not suitable for general enquiries.') %>
      • +
      • <%= raw(_('Keep it focused, you\'ll be more likely to get what you want (why?).') % [help_requesting_path + '#focused']) %>
      • +
      +
      + +
      + <%= fields_for :outgoing_message do |o| %> +

      + + <%= o.text_area :body, :rows => 20, :cols => 60 %> +

      + <% end %> + + <% if !@user %> +

      + <%= raw(_('Everything that you enter on this page, including your name, + will be displayed publicly on + this website forever (why?).') % [help_privacy_path+"#public_request"]) %> + <%= raw(_('If you are thinking of using a pseudonym, + please read this first.') % [help_privacy_path+"#real_name"]) %> +

      + <% else %> +

      + <%= raw(_('Everything that you enter on this page + will be displayed publicly on + this website forever (why?).') % [help_privacy_path+"#public_request"]) %> +

      + <% end %> + +

      + <%= raw(_(" Can I request information about myself?\n" + + "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %> +

      + +
      + <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> + <%= hidden_field_tag(:submitted_new_request, 1 ) %> + <%= hidden_field_tag(:preview, 1 ) %> + <%= submit_tag _("Preview your public request") %> +
      + + <% if !@info_request.tag_string.empty? %> +

      + + + <%= f.hidden_field(:tag_string) %> + Tags: <%=h @info_request.tag_string %> +

      + <% end %> + +
      +<% end %> + + diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml deleted file mode 100644 index 70719405c..000000000 --- a/app/views/request/new.rhtml +++ /dev/null @@ -1,154 +0,0 @@ - - - -<% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %> - -

      <%= _('2. Ask for Information') %>

      - - <% if @existing_request %> -
        -
      • - <%= _('{{existing_request_user}} already - created the same request on {{date}}. You can either view the existing request, - or edit the details below to make a new but similar request.',:existing_request_user=>user_or_you_capital_link(@existing_request.user), :date=>simple_date(@existing_request.created_at), :existing_request=>request_url(@existing_request)) %> -
      • -
      - <% end %> - - <%= foi_error_messages_for :info_request, :outgoing_message %> - - <%= form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> - -
      -
      - - <%=h(@info_request.public_body.name)%> -
      - <% if @info_request.public_body.info_requests.size > 0 %> - <%= _("Browse other requests to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name), :url=>public_body_url(@info_request.public_body)) %> - <% else %> - <%= _("Browse other requests for examples of how to word your request.", :url=>request_list_url) %> - <% end %> -
      - - <% if @info_request.public_body.has_notes? %> -
      -

      <%= _('Special note for this authority!') %>

      -

      <%= @info_request.public_body.notes_as_html %>

      -
      - <% end %> - - <% if @info_request.public_body.eir_only? %> -

      <%= _('Please ask for environmental information only') %>

      - -

      <%= _('The Freedom of Information Act does not apply to') %> <%=h(@info_request.public_body.name)%>. - <%= _('However, you have the right to request environmental - information under a different law') %> (explanation). - <%= _('This covers a very wide spectrum of information about the state of - the natural and built environment, such as:') %> - -

        -
      • <%= _('Air, water, soil, land, flora and fauna (including how these effect - human beings)') %>
      • -
      • <%= _('Information on emissions and discharges (e.g. noise, energy, - radiation, waste materials)') %>
      • -
      • <%= _('Human health and safety') %>
      • -
      • <%= _('Cultural sites and built structures (as they may be affected by the - environmental factors listed above)') %>
      • -
      • <%= _('Plans and administrative measures that affect these matters') %>
      • -
      - -

      <%= _('Please only request information that comes under those categories, do not waste your - time or the time of the public authority by requesting unrelated information.') %>

      - <% end %> -
      - -
      -

      - - <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %> -

      -
      - (<%= _("a one line summary of the information you are requesting, \n\t\t\te.g.") %> - <%= render :partial => "summary_suggestion" %>) -
      -
      - -
      -
      -
      - -
      -
        -
      • <%= _('Write your request in simple, precise language.') %>
      • -
      • <%= _('Ask for specific documents or information, this site is not suitable for general enquiries.') %>
      • -
      • <%= raw(_('Keep it focused, you\'ll be more likely to get what you want (why?).') % [help_requesting_path + '#focused']) %>
      • -
      -
      - -
      - <%= fields_for :outgoing_message do |o| %> -

      - - <%= o.text_area :body, :rows => 20, :cols => 60 %> -

      - <% end %> - - <% if !@user %> -

      - <%= raw(_('Everything that you enter on this page, including your name, - will be displayed publicly on - this website forever (why?).') % [help_privacy_path+"#public_request"]) %> - <%= raw(_('If you are thinking of using a pseudonym, - please read this first.') % [help_privacy_path+"#real_name"]) %> -

      - <% else %> -

      - <%= raw(_('Everything that you enter on this page - will be displayed publicly on - this website forever (why?).') % [help_privacy_path+"#public_request"]) %> -

      - <% end %> - -

      - <%= raw(_(" Can I request information about myself?\n" + - "\t\t\tNo! (Click here for details)") % [help_requesting_path+"#data_protection"]) %> -

      - -
      - <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> - <%= hidden_field_tag(:submitted_new_request, 1 ) %> - <%= hidden_field_tag(:preview, 1 ) %> - <%= submit_tag _("Preview your public request") %> -
      - - <% if !@info_request.tag_string.empty? %> -

      - - - <%= f.hidden_field(:tag_string) %> - Tags: <%=h @info_request.tag_string %> -

      - <% end %> - -
      -<% end %> - - diff --git a/app/views/request/new_bad_contact.html.erb b/app/views/request/new_bad_contact.html.erb new file mode 100644 index 000000000..56f3f4168 --- /dev/null +++ b/app/views/request/new_bad_contact.html.erb @@ -0,0 +1,10 @@ +<% @title = _("Missing contact details for '") + h(@info_request.public_body.name) + "'" %> + +

      <%=@title%>

      + +

      <%= _('Unfortunately, we do not have a working {{info_request_law_used_full}} +address for', :info_request_law_used_full => @info_request.law_used_full) %> <%=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 send it to us.', :help_url => help_contact_path) %> +

      + diff --git a/app/views/request/new_bad_contact.rhtml b/app/views/request/new_bad_contact.rhtml deleted file mode 100644 index 56f3f4168..000000000 --- a/app/views/request/new_bad_contact.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -<% @title = _("Missing contact details for '") + h(@info_request.public_body.name) + "'" %> - -

      <%=@title%>

      - -

      <%= _('Unfortunately, we do not have a working {{info_request_law_used_full}} -address for', :info_request_law_used_full => @info_request.law_used_full) %> <%=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 send it to us.', :help_url => help_contact_path) %> -

      - diff --git a/app/views/request/new_please_describe.html.erb b/app/views/request/new_please_describe.html.erb new file mode 100644 index 000000000..6a193e70d --- /dev/null +++ b/app/views/request/new_please_describe.html.erb @@ -0,0 +1,23 @@ +<% @title = "First, did your other requests succeed?" %> + +

      <%=@title%>

      + +

      <%= _('Please select each of these requests in turn, and let everyone know +if they are successful yet or not.') %> +

      + +
        +<% for undescribed_request in @undescribed_requests %> +
      • <%=request_link(undescribed_request)%>
      • +<% end %> +
      + +

      + <%= raw(_('When you\'re done, come back here, reload this page and file your new request.') % [request.fullpath]) %> +

      + +

      + <%= _('Thanks very much for helping keep everything neat and organised. + We\'ll also, if you need it, give you advice on what to do next about each of your + requests.') %> +

      diff --git a/app/views/request/new_please_describe.rhtml b/app/views/request/new_please_describe.rhtml deleted file mode 100644 index 6a193e70d..000000000 --- a/app/views/request/new_please_describe.rhtml +++ /dev/null @@ -1,23 +0,0 @@ -<% @title = "First, did your other requests succeed?" %> - -

      <%=@title%>

      - -

      <%= _('Please select each of these requests in turn, and let everyone know -if they are successful yet or not.') %> -

      - -
        -<% for undescribed_request in @undescribed_requests %> -
      • <%=request_link(undescribed_request)%>
      • -<% end %> -
      - -

      - <%= raw(_('When you\'re done, come back here, reload this page and file your new request.') % [request.fullpath]) %> -

      - -

      - <%= _('Thanks very much for helping keep everything neat and organised. - We\'ll also, if you need it, give you advice on what to do next about each of your - requests.') %> -

      diff --git a/app/views/request/preview.html.erb b/app/views/request/preview.html.erb new file mode 100644 index 000000000..d5195bc0c --- /dev/null +++ b/app/views/request/preview.html.erb @@ -0,0 +1,48 @@ +<% @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| %> + +

      <%= _('3. Now check your request') %>

      +
        +
      • <%= _('Check you haven\'t included any personal information.') %>
      • +
      • <%= raw(_('Your name, request and any responses will appear in search engines + (details).') % [help_privacy_path+"#public_request"]) %> +
      • +
      + + <%= fields_for :outgoing_message do |o| %> + +
      +

      + <%= _('To:') %> <%=h @info_request.public_body.name %> +
      <%= _('Subject:') %> <%=h @info_request.email_subject_request %> +

      + +
      +

      <%= @outgoing_message.get_body_for_html_display %>

      + <%= o.hidden_field(:body) %> +
      + +

      +

      +
      + <% end %> + +

      <%= raw(_('Privacy note: If you want to request private information about + yourself then click here.') % [help_requesting_path+"#data_protection"]) %> + +

      + <%= f.hidden_field(:title) %> + <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> + <%= f.hidden_field(:tag_string) %> + <%= 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' %> +

      + + <% if !@info_request.tag_string.empty? %> +

      <%= _('Tags:') %> <%=h @info_request.tag_string %>

      + <% end %> + +<% end %> diff --git a/app/views/request/preview.rhtml b/app/views/request/preview.rhtml deleted file mode 100644 index d5195bc0c..000000000 --- a/app/views/request/preview.rhtml +++ /dev/null @@ -1,48 +0,0 @@ -<% @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| %> - -

      <%= _('3. Now check your request') %>

      -
        -
      • <%= _('Check you haven\'t included any personal information.') %>
      • -
      • <%= raw(_('Your name, request and any responses will appear in search engines - (details).') % [help_privacy_path+"#public_request"]) %> -
      • -
      - - <%= fields_for :outgoing_message do |o| %> - -
      -

      - <%= _('To:') %> <%=h @info_request.public_body.name %> -
      <%= _('Subject:') %> <%=h @info_request.email_subject_request %> -

      - -
      -

      <%= @outgoing_message.get_body_for_html_display %>

      - <%= o.hidden_field(:body) %> -
      - -

      -

      -
      - <% end %> - -

      <%= raw(_('Privacy note: If you want to request private information about - yourself then click here.') % [help_requesting_path+"#data_protection"]) %> - -

      - <%= f.hidden_field(:title) %> - <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> - <%= f.hidden_field(:tag_string) %> - <%= 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' %> -

      - - <% if !@info_request.tag_string.empty? %> -

      <%= _('Tags:') %> <%=h @info_request.tag_string %>

      - <% end %> - -<% end %> diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb new file mode 100644 index 000000000..ece3b57d7 --- /dev/null +++ b/app/views/request/select_authority.html.erb @@ -0,0 +1,70 @@ + + + +<% @title = _("Select the authority to write to") %> + +

      <%= _('1. Select an authority') %>

      + +
      + <%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %> +
      +

      + <%= raw(_('First, type in the name of the UK public authority you\'d + like information from. By law, they have to respond + (why?).') % [help_about_url, "whybother_them"]) %> +

      + <%= text_field_tag 'query', params[:query], { :size => 30 } %> + <%= hidden_field_tag 'bodies', 1 %> + <%= submit_tag _('Search') %> +
      + <% end %> +
      + <% if !@xapian_requests.nil? %> + <% if @xapian_requests.results.size > 0 %> +

      <%= _('Top search results:') %>

      +

      + <%= _('Select one to see more information about the authority.')%> +

      + <% else %> +

      <%= _('No results found.') %>

      + <% end %> +
      + <% for result in @xapian_requests.results %> + <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> + <% end %> +
      + + <% end %> + + + +
      +
      + +
      +
      + diff --git a/app/views/request/select_authority.rhtml b/app/views/request/select_authority.rhtml deleted file mode 100644 index ece3b57d7..000000000 --- a/app/views/request/select_authority.rhtml +++ /dev/null @@ -1,70 +0,0 @@ - - - -<% @title = _("Select the authority to write to") %> - -

      <%= _('1. Select an authority') %>

      - -
      - <%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %> -
      -

      - <%= raw(_('First, type in the name of the UK public authority you\'d - like information from. By law, they have to respond - (why?).') % [help_about_url, "whybother_them"]) %> -

      - <%= text_field_tag 'query', params[:query], { :size => 30 } %> - <%= hidden_field_tag 'bodies', 1 %> - <%= submit_tag _('Search') %> -
      - <% end %> -
      - <% if !@xapian_requests.nil? %> - <% if @xapian_requests.results.size > 0 %> -

      <%= _('Top search results:') %>

      -

      - <%= _('Select one to see more information about the authority.')%> -

      - <% else %> -

      <%= _('No results found.') %>

      - <% end %> -
      - <% for result in @xapian_requests.results %> - <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> - <% end %> -
      - - <% end %> - - - -
      -
      - -
      -
      - diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb new file mode 100644 index 000000000..fa75a6529 --- /dev/null +++ b/app/views/request/show.html.erb @@ -0,0 +1,149 @@ +<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}", + :title => h(@info_request.title), + :public_body => (@info_request.public_body.name)) %> + +<% if @info_request.prominence == 'hidden' %> +

      + <%= _('This request has prominence \'hidden\'. You can only see it because you are logged + in as a super user.') %> +

      +<% end %> +<% if @info_request.prominence == 'requester_only' %> +

      + <%= raw(_('This request is hidden, so that only you the requester can see it. Please + contact us if you are not sure why.') % [help_requesting_path]) %> +

      +<% end %> + + +<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %> +
      + <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %> +
      +<% end %> + +
      +

      <%=h(@info_request.title)%>

      + + <% if !@info_request.is_external? && @info_request.user.profile_photo %> +

      + +

      + <% end %> + +

      + <% if !@user.nil? && @user.admin_page_links? %> + <%= _('{{user}} ({{user_admin_link}}) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)', + :user => @info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user), + :law_used_full => h(@info_request.law_used_full), + :user_admin_link => user_admin_link_for_request(@info_request, _('external'), _('admin')), + :request_admin_url => request_admin_url(@info_request), + :public_body_link => public_body_link(@info_request.public_body), + :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %> + <% else %> + <%= _('{{user}} made this {{law_used_full}} request',:user=>@info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %> + <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %> + <% end %> +

      + +

      + <% if @info_request.awaiting_description %> + <% if @is_owning_user && !@info_request.is_external? %> + <%= _('Please answer the question above so we know whether the ')%> + <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %> + <% else %> + <%= _('This request has an unknown status.') %> + <% if @old_unclassified %> + <%= _('We\'re waiting for someone to read') %> + <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> + <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %> + <% else %> + <%= _('We\'re waiting for') %> + <%= user_link_for_request(@info_request) %> <%= _('to read') %> + <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> + <%= _('and update the status.') %> + <% end %> + <% end %> + <% elsif @status == 'waiting_response' %> + <%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %> + <% if @info_request.public_body.is_school? %> + <%= _('in term time') %> + <% else %> + <%= _('normally') %> + <% end %> + <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %> + (<%= link_to _("details"), "/help/requesting#quickly_response" %>). + <% elsif @status == 'waiting_response_overdue' %> + <%= _('Response to this request is delayed.') %> + <%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %> + <% if @info_request.public_body.is_school? %> + <%= _('in term time') %> + <% end %> + <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %> + (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>) + <% elsif @status == 'waiting_response_very_overdue' %> + <%= _('Response to this request is long overdue.') %> + <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %> + (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>). + <% if !@info_request.is_external? %> + <%= _('You can complain by') %> + <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. + <% end %> + <% elsif @status == 'not_held' %> + <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %> + <% elsif @status == 'rejected' %> + <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>. + <% elsif @status == 'successful' %> + <%= _('The request was successful.') %> + <% elsif @status == 'partially_successful' %> + <%= _('The request was partially successful.') %> + <% elsif @status == 'waiting_clarification' %> + <% if @is_owning_user && !@info_request.is_external? %> + <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %> + <%= _('Please') %> + <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>. + <% else %> + <%= _('The request is waiting for clarification.') %> + <% if !@info_request.is_external? %> + <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %> + <%= link_to _("sign in"), signin_url(:r => request.fullpath) %> <%= _('to send a follow up message.') %> + <% end %> + <% end %> + <% elsif @status == 'gone_postal' %> + <%= _('The authority would like to / has responded by post to this request.') %> + <% elsif @status == 'internal_review' %> + <%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %> + <% elsif @status == 'error_message' %> + <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %> + <% elsif @status == 'requires_admin' %> + <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %> + <% elsif @status == 'user_withdrawn' %> + <%= _('This request has been withdrawn by the person who made it. + There may be an explanation in the correspondence below.') %> + <% elsif @status == 'attention_requested' %> + <%= _('This request has been reported as needing administrator attention (perhaps because it is vexatious, or a request for personal information)') %> + <% elsif @status == 'vexatious' %> + <%= _('This request has been hidden from the site, because an administrator considers it vexatious') %> + <% elsif @status == 'not_foi' %> + <%= _('This request has been hidden from the site, because an administrator considers it not to be an FOI request') %> + <% else %> + <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %> + <% end %> +

      + + <% for info_request_event in @info_request_events %> + <% if info_request_event.visible %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %> + <% end %> + <% end %> + + <% if @info_request.awaiting_description && ! @info_request.is_external? %> +
      + <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %> +
      + <% end %> + + <%= render :partial => 'after_actions' %> +
      + +<%= render :partial => 'sidebar' %> diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml deleted file mode 100644 index fa75a6529..000000000 --- a/app/views/request/show.rhtml +++ /dev/null @@ -1,149 +0,0 @@ -<% @title = _("{{title}} - a Freedom of Information request to {{public_body}}", - :title => h(@info_request.title), - :public_body => (@info_request.public_body.name)) %> - -<% if @info_request.prominence == 'hidden' %> -

      - <%= _('This request has prominence \'hidden\'. You can only see it because you are logged - in as a super user.') %> -

      -<% end %> -<% if @info_request.prominence == 'requester_only' %> -

      - <%= raw(_('This request is hidden, so that only you the requester can see it. Please - contact us if you are not sure why.') % [help_requesting_path]) %> -

      -<% end %> - - -<% if ( @update_status || @info_request.awaiting_description ) && ! @info_request.is_external? %> -
      - <%= render :partial => 'describe_state', :locals => { :id_suffix => "1" } %> -
      -<% end %> - -
      -

      <%=h(@info_request.title)%>

      - - <% if !@info_request.is_external? && @info_request.user.profile_photo %> -

      - -

      - <% end %> - -

      - <% if !@user.nil? && @user.admin_page_links? %> - <%= _('{{user}} ({{user_admin_link}}) made this {{law_used_full}} request (admin) to {{public_body_link}} (admin)', - :user => @info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user), - :law_used_full => h(@info_request.law_used_full), - :user_admin_link => user_admin_link_for_request(@info_request, _('external'), _('admin')), - :request_admin_url => request_admin_url(@info_request), - :public_body_link => public_body_link(@info_request.public_body), - :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %> - <% else %> - <%= _('{{user}} made this {{law_used_full}} request',:user=>@info_request.is_external? ? (@info_request.user_name || _('An anonymous user')) : user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %> - <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %> - <% end %> -

      - -

      - <% if @info_request.awaiting_description %> - <% if @is_owning_user && !@info_request.is_external? %> - <%= _('Please answer the question above so we know whether the ')%> - <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'recent response contains', 'recent responses contain') %> <%= _('useful information.') %> - <% else %> - <%= _('This request has an unknown status.') %> - <% if @old_unclassified %> - <%= _('We\'re waiting for someone to read') %> - <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> - <%= _('and update the status accordingly. Perhaps you might like to help out by doing that?') %> - <% else %> - <%= _('We\'re waiting for') %> - <%= user_link_for_request(@info_request) %> <%= _('to read') %> - <%= MySociety::Format.fancy_pluralize(@new_responses_count, 'a recent response', 'recent responses') %> - <%= _('and update the status.') %> - <% end %> - <% end %> - <% elsif @status == 'waiting_response' %> - <%= _('Currently waiting for a response from {{public_body_link}}, they must respond promptly and', :public_body_link=> public_body_link(@info_request.public_body)) %> - <% if @info_request.public_body.is_school? %> - <%= _('in term time') %> - <% else %> - <%= _('normally') %> - <% end %> - <%= _('no later than') %> <%= simple_date(@info_request.date_response_required_by) %> - (<%= link_to _("details"), "/help/requesting#quickly_response" %>). - <% elsif @status == 'waiting_response_overdue' %> - <%= _('Response to this request is delayed.') %> - <%= _('By law, {{public_body_link}} should normally have responded promptly and',:public_body_link=>public_body_link(@info_request.public_body)) %> - <% if @info_request.public_body.is_school? %> - <%= _('in term time') %> - <% end %> - <%= _('by') %> <%= simple_date(@info_request.date_response_required_by) %> - (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>) - <% elsif @status == 'waiting_response_very_overdue' %> - <%= _('Response to this request is long overdue.') %> - <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %> - (<%= raw(_('details') % [help_requesting_path + '#quickly_response']) %>). - <% if !@info_request.is_external? %> - <%= _('You can complain by') %> - <%= link_to _("requesting an internal review"), show_response_no_followup_url(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. - <% end %> - <% elsif @status == 'not_held' %> - <%= public_body_link(@info_request.public_body) %> <%= _('did not have the information requested.') %> - <% elsif @status == 'rejected' %> - <%= _('The request was refused by') %> <%= public_body_link(@info_request.public_body) %>. - <% elsif @status == 'successful' %> - <%= _('The request was successful.') %> - <% elsif @status == 'partially_successful' %> - <%= _('The request was partially successful.') %> - <% elsif @status == 'waiting_clarification' %> - <% if @is_owning_user && !@info_request.is_external? %> - <%=h @info_request.public_body.name %> <%= _('is waiting for your clarification.') %> - <%= _('Please') %> - <%= link_to _("send a follow up message"), respond_to_last_url(@info_request) + '#followup' %>. - <% else %> - <%= _('The request is waiting for clarification.') %> - <% if !@info_request.is_external? %> - <%= _('If you are {{user_link}}, please',:user_link=>user_link_for_request(@info_request)) %> - <%= link_to _("sign in"), signin_url(:r => request.fullpath) %> <%= _('to send a follow up message.') %> - <% end %> - <% end %> - <% elsif @status == 'gone_postal' %> - <%= _('The authority would like to / has responded by post to this request.') %> - <% elsif @status == 'internal_review' %> - <%= _('Waiting for an internal review by {{public_body_link}} of their handling of this request.',:public_body_link=>public_body_link(@info_request.public_body)) %> - <% elsif @status == 'error_message' %> - <%= _('There was a delivery error or similar, which needs fixing by the {{site_name}} team.', :site_name=>site_name) %> - <% elsif @status == 'requires_admin' %> - <%= _('This request has had an unusual response, and requires attention from the {{site_name}} team.', :site_name=>site_name) %> - <% elsif @status == 'user_withdrawn' %> - <%= _('This request has been withdrawn by the person who made it. - There may be an explanation in the correspondence below.') %> - <% elsif @status == 'attention_requested' %> - <%= _('This request has been reported as needing administrator attention (perhaps because it is vexatious, or a request for personal information)') %> - <% elsif @status == 'vexatious' %> - <%= _('This request has been hidden from the site, because an administrator considers it vexatious') %> - <% elsif @status == 'not_foi' %> - <%= _('This request has been hidden from the site, because an administrator considers it not to be an FOI request') %> - <% else %> - <%= render :partial => 'general/custom_state_descriptions', :locals => { :status => @status } %> - <% end %> -

      - - <% for info_request_event in @info_request_events %> - <% if info_request_event.visible %> - <%= render :partial => 'correspondence', :locals => { :info_request_event => info_request_event } %> - <% end %> - <% end %> - - <% if @info_request.awaiting_description && ! @info_request.is_external? %> -
      - <%= render :partial => 'describe_state', :locals => { :id_suffix => "2" } %> -
      - <% end %> - - <%= render :partial => 'after_actions' %> -
      - -<%= render :partial => 'sidebar' %> diff --git a/app/views/request/show_response.html.erb b/app/views/request/show_response.html.erb new file mode 100644 index 000000000..ac1f04227 --- /dev/null +++ b/app/views/request/show_response.html.erb @@ -0,0 +1,81 @@ +<% if @incoming_message.nil? %> + <% @title = _("Send follow up to '{{title}}'", :title => h(@info_request.title)) %> +<% elsif @incoming_message.recently_arrived %> + <% @title = _("New response to '{{title}}'", :title => h(@info_request.title)) %> +<% else %> + <% @title = _("Response to '{{title}}'", :title => h(@info_request.title)) %> +<% end %> + +<%= foi_error_messages_for :incoming_message, :outgoing_message %> + +<% if @gone_postal %> +
      +

      <%= _('Which of these is happening?') %>

      + +
      + +
      + <%= _('The authority say that they need a postal + address, not just an email, for it to be a valid FOI request') %> +
      +
      + <%= render :partial => 'help/why_they_should_reply_by_email', :locals => {:help_page_url => help_privacy_path } %> +
      + +
      + <%= _('The authority only has a paper copy of the information.') %> +
      +
      + <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in + (more details).') % [help_privacy_path + '#postal_answer']) %> +
      + +
      + <%= _('You want to give your postal address to the authority in private.') %> +
      +
      + <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%> + <<%=link_to h(@postal_email), "mailto:" + @postal_email%>> + <%= _('containing your postal address, and asking them to reply to this request. + Or you could phone them.') %> + + <%= _('When you receive the paper response, please help + others find out what it says:') %> +
        +
      • <%= _('Add an annotation to your request with choice quotes, or + a summary of the response.') %>
      • +
      • <%= _('If you can, scan in or photograph the response, and send us + a copy to upload.') %>
      • +
      +
      + +
      +
      +<% end %> + +
      + <% if !@incoming_message.nil? %> + <% if @is_owning_user %> + <% if @incoming_message.recently_arrived %> +

      <%= _('New response to your request') %> '<%= request_link @info_request %>'

      + <% else %> +

      <%= _('Response to your request') %> '<%= request_link @info_request %>'

      + <% end %> + <% else %> + <% if @incoming_message.recently_arrived %> +

      <%= _('New response to {{law_used_short}} request',:law_used_short => h(@info_request.law_used_short))%> '<%= request_link @info_request %>'

      + <% else %> +

      Response to <%=h(@info_request.law_used_short)%> request '<%= request_link @info_request %>'

      + <% end %> + <% end %> + + <% if @incoming_message.nil? %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => @info_request.get_last_outgoing_event, :incoming_message => nil } %> + <% else %> + <%= render :partial => 'correspondence', :locals => { :info_request_event => nil, :incoming_message => @incoming_message } %> + <% end %> + <% end %> + + <%= render :partial => 'followup', :locals => { :incoming_message => @incoming_message } %> +
      + diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.rhtml deleted file mode 100644 index ac1f04227..000000000 --- a/app/views/request/show_response.rhtml +++ /dev/null @@ -1,81 +0,0 @@ -<% if @incoming_message.nil? %> - <% @title = _("Send follow up to '{{title}}'", :title => h(@info_request.title)) %> -<% elsif @incoming_message.recently_arrived %> - <% @title = _("New response to '{{title}}'", :title => h(@info_request.title)) %> -<% else %> - <% @title = _("Response to '{{title}}'", :title => h(@info_request.title)) %> -<% end %> - -<%= foi_error_messages_for :incoming_message, :outgoing_message %> - -<% if @gone_postal %> -
      -

      <%= _('Which of these is happening?') %>

      - -
      - -
      - <%= _('The authority say that they need a postal - address, not just an email, for it to be a valid FOI request') %> -
      -
      - <%= render :partial => 'help/why_they_should_reply_by_email', :locals => {:help_page_url => help_privacy_path } %> -
      - -
      - <%= _('The authority only has a paper copy of the information.') %> -
      -
      - <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in - (more details).') % [help_privacy_path + '#postal_answer']) %> -
      - -
      - <%= _('You want to give your postal address to the authority in private.') %> -
      -
      - <%= _('To do that please send a private email to ') %><%=h(@postal_email_name)%> - <<%=link_to h(@postal_email), "mailto:" + @postal_email%>> - <%= _('containing your postal address, and asking them to reply to this request. - Or you could phone them.') %> - - <%= _('When you receive the paper response, please help - others find out what it says:') %> -
        -
      • <%= _('Add an annotation to your request with choice quotes, or - a summary of the response.') %>
      • -
      • <%= _('If you can, scan in or photograph the response, and send us - a copy to upload.') %>
      • -
      -
      - -
      -
      -<% end %> - -
      - <% if !@incoming_message.nil? %> - <% if @is_owning_user %> - <% if @incoming_message.recently_arrived %> -

      <%= _('New response to your request') %> '<%= request_link @info_request %>'

      - <% else %> -

      <%= _('Response to your request') %> '<%= request_link @info_request %>'

      - <% end %> - <% else %> - <% if @incoming_message.recently_arrived %> -

      <%= _('New response to {{law_used_short}} request',:law_used_short => h(@info_request.law_used_short))%> '<%= request_link @info_request %>'

      - <% else %> -

      Response to <%=h(@info_request.law_used_short)%> request '<%= request_link @info_request %>'

      - <% end %> - <% end %> - - <% if @incoming_message.nil? %> - <%= render :partial => 'correspondence', :locals => { :info_request_event => @info_request.get_last_outgoing_event, :incoming_message => nil } %> - <% else %> - <%= render :partial => 'correspondence', :locals => { :info_request_event => nil, :incoming_message => @incoming_message } %> - <% end %> - <% end %> - - <%= render :partial => 'followup', :locals => { :incoming_message => @incoming_message } %> -
      - diff --git a/app/views/request/similar.html.erb b/app/views/request/similar.html.erb new file mode 100644 index 000000000..0d53f6919 --- /dev/null +++ b/app/views/request/similar.html.erb @@ -0,0 +1,23 @@ +<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %> +

      <%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %>

      + + + +<% if @xapian_object.results.empty? %> +

      <%= _('No similar requests found.')%>

      +<% else %> + + <% for result in @xapian_object.results %> + <% if result[:model].class.to_s == 'InfoRequestEvent' %> + <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> + <% else %> +

      <%= _('Unexpected search result type ')%><%=result[:model].class.to_s%>

      + <% end %> + <% end %> +<% end %> + +<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %> diff --git a/app/views/request/similar.rhtml b/app/views/request/similar.rhtml deleted file mode 100644 index 0d53f6919..000000000 --- a/app/views/request/similar.rhtml +++ /dev/null @@ -1,23 +0,0 @@ -<% @title = "Requests similar to '" + h(@info_request.title) + "'" + @page_desc %> -

      <%="Requests similar to '" + request_link(@info_request) + "'" + @page_desc %>

      - - - -<% if @xapian_object.results.empty? %> -

      <%= _('No similar requests found.')%>

      -<% else %> - - <% for result in @xapian_object.results %> - <% if result[:model].class.to_s == 'InfoRequestEvent' %> - <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> - <% else %> -

      <%= _('Unexpected search result type ')%><%=result[:model].class.to_s%>

      - <% end %> - <% end %> -<% end %> - -<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @show_no_more_than) %> diff --git a/app/views/request/simple_correspondence.html.erb b/app/views/request/simple_correspondence.html.erb new file mode 100644 index 000000000..0da9ef172 --- /dev/null +++ b/app/views/request/simple_correspondence.html.erb @@ -0,0 +1,45 @@ +<%= _('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)}") %>. + +<% for info_request_event in @info_request_events %> +<% + incoming_message = nil + if info_request_event.visible + if !info_request_event.nil? && info_request_event.event_type == 'response' + incoming_message = info_request_event.incoming_message + end + + + if not incoming_message.nil? + if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %> +<%= _('From:') %> <%= incoming_message.safe_mail_from %><% end + if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %>, <%= @info_request.public_body.name %><% end %> +<%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> +<%= _('Date:') %> <%= simple_date(incoming_message.sent_at) %> + +<%= incoming_message.get_body_for_quoting %> +<% incoming_message.get_attachments_for_display.each do |a| %> + <%= _('Attachment:') %> <%= a.display_filename %> (<%= a.display_size %>) + <% end %> +<% +elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type) + outgoing_message = info_request_event.outgoing_message + %> +<%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> +<%= _('To:') %> <%= @info_request.public_body.name %> +<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %> +<% + text = outgoing_message.body.strip + outgoing_message.remove_privacy_sensitive_things!(text) %> + +<%= text %> +<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> +<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %> +Sent <% if info_request_event.outgoing_message.message_type == 'initial_request' %> request <% elsif info_request_event.outgoing_message.message_type == 'followup' %> a follow up <% else %> <% raise "unknown message_type" %><% end %> to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>. + +<% elsif info_request_event.event_type == 'comment' + comment = info_request_event.comment +%> +<%= _("{{username}} left an annotation:", :username =>comment.user.name) %> (<%= simple_date(comment.created_at || Time.now) %>) +<%= comment.body.strip %> +<% end %> +-------------------------------<% end %><% end %> diff --git a/app/views/request/simple_correspondence.rhtml b/app/views/request/simple_correspondence.rhtml deleted file mode 100644 index 0da9ef172..000000000 --- a/app/views/request/simple_correspondence.rhtml +++ /dev/null @@ -1,45 +0,0 @@ -<%= _('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)}") %>. - -<% for info_request_event in @info_request_events %> -<% - incoming_message = nil - if info_request_event.visible - if !info_request_event.nil? && info_request_event.event_type == 'response' - incoming_message = info_request_event.incoming_message - end - - - if not incoming_message.nil? - if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %> -<%= _('From:') %> <%= incoming_message.safe_mail_from %><% end - if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %>, <%= @info_request.public_body.name %><% end %> -<%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> -<%= _('Date:') %> <%= simple_date(incoming_message.sent_at) %> - -<%= incoming_message.get_body_for_quoting %> -<% incoming_message.get_attachments_for_display.each do |a| %> - <%= _('Attachment:') %> <%= a.display_filename %> (<%= a.display_size %>) - <% end %> -<% -elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type) - outgoing_message = info_request_event.outgoing_message - %> -<%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> -<%= _('To:') %> <%= @info_request.public_body.name %> -<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %> -<% - text = outgoing_message.body.strip - outgoing_message.remove_privacy_sensitive_things!(text) %> - -<%= text %> -<% elsif [ 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> -<%= _('Date:') %> <%= simple_date(info_request_event.created_at) %> -Sent <% if info_request_event.outgoing_message.message_type == 'initial_request' %> request <% elsif info_request_event.outgoing_message.message_type == 'followup' %> a follow up <% else %> <% raise "unknown message_type" %><% end %> to <%= public_body_link(@info_request.public_body) %> again<% if not info_request_event.same_email_as_previous_send? %>, using a new contact address<% end %>. - -<% elsif info_request_event.event_type == 'comment' - comment = info_request_event.comment -%> -<%= _("{{username}} left an annotation:", :username =>comment.user.name) %> (<%= simple_date(comment.created_at || Time.now) %>) -<%= comment.body.strip %> -<% end %> --------------------------------<% end %><% end %> diff --git a/app/views/request/upload_response.html.erb b/app/views/request/upload_response.html.erb new file mode 100644 index 000000000..158d5d3c4 --- /dev/null +++ b/app/views/request/upload_response.html.erb @@ -0,0 +1,52 @@ +<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user_name) %> + +<% if @info_request.is_external? %> + +

      <%= _('This request was not made via {{site_name}}', :site_name => site_name) %>

      +

      <%= _('Sorry - you cannot respond to this request via {{site_name}}, because this is a copy of the request originally at {{link_to_original_request}}.', :site_name => site_name, :link_to_original_request => link_to(@info_request.external_url, @info_request.external_url)) %>

      + +<% else %> + + <%= foi_error_messages_for :comment %> + +

      <%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %>

      + +

      + <%= raw(_('Your response will appear on the Internet, read why and answers to other questions.') % [help_officers_path]) %> +

      + +

      <%= _('Respond by email')%>

      + +

      <%= _('You should have received a copy of the request by email, and you can respond + by simply replying to that email. For your convenience, here is the address:')%> + <%=h @info_request.incoming_email%>. + <%= _('You may include attachments. If you would like to attach a + file too large for email, use the form below.')%> +

      + + +

      <%= _('Respond using the web')%>

      + +

      <%= raw(_('Enter your response below. You may attach one file (use email, or + contact us if you need more).')% [help_contact_path]) %>

      + + <%= form_tag '', :id => 'upload_response_form', :multipart => true do %> +

      + + <%= text_area_tag :body, "", :rows => 10, :cols => 55 %> +

      + +

      + + <%= file_field_tag :file_1, :size => 35 %> +

      + +

      + <%= hidden_field_tag 'submitted_upload_response', 1 %> + <%= submit_tag _("Upload FOI response") %> + <%= _(' (patience, especially for large files, it may take a while!)')%> +

      + <% end %> +<% end %> + + diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.rhtml deleted file mode 100644 index 158d5d3c4..000000000 --- a/app/views/request/upload_response.rhtml +++ /dev/null @@ -1,52 +0,0 @@ -<% @title = "Respond to the FOI request '" + h(@info_request.title) + "' made by " + h(@info_request.user_name) %> - -<% if @info_request.is_external? %> - -

      <%= _('This request was not made via {{site_name}}', :site_name => site_name) %>

      -

      <%= _('Sorry - you cannot respond to this request via {{site_name}}, because this is a copy of the request originally at {{link_to_original_request}}.', :site_name => site_name, :link_to_original_request => link_to(@info_request.external_url, @info_request.external_url)) %>

      - -<% else %> - - <%= foi_error_messages_for :comment %> - -

      <%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %>

      - -

      - <%= raw(_('Your response will appear on the Internet, read why and answers to other questions.') % [help_officers_path]) %> -

      - -

      <%= _('Respond by email')%>

      - -

      <%= _('You should have received a copy of the request by email, and you can respond - by simply replying to that email. For your convenience, here is the address:')%> - <%=h @info_request.incoming_email%>. - <%= _('You may include attachments. If you would like to attach a - file too large for email, use the form below.')%> -

      - - -

      <%= _('Respond using the web')%>

      - -

      <%= raw(_('Enter your response below. You may attach one file (use email, or - contact us if you need more).')% [help_contact_path]) %>

      - - <%= form_tag '', :id => 'upload_response_form', :multipart => true do %> -

      - - <%= text_area_tag :body, "", :rows => 10, :cols => 55 %> -

      - -

      - - <%= file_field_tag :file_1, :size => 35 %> -

      - -

      - <%= hidden_field_tag 'submitted_upload_response', 1 %> - <%= submit_tag _("Upload FOI response") %> - <%= _(' (patience, especially for large files, it may take a while!)')%> -

      - <% end %> -<% end %> - - diff --git a/app/views/request_game/play.html.erb b/app/views/request_game/play.html.erb new file mode 100644 index 000000000..eedf19ca2 --- /dev/null +++ b/app/views/request_game/play.html.erb @@ -0,0 +1,46 @@ +<% @title = _("Play the request categorisation game!") %> + +
      +

      + <%=@percentage%>% of requests have been categorised +
      <%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total +

      +

      Top recent players

      + + <% c = 0; for classifications in @league_table_28_days %> + + + + + <% end %> +
      <%= c += 1 %>. + <%= user_link(classifications.user) %> <%=pluralize(classifications.cnt, 'request').gsub(" ", " ")%>
      + +

      All time best players

      + + <% c = 0; for classifications in @league_table_all_time %> + + + + + <% end %> +
      <%= c += 1 %>. + <%= user_link(classifications.user) %> <%= pluralize(classifications.cnt, 'request').gsub(" ", " ")%>
      +
      +

      <%= _("Play the request categorisation game!")%>

      +

      <%= _("Some people who've made requests haven't let us know whether they were +successful or not. We need your help – +choose one of these requests, read it, and let everyone know whether or not the +information has been provided. Everyone'll be exceedingly grateful.")%>

      +<% for info_request in @requests %> + <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> +<% end %> +

      +<%= button_to _('I don\'t like these ones — give me some more!'), play_url %> +<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %> +

      +

      <%= _('Thanks for helping - your work will make it easier for everyone to find successful +responses, and maybe even let us make league tables...')%>

      + + + diff --git a/app/views/request_game/play.rhtml b/app/views/request_game/play.rhtml deleted file mode 100644 index eedf19ca2..000000000 --- a/app/views/request_game/play.rhtml +++ /dev/null @@ -1,46 +0,0 @@ -<% @title = _("Play the request categorisation game!") %> - -
      -

      - <%=@percentage%>% of requests have been categorised -
      <%=pluralize(@missing, 'request')%> left to categorise / <%=@total %> total -

      -

      Top recent players

      - - <% c = 0; for classifications in @league_table_28_days %> - - - - - <% end %> -
      <%= c += 1 %>. - <%= user_link(classifications.user) %> <%=pluralize(classifications.cnt, 'request').gsub(" ", " ")%>
      - -

      All time best players

      - - <% c = 0; for classifications in @league_table_all_time %> - - - - - <% end %> -
      <%= c += 1 %>. - <%= user_link(classifications.user) %> <%= pluralize(classifications.cnt, 'request').gsub(" ", " ")%>
      -
      -

      <%= _("Play the request categorisation game!")%>

      -

      <%= _("Some people who've made requests haven't let us know whether they were -successful or not. We need your help – -choose one of these requests, read it, and let everyone know whether or not the -information has been provided. Everyone'll be exceedingly grateful.")%>

      -<% for info_request in @requests %> - <%= render :partial => 'request/request_listing_single', :locals => { :info_request => info_request } %> -<% end %> -

      -<%= button_to _('I don\'t like these ones — give me some more!'), play_url %> -<%= button_to _('I don\'t want to do any more tidying now!'), stop_url %> -

      -

      <%= _('Thanks for helping - your work will make it easier for everyone to find successful -responses, and maybe even let us make league tables...')%>

      - - - diff --git a/app/views/request_mailer/comment_on_alert.html.erb b/app/views/request_mailer/comment_on_alert.html.erb new file mode 100644 index 000000000..691e6f9bb --- /dev/null +++ b/app/views/request_mailer/comment_on_alert.html.erb @@ -0,0 +1,6 @@ +<%= _('{{user_name}} has annotated your {{law_used_short}} +request. Follow this link to see what they wrote.',:user_name=>@comment.user.name,:law_used_short=>@info_request.law_used_short) %> + +<%=@url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/request_mailer/comment_on_alert.rhtml b/app/views/request_mailer/comment_on_alert.rhtml deleted file mode 100644 index 691e6f9bb..000000000 --- a/app/views/request_mailer/comment_on_alert.rhtml +++ /dev/null @@ -1,6 +0,0 @@ -<%= _('{{user_name}} has annotated your {{law_used_short}} -request. Follow this link to see what they wrote.',:user_name=>@comment.user.name,:law_used_short=>@info_request.law_used_short) %> - -<%=@url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/request_mailer/comment_on_alert_plural.html.erb b/app/views/request_mailer/comment_on_alert_plural.html.erb new file mode 100644 index 000000000..a495b8e08 --- /dev/null +++ b/app/views/request_mailer/comment_on_alert_plural.html.erb @@ -0,0 +1,7 @@ +<%= _('There are {{count}} new annotations on your {{info_request}} request. Follow this link to see what they wrote.',:count=>@count,:info_request=>@info_request.law_used_short)%> + +<%=@url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + + diff --git a/app/views/request_mailer/comment_on_alert_plural.rhtml b/app/views/request_mailer/comment_on_alert_plural.rhtml deleted file mode 100644 index a495b8e08..000000000 --- a/app/views/request_mailer/comment_on_alert_plural.rhtml +++ /dev/null @@ -1,7 +0,0 @@ -<%= _('There are {{count}} new annotations on your {{info_request}} request. Follow this link to see what they wrote.',:count=>@count,:info_request=>@info_request.law_used_short)%> - -<%=@url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - - diff --git a/app/views/request_mailer/external_response.html.erb b/app/views/request_mailer/external_response.html.erb new file mode 100644 index 000000000..fab256adf --- /dev/null +++ b/app/views/request_mailer/external_response.html.erb @@ -0,0 +1 @@ +<%= @message_body %> diff --git a/app/views/request_mailer/external_response.rhtml b/app/views/request_mailer/external_response.rhtml deleted file mode 100644 index fab256adf..000000000 --- a/app/views/request_mailer/external_response.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= @message_body %> diff --git a/app/views/request_mailer/fake_response.html.erb b/app/views/request_mailer/fake_response.html.erb new file mode 100644 index 000000000..fab256adf --- /dev/null +++ b/app/views/request_mailer/fake_response.html.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 fab256adf..000000000 --- a/app/views/request_mailer/fake_response.rhtml +++ /dev/null @@ -1 +0,0 @@ -<%= @message_body %> diff --git a/app/views/request_mailer/new_response.html.erb b/app/views/request_mailer/new_response.html.erb new file mode 100644 index 000000000..083f873b4 --- /dev/null +++ b/app/views/request_mailer/new_response.html.erb @@ -0,0 +1,17 @@ +<%= _('You have a new response to the {{law_used_full}} request ',:law_used_full=>@info_request.law_used_full)%> +'<%= @info_request.title %>' <%=_('that you made to')%> +<%= @info_request.public_body.name %>. + +<%= _('To view the response, click on the link below.')%> + +<%=@url%> + +<%= _('When you get there, please update the status to say if the response +contains any useful information.' )%> + +<%= _('Although all responses are automatically published, we depend on +you, the original requester, to evaluate them.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + + diff --git a/app/views/request_mailer/new_response.rhtml b/app/views/request_mailer/new_response.rhtml deleted file mode 100644 index 083f873b4..000000000 --- a/app/views/request_mailer/new_response.rhtml +++ /dev/null @@ -1,17 +0,0 @@ -<%= _('You have a new response to the {{law_used_full}} request ',:law_used_full=>@info_request.law_used_full)%> -'<%= @info_request.title %>' <%=_('that you made to')%> -<%= @info_request.public_body.name %>. - -<%= _('To view the response, click on the link below.')%> - -<%=@url%> - -<%= _('When you get there, please update the status to say if the response -contains any useful information.' )%> - -<%= _('Although all responses are automatically published, we depend on -you, the original requester, to evaluate them.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - - diff --git a/app/views/request_mailer/new_response_reminder_alert.html.erb b/app/views/request_mailer/new_response_reminder_alert.html.erb new file mode 100644 index 000000000..86fc71de7 --- /dev/null +++ b/app/views/request_mailer/new_response_reminder_alert.html.erb @@ -0,0 +1,10 @@ +<%=_('To let everyone know, follow this link and then select the appropriate box.')%> + +<%=@url%> + +<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%> +<%= @info_request.public_body.name %>. + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + + diff --git a/app/views/request_mailer/new_response_reminder_alert.rhtml b/app/views/request_mailer/new_response_reminder_alert.rhtml deleted file mode 100644 index 86fc71de7..000000000 --- a/app/views/request_mailer/new_response_reminder_alert.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -<%=_('To let everyone know, follow this link and then select the appropriate box.')%> - -<%=@url%> - -<%= _('Your request was called {{info_request}}. Letting everyone know whether you got the information will help us keep tabs on',:info_request=>@info_request.title)%> -<%= @info_request.public_body.name %>. - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - - diff --git a/app/views/request_mailer/not_clarified_alert.html.erb b/app/views/request_mailer/not_clarified_alert.html.erb new file mode 100644 index 000000000..2408452b3 --- /dev/null +++ b/app/views/request_mailer/not_clarified_alert.html.erb @@ -0,0 +1,11 @@ +<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.', + :public_body => @info_request.public_body.name, + :law_used => @info_request.law_used_short ) %> +<%= _('To do this, first click on the link below.') %> + +<%=@url%> + +<%= _('You will only get an answer to your request if you follow up +with the clarification.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/request_mailer/not_clarified_alert.rhtml b/app/views/request_mailer/not_clarified_alert.rhtml deleted file mode 100644 index 2408452b3..000000000 --- a/app/views/request_mailer/not_clarified_alert.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= _('{{public_body}} has asked you to explain part of your {{law_used}} request.', - :public_body => @info_request.public_body.name, - :law_used => @info_request.law_used_short ) %> -<%= _('To do this, first click on the link below.') %> - -<%=@url%> - -<%= _('You will only get an answer to your request if you follow up -with the clarification.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/request_mailer/old_unclassified_updated.html.erb b/app/views/request_mailer/old_unclassified_updated.html.erb new file mode 100644 index 000000000..5b8534832 --- /dev/null +++ b/app/views/request_mailer/old_unclassified_updated.html.erb @@ -0,0 +1,9 @@ +<%= _('To help us keep the site tidy, someone else has updated the status of the +{{law_used_full}} request {{title}} that you made to {{public_body}}, to "{{display_status}}" If you disagree with their categorisation, please update the status again yourself to what you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%> + +<%=_('Follow this link to see the request:')%> + +<%= @url %> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.rhtml deleted file mode 100644 index 5b8534832..000000000 --- a/app/views/request_mailer/old_unclassified_updated.rhtml +++ /dev/null @@ -1,9 +0,0 @@ -<%= _('To help us keep the site tidy, someone else has updated the status of the -{{law_used_full}} request {{title}} that you made to {{public_body}}, to "{{display_status}}" If you disagree with their categorisation, please update the status again yourself to what you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%> - -<%=_('Follow this link to see the request:')%> - -<%= @url %> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - diff --git a/app/views/request_mailer/overdue_alert.html.erb b/app/views/request_mailer/overdue_alert.html.erb new file mode 100644 index 000000000..b8a9ba525 --- /dev/null +++ b/app/views/request_mailer/overdue_alert.html.erb @@ -0,0 +1,11 @@ +<%= @info_request.public_body.name %> <%= _('have delayed.')%> + +<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>. + +<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.',:public_body=>@info_request.public_body.name)%> + +<%=@url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + + diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml deleted file mode 100644 index b8a9ba525..000000000 --- a/app/views/request_mailer/overdue_alert.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= @info_request.public_body.name %> <%= _('have delayed.')%> - -<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>. - -<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.',:public_body=>@info_request.public_body.name)%> - -<%=@url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - - diff --git a/app/views/request_mailer/requires_admin.html.erb b/app/views/request_mailer/requires_admin.html.erb new file mode 100644 index 000000000..06a798792 --- /dev/null +++ b/app/views/request_mailer/requires_admin.html.erb @@ -0,0 +1,11 @@ +--------------------------------------------------------------------- +<%=@reported_by.name%> <%= _('has reported an')%> <%=@info_request.law_used_short%> +<%= _('response as needing administrator attention. Take a look, and reply to this +email to let them know what you are going to do about it.')%> + +Request '<%=@info_request.title%>': +<%= @url %> + +<%= _('Administration URL:') %> +<%= @admin_url %> +--------------------------------------------------------------------- diff --git a/app/views/request_mailer/requires_admin.rhtml b/app/views/request_mailer/requires_admin.rhtml deleted file mode 100644 index 06a798792..000000000 --- a/app/views/request_mailer/requires_admin.rhtml +++ /dev/null @@ -1,11 +0,0 @@ ---------------------------------------------------------------------- -<%=@reported_by.name%> <%= _('has reported an')%> <%=@info_request.law_used_short%> -<%= _('response as needing administrator attention. Take a look, and reply to this -email to let them know what you are going to do about it.')%> - -Request '<%=@info_request.title%>': -<%= @url %> - -<%= _('Administration URL:') %> -<%= @admin_url %> ---------------------------------------------------------------------- diff --git a/app/views/request_mailer/stopped_responses.html.erb b/app/views/request_mailer/stopped_responses.html.erb new file mode 100644 index 000000000..9cd156860 --- /dev/null +++ b/app/views/request_mailer/stopped_responses.html.erb @@ -0,0 +1,20 @@ +<%= _('The email that you, on behalf of {{public_body}}, sent to +{{user}} to reply to an {{law_used_short}} +request has not been delivered.',:public_body=>@info_request.public_body.name,:user=>@info_request.user.name,:law_used_short=>@info_request.law_used_short)%> + +<%= _('This is because {{title}} is an old request that has been +marked to no longer receive responses.',:title=>@info_request.title)%> + + + +<%= _('If this is incorrect, or you would like to send a late response to the request +or an email on another subject to {{user}}, then please +email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email=>@contact_email)%> + +<%= _('Your original message is attached.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> + + + + diff --git a/app/views/request_mailer/stopped_responses.rhtml b/app/views/request_mailer/stopped_responses.rhtml deleted file mode 100644 index 9cd156860..000000000 --- a/app/views/request_mailer/stopped_responses.rhtml +++ /dev/null @@ -1,20 +0,0 @@ -<%= _('The email that you, on behalf of {{public_body}}, sent to -{{user}} to reply to an {{law_used_short}} -request has not been delivered.',:public_body=>@info_request.public_body.name,:user=>@info_request.user.name,:law_used_short=>@info_request.law_used_short)%> - -<%= _('This is because {{title}} is an old request that has been -marked to no longer receive responses.',:title=>@info_request.title)%> - - - -<%= _('If this is incorrect, or you would like to send a late response to the request -or an email on another subject to {{user}}, then please -email {{contact_email}} for help.',:user=>@info_request.user.name,:contact_email=>@contact_email)%> - -<%= _('Your original message is attached.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> - - - - diff --git a/app/views/request_mailer/very_overdue_alert.html.erb b/app/views/request_mailer/very_overdue_alert.html.erb new file mode 100644 index 000000000..6abd198a0 --- /dev/null +++ b/app/views/request_mailer/very_overdue_alert.html.erb @@ -0,0 +1,11 @@ +<%= @info_request.public_body.name %> <%= _('are long overdue.')%> + +<%= _('They have not replied to your {{law_used_short}} request {{title}}, +as required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%= _('even during holidays')%><% end %>. + +<%= _('Click on the link below to send a message to {{public_body_name}} telling them to reply to your request. You might like to ask for an internal +review, asking them to find out why response to the request has been so slow.',:public_body_name=>@info_request.public_body.name)%> + +<%=@url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/request_mailer/very_overdue_alert.rhtml b/app/views/request_mailer/very_overdue_alert.rhtml deleted file mode 100644 index 6abd198a0..000000000 --- a/app/views/request_mailer/very_overdue_alert.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= @info_request.public_body.name %> <%= _('are long overdue.')%> - -<%= _('They have not replied to your {{law_used_short}} request {{title}}, -as required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%= _('even during holidays')%><% end %>. - -<%= _('Click on the link below to send a message to {{public_body_name}} telling them to reply to your request. You might like to ask for an internal -review, asking them to find out why response to the request has been so slow.',:public_body_name=>@info_request.public_body.name)%> - -<%=@url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/track/_tracking_links.html.erb b/app/views/track/_tracking_links.html.erb new file mode 100644 index 000000000..ee18ec475 --- /dev/null +++ b/app/views/track/_tracking_links.html.erb @@ -0,0 +1,30 @@ +<% + if @user + existing_track = TrackThing.find_by_existing_track(@user, track_thing) + end +%> + +<% if own_request %> +

      <%= _('This is your own request, so you will be automatically emailed when new responses arrive.')%>

      +<% elsif existing_track %> +

      <%= track_thing.params[:verb_on_page_already] %>

      + +<% elsif track_thing %> + + + +<% end %> + + + diff --git a/app/views/track/_tracking_links.rhtml b/app/views/track/_tracking_links.rhtml deleted file mode 100644 index ee18ec475..000000000 --- a/app/views/track/_tracking_links.rhtml +++ /dev/null @@ -1,30 +0,0 @@ -<% - if @user - existing_track = TrackThing.find_by_existing_track(@user, track_thing) - end -%> - -<% if own_request %> -

      <%= _('This is your own request, so you will be automatically emailed when new responses arrive.')%>

      -<% elsif existing_track %> -

      <%= track_thing.params[:verb_on_page_already] %>

      - -<% elsif track_thing %> - - - -<% end %> - - - diff --git a/app/views/track_mailer/event_digest.html.erb b/app/views/track_mailer/event_digest.html.erb new file mode 100644 index 000000000..dc8132b99 --- /dev/null +++ b/app/views/track_mailer/event_digest.html.erb @@ -0,0 +1,66 @@ +<% + # Construct the main text of the mail + main_text = '' + for track_thing, alert_results, xapian_object in @email_about_things + main_text += track_thing.params[:title_in_email] + "\n" + main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n" + @highlight_words = xapian_object.words_to_highlight + for result in alert_results.reverse + if result[:model].class.to_s == "InfoRequestEvent" + event = result[:model] + + # Request title - only add title if we're not tracking a request. + # e.g. -- Address and opening times of Post Office branches -- + if track_thing.info_request.nil? + main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n" + end + + # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008) + if event.event_type == 'response' + url = main_url(incoming_message_url(event.incoming_message)) + main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name) + elsif event.event_type == 'followup_sent' + url = main_url(outgoing_message_url(event.outgoing_message)) + main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) + elsif event.event_type == 'sent' + # this is unlikely to happen in real life, but happens in the test code + url = main_url(outgoing_message_url(event.outgoing_message)) + main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) + elsif event.event_type == 'comment' + url = main_url(comment_url(event.comment)) + main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user.name) + else + raise "unknown type in event_digest " + event.event_type + end + main_text += " (" + simple_date(event.created_at) + ")\n" + + # Main text, wrapped, words highlighted with * and indented. + if event.is_outgoing_message? + extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false) + elsif event.is_incoming_message? + extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false) + elsif event.is_comment? + extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false) + else + extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false) + end + extract = extract.gsub(/\s+/, ' ') + main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n" + + # Link to the request/response + main_text += url + "\n" + main_text += "\n" + else + raise "need to add other types to TrackMailer.event_digest" + end + end + main_text += "\n" + end + +%><%=raw main_text%><%= _("Alter your subscription")%> +======================= + +<% _("Please click on the link below to cancel or alter these emails.") %> +<%=@unsubscribe_url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml deleted file mode 100644 index dc8132b99..000000000 --- a/app/views/track_mailer/event_digest.rhtml +++ /dev/null @@ -1,66 +0,0 @@ -<% - # Construct the main text of the mail - main_text = '' - for track_thing, alert_results, xapian_object in @email_about_things - main_text += track_thing.params[:title_in_email] + "\n" - main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n" - @highlight_words = xapian_object.words_to_highlight - for result in alert_results.reverse - if result[:model].class.to_s == "InfoRequestEvent" - event = result[:model] - - # Request title - only add title if we're not tracking a request. - # e.g. -- Address and opening times of Post Office branches -- - if track_thing.info_request.nil? - main_text += "-- " + highlight_words(event.info_request.title, @highlight_words, false) + " --\n" - end - - # e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008) - if event.event_type == 'response' - url = main_url(incoming_message_url(event.incoming_message)) - main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name) - elsif event.event_type == 'followup_sent' - url = main_url(outgoing_message_url(event.outgoing_message)) - main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) - elsif event.event_type == 'sent' - # this is unlikely to happen in real life, but happens in the test code - url = main_url(outgoing_message_url(event.outgoing_message)) - main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name) - elsif event.event_type == 'comment' - url = main_url(comment_url(event.comment)) - main_text += _("{{user_name}} added an annotation", :user_name => event.comment.user.name) - else - raise "unknown type in event_digest " + event.event_type - end - main_text += " (" + simple_date(event.created_at) + ")\n" - - # Main text, wrapped, words highlighted with * and indented. - if event.is_outgoing_message? - extract = highlight_and_excerpt(event.outgoing_message.get_text_for_indexing, @highlight_words, 150, false) - elsif event.is_incoming_message? - extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing_clipped, @highlight_words, 150, false) - elsif event.is_comment? - extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false) - else - extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false) - end - extract = extract.gsub(/\s+/, ' ') - main_text += MySociety::Format.wrap_email_body_by_lines('"' + extract + '"').gsub(/\n+$/, "") + "\n" - - # Link to the request/response - main_text += url + "\n" - main_text += "\n" - else - raise "need to add other types to TrackMailer.event_digest" - end - end - main_text += "\n" - end - -%><%=raw main_text%><%= _("Alter your subscription")%> -======================= - -<% _("Please click on the link below to cancel or alter these emails.") %> -<%=@unsubscribe_url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user/_change_receive_email.html.erb b/app/views/user/_change_receive_email.html.erb new file mode 100644 index 000000000..12824f711 --- /dev/null +++ b/app/views/user/_change_receive_email.html.erb @@ -0,0 +1,16 @@ +<%= form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> +
      + <% if @user.receive_email_alerts %> + <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>

      + <%= hidden_field_tag 'receive_email_alerts', 'false' %> + <%= hidden_field_tag 'came_from', request.url %> + <%= submit_tag _("Turn off email alerts") %> + <% else %> + <%= _('Items matching the following conditions are currently displayed on your wall.') %>

      + <%= hidden_field_tag 'receive_email_alerts', 'true' %> + <%= hidden_field_tag 'came_from', request.url %> + <%= submit_tag _("Also send me alerts by email") %> + <% end %> +
      +<% end %> + diff --git a/app/views/user/_change_receive_email.rhtml b/app/views/user/_change_receive_email.rhtml deleted file mode 100644 index 12824f711..000000000 --- a/app/views/user/_change_receive_email.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<%= form_tag(:controller=>"user", :action=>"set_receive_email_alerts") do %> -
      - <% if @user.receive_email_alerts %> - <%= _('You are currently receiving notification of new activity on your wall by email.', :wall_url => show_user_wall_path) %>

      - <%= hidden_field_tag 'receive_email_alerts', 'false' %> - <%= hidden_field_tag 'came_from', request.url %> - <%= submit_tag _("Turn off email alerts") %> - <% else %> - <%= _('Items matching the following conditions are currently displayed on your wall.') %>

      - <%= hidden_field_tag 'receive_email_alerts', 'true' %> - <%= hidden_field_tag 'came_from', request.url %> - <%= submit_tag _("Also send me alerts by email") %> - <% end %> -
      -<% end %> - diff --git a/app/views/user/_show_user_info.html.erb b/app/views/user/_show_user_info.html.erb new file mode 100644 index 000000000..3c229e9ce --- /dev/null +++ b/app/views/user/_show_user_info.html.erb @@ -0,0 +1,20 @@ + + <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %> +
      + + <%= @display_user.get_about_me_for_html_display %> + <% if @is_you %> + (<%= link_to _("edit text about you"), set_profile_about_me_url() %>) + <% end %> +
      + <% end %> + + <% if @is_you %> +

      + <% if @display_user.profile_photo %> + <%= link_to _('Change profile photo'), set_profile_photo_url() %> | + <% end %> + <%= link_to _('Change your password'), signchangepassword_url() %> | + <%= link_to _('Change your email'), signchangeemail_url() %> +

      + <% end %> diff --git a/app/views/user/_show_user_info.rhtml b/app/views/user/_show_user_info.rhtml deleted file mode 100644 index 3c229e9ce..000000000 --- a/app/views/user/_show_user_info.rhtml +++ /dev/null @@ -1,20 +0,0 @@ - - <% if !@display_user.get_about_me_for_html_display.empty? || @is_you %> -
      - - <%= @display_user.get_about_me_for_html_display %> - <% if @is_you %> - (<%= link_to _("edit text about you"), set_profile_about_me_url() %>) - <% end %> -
      - <% end %> - - <% if @is_you %> -

      - <% if @display_user.profile_photo %> - <%= link_to _('Change profile photo'), set_profile_photo_url() %> | - <% end %> - <%= link_to _('Change your password'), signchangepassword_url() %> | - <%= link_to _('Change your email'), signchangeemail_url() %> -

      - <% end %> diff --git a/app/views/user/_signin.html.erb b/app/views/user/_signin.html.erb new file mode 100644 index 000000000..d7a9c03f0 --- /dev/null +++ b/app/views/user/_signin.html.erb @@ -0,0 +1,36 @@ +
      + +<%= form_tag({:action => "signin"}, {:id => "signin_form"}) do %> + <%= foi_error_messages_for :user_signin %> + + + +

      + + <%= text_field 'user_signin', 'email', { :size => 20, :tabindex => 10 } %> +

      + +

      + + <%= password_field 'user_signin', 'password', { :size => 15, :tabindex => 20 } %> +

      + +

      + <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]), :tabindex => 30 %> +

      + +

      + <%= check_box_tag 'remember_me', "1", false, :tabindex => 40 %> + (keeps you signed in longer; + do not use on a public computer) ')%>

      + +
      + <%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %> + <%= hidden_field_tag :modal, params[:modal], {:id => 'signin_modal' } %> + <%= submit_tag _('Sign in'), :tabindex => 50 %> +
      +<% end %> + +
      diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml deleted file mode 100644 index d7a9c03f0..000000000 --- a/app/views/user/_signin.rhtml +++ /dev/null @@ -1,36 +0,0 @@ -
      - -<%= form_tag({:action => "signin"}, {:id => "signin_form"}) do %> - <%= foi_error_messages_for :user_signin %> - - - -

      - - <%= text_field 'user_signin', 'email', { :size => 20, :tabindex => 10 } %> -

      - -

      - - <%= password_field 'user_signin', 'password', { :size => 15, :tabindex => 20 } %> -

      - -

      - <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]), :tabindex => 30 %> -

      - -

      - <%= check_box_tag 'remember_me', "1", false, :tabindex => 40 %> - (keeps you signed in longer; - do not use on a public computer) ')%>

      - -
      - <%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %> - <%= hidden_field_tag :modal, params[:modal], {:id => 'signin_modal' } %> - <%= submit_tag _('Sign in'), :tabindex => 50 %> -
      -<% end %> - -
      diff --git a/app/views/user/_signup.html.erb b/app/views/user/_signup.html.erb new file mode 100644 index 000000000..315ae6838 --- /dev/null +++ b/app/views/user/_signup.html.erb @@ -0,0 +1,51 @@ +
      + +<%= form_tag({:action => "signup"}, {:id => "signup_form"}) do %> + <%= foi_error_messages_for :user_signup %> + + + +

      + + <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %> +

      +
      + <%= raw(_('We will not reveal your email address to anybody unless you or + the law tell us to (details). ') %[help_privacy_path]) %> +
      + +

      + + <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70 } %> +

      +
      + <%= raw(_('Your name will appear publicly + (why?) + on this website and in search engines. If you + are thinking of using a pseudonym, please + read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"]) %> +
      + +

      + + <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80 } %> +

      + +

      + + <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90 } %> +

      + + <% if @request_from_foreign_country %> + <%= recaptcha_tags %> + <% end %> + +
      + <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %> + <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %> + <%= submit_tag _('Sign up'), :tabindex => 100 %> +
      + +<% end %> + +
      diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml deleted file mode 100644 index 315ae6838..000000000 --- a/app/views/user/_signup.rhtml +++ /dev/null @@ -1,51 +0,0 @@ -
      - -<%= form_tag({:action => "signup"}, {:id => "signup_form"}) do %> - <%= foi_error_messages_for :user_signup %> - - - -

      - - <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %> -

      -
      - <%= raw(_('We will not reveal your email address to anybody unless you or - the law tell us to (details). ') %[help_privacy_path]) %> -
      - -

      - - <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70 } %> -

      -
      - <%= raw(_('Your name will appear publicly - (why?) - on this website and in search engines. If you - are thinking of using a pseudonym, please - read this first.') % [help_privacy_path+"#public_request", help_privacy_path+"#real_name"]) %> -
      - -

      - - <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80 } %> -

      - -

      - - <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90 } %> -

      - - <% if @request_from_foreign_country %> - <%= recaptcha_tags %> - <% end %> - -
      - <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %> - <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %> - <%= submit_tag _('Sign up'), :tabindex => 100 %> -
      - -<% end %> - -
      diff --git a/app/views/user/_user_listing_single.html.erb b/app/views/user/_user_listing_single.html.erb new file mode 100644 index 000000000..53df3a7e8 --- /dev/null +++ b/app/views/user/_user_listing_single.html.erb @@ -0,0 +1,24 @@ +<% if @highlight_words.nil? + @highlight_words = [] +end %> + +
      + <% if display_user.profile_photo %> + + <% end %> + + + <%= link_to highlight_words(display_user.name, @highlight_words), user_url(display_user) %> + + + + <%= pluralize(display_user.info_requests.size, "request") %> <%= _('made.')%> + <%= pluralize(display_user.visible_comments.size, "annotation") %> <%= _('made.')%> + <%= _('Joined in')%> <%= year_from_date(display_user.created_at) %>. + + +
      diff --git a/app/views/user/_user_listing_single.rhtml b/app/views/user/_user_listing_single.rhtml deleted file mode 100644 index 53df3a7e8..000000000 --- a/app/views/user/_user_listing_single.rhtml +++ /dev/null @@ -1,24 +0,0 @@ -<% if @highlight_words.nil? - @highlight_words = [] -end %> - -
      - <% if display_user.profile_photo %> - - <% end %> - - - <%= link_to highlight_words(display_user.name, @highlight_words), user_url(display_user) %> - - - - <%= pluralize(display_user.info_requests.size, "request") %> <%= _('made.')%> - <%= pluralize(display_user.visible_comments.size, "annotation") %> <%= _('made.')%> - <%= _('Joined in')%> <%= year_from_date(display_user.created_at) %>. - - -
      diff --git a/app/views/user/bad_token.html.erb b/app/views/user/bad_token.html.erb new file mode 100644 index 000000000..538bc5606 --- /dev/null +++ b/app/views/user/bad_token.html.erb @@ -0,0 +1,17 @@ +

      +<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied +correctly from your email.')%> +

      + +

      +<%= _('If you can\'t click on it in the email, you\'ll have to select and copy +it from the email. Then paste it into your browser, into the place +you would type the address of any other webpage.')%> +

      + +

      +<%= _('If you got the email more than six months ago, then this login link won\'t work any +more. Please try doing what you were doing from the beginning.')%> +

      + + diff --git a/app/views/user/bad_token.rhtml b/app/views/user/bad_token.rhtml deleted file mode 100644 index 538bc5606..000000000 --- a/app/views/user/bad_token.rhtml +++ /dev/null @@ -1,17 +0,0 @@ -

      -<%= _('Please check the URL (i.e. the long code of letters and numbers) is copied -correctly from your email.')%> -

      - -

      -<%= _('If you can\'t click on it in the email, you\'ll have to select and copy -it from the email. Then paste it into your browser, into the place -you would type the address of any other webpage.')%> -

      - -

      -<%= _('If you got the email more than six months ago, then this login link won\'t work any -more. Please try doing what you were doing from the beginning.')%> -

      - - diff --git a/app/views/user/banned.html.erb b/app/views/user/banned.html.erb new file mode 100644 index 000000000..475c10977 --- /dev/null +++ b/app/views/user/banned.html.erb @@ -0,0 +1,19 @@ +<% @title = "Banned from this site" %> + +

      <%=@title%>

      + +

      +<%=@details%> +

      + +

      <%= _('You will be unable to make new requests, send follow ups, add annotations or +send messages to other users. You may continue to view other requests, and set +up +email alerts.')%>

      + +

      +<%= _('If you would like us to lift this ban, then you may politely +contact us giving reasons. +')%>

      + + diff --git a/app/views/user/banned.rhtml b/app/views/user/banned.rhtml deleted file mode 100644 index 475c10977..000000000 --- a/app/views/user/banned.rhtml +++ /dev/null @@ -1,19 +0,0 @@ -<% @title = "Banned from this site" %> - -

      <%=@title%>

      - -

      -<%=@details%> -

      - -

      <%= _('You will be unable to make new requests, send follow ups, add annotations or -send messages to other users. You may continue to view other requests, and set -up -email alerts.')%>

      - -

      -<%= _('If you would like us to lift this ban, then you may politely -contact us giving reasons. -')%>

      - - diff --git a/app/views/user/confirm.html.erb b/app/views/user/confirm.html.erb new file mode 100644 index 000000000..bc70a1f36 --- /dev/null +++ b/app/views/user/confirm.html.erb @@ -0,0 +1,14 @@ +<% @title = _("Now check your email!") %> + +

      <%= _("Now check your email!") %>

      + +

      +<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can +continue.') %> +

      + +

      +<%= _('If you use web-based email or have "junk mail" filters, also check your +bulk/spam mail folders. Sometimes, our messages are marked that way. +

      ') %> + diff --git a/app/views/user/confirm.rhtml b/app/views/user/confirm.rhtml deleted file mode 100644 index bc70a1f36..000000000 --- a/app/views/user/confirm.rhtml +++ /dev/null @@ -1,14 +0,0 @@ -<% @title = _("Now check your email!") %> - -

      <%= _("Now check your email!") %>

      - -

      -<%= _('We\'ve sent you an email, and you\'ll need to click the link in it before you can -continue.') %> -

      - -

      -<%= _('If you use web-based email or have "junk mail" filters, also check your -bulk/spam mail folders. Sometimes, our messages are marked that way. -

      ') %> - diff --git a/app/views/user/contact.html.erb b/app/views/user/contact.html.erb new file mode 100644 index 000000000..6d23dd1ed --- /dev/null +++ b/app/views/user/contact.html.erb @@ -0,0 +1,45 @@ +<% @title = "Contact " + h(@recipient_user.name) %> + +<% if not @user %> + <% raise "You need to be logged in" %> +<% end %> + +<%= foi_error_messages_for :contact %> + +<%= form_for :contact do |f| %> + +
      +

      <%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %>

      +
      + +

      + + <%= h(@user.name_and_email) %> +

      + +

      + + <%= f.text_field :subject, :size => 50 %> +

      + +

      + + <%= f.text_area :message, :rows => 10, :cols => 50 %> +

      + +

      + <% if @user == @recipient_user %> + <%= _('Note: You\'re sending a message to yourself, presumably + to try out how it works.')%> + <% else %> + <%= _(' Privacy note: Your email address will be given to')%> + <%= user_link(@recipient_user) %><%= _(' when you send this message.')%> + <% end %> +

      + +
      + <%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %> + <%= submit_tag _("Send message") %> +
      + +<% end %> diff --git a/app/views/user/contact.rhtml b/app/views/user/contact.rhtml deleted file mode 100644 index 6d23dd1ed..000000000 --- a/app/views/user/contact.rhtml +++ /dev/null @@ -1,45 +0,0 @@ -<% @title = "Contact " + h(@recipient_user.name) %> - -<% if not @user %> - <% raise "You need to be logged in" %> -<% end %> - -<%= foi_error_messages_for :contact %> - -<%= form_for :contact do |f| %> - -
      -

      <%= _("Contact {{recipient}}", :recipient => h(@recipient_user.name)) %>

      -
      - -

      - - <%= h(@user.name_and_email) %> -

      - -

      - - <%= f.text_field :subject, :size => 50 %> -

      - -

      - - <%= f.text_area :message, :rows => 10, :cols => 50 %> -

      - -

      - <% if @user == @recipient_user %> - <%= _('Note: You\'re sending a message to yourself, presumably - to try out how it works.')%> - <% else %> - <%= _(' Privacy note: Your email address will be given to')%> - <%= user_link(@recipient_user) %><%= _(' when you send this message.')%> - <% end %> -

      - -
      - <%= hidden_field_tag(:submitted_contact_form, { :value => 1 } ) %> - <%= submit_tag _("Send message") %> -
      - -<% end %> diff --git a/app/views/user/no_cookies.html.erb b/app/views/user/no_cookies.html.erb new file mode 100644 index 000000000..c291367f2 --- /dev/null +++ b/app/views/user/no_cookies.html.erb @@ -0,0 +1,22 @@ +<% @title = "Cookies not enabled" %> + +

      <%= _('Please enable "cookies" to carry on')%>

      + +

      <%= _('To carry on, you need to sign in or make an account. Unfortunately, there +was a technical problem trying to do this.')%>

      + +

      <%= _('It may be that your browser is not set to accept a thing called "cookies", +or cannot do so. If you can, please enable cookies, or try using a different +browser. Then press refresh to have another go.')%>

      + +

      <%= _('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 get in touch with us so we can fix it.') % [help_contact_path]) %> + + <%= _('Let us know what you were doing when this message +appeared and your browser and operating system type and version.')%>

      + +

      <%= raw(_('If you are still having trouble, please contact us.') % [help_contact_path]) %> +

      + diff --git a/app/views/user/no_cookies.rhtml b/app/views/user/no_cookies.rhtml deleted file mode 100644 index c291367f2..000000000 --- a/app/views/user/no_cookies.rhtml +++ /dev/null @@ -1,22 +0,0 @@ -<% @title = "Cookies not enabled" %> - -

      <%= _('Please enable "cookies" to carry on')%>

      - -

      <%= _('To carry on, you need to sign in or make an account. Unfortunately, there -was a technical problem trying to do this.')%>

      - -

      <%= _('It may be that your browser is not set to accept a thing called "cookies", -or cannot do so. If you can, please enable cookies, or try using a different -browser. Then press refresh to have another go.')%>

      - -

      <%= _('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 get in touch with us so we can fix it.') % [help_contact_path]) %> - - <%= _('Let us know what you were doing when this message -appeared and your browser and operating system type and version.')%>

      - -

      <%= raw(_('If you are still having trouble, please contact us.') % [help_contact_path]) %> -

      - diff --git a/app/views/user/rate_limited.html.erb b/app/views/user/rate_limited.html.erb new file mode 100644 index 000000000..d52deebab --- /dev/null +++ b/app/views/user/rate_limited.html.erb @@ -0,0 +1,15 @@ +<% @title = _("Too many requests") %> + +

      <%=@title%>

      + +

      <%= _("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))%>

      + +

      <%= _("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 get in touch.", :help_contact_path => help_contact_path) %>

      + +<% if @info_request %> +

      <%= _("Here is the message you wrote, in case you would like to copy the text and save it for later.") %>

      + +
      +
      <%= @info_request.outgoing_messages[0].get_body_for_html_display %>
      +
      +<% end %> diff --git a/app/views/user/rate_limited.rhtml b/app/views/user/rate_limited.rhtml deleted file mode 100644 index d52deebab..000000000 --- a/app/views/user/rate_limited.rhtml +++ /dev/null @@ -1,15 +0,0 @@ -<% @title = _("Too many requests") %> - -

      <%=@title%>

      - -

      <%= _("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))%>

      - -

      <%= _("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 get in touch.", :help_contact_path => help_contact_path) %>

      - -<% if @info_request %> -

      <%= _("Here is the message you wrote, in case you would like to copy the text and save it for later.") %>

      - -
      -
      <%= @info_request.outgoing_messages[0].get_body_for_html_display %>
      -
      -<% end %> diff --git a/app/views/user/river.html.erb b/app/views/user/river.html.erb new file mode 100644 index 000000000..9618e0aa8 --- /dev/null +++ b/app/views/user/river.html.erb @@ -0,0 +1,12 @@ +<% @title = 'Recent Events' %> + +
      +

      <%=@title%>

      + + <% for result in @results %> + <%= render :partial => 'request/request_listing_via_event', :locals => { + :event => result[:model], :info_request => result[:model].info_request } %> + <% end %> + +
      + diff --git a/app/views/user/river.rhtml b/app/views/user/river.rhtml deleted file mode 100644 index 9618e0aa8..000000000 --- a/app/views/user/river.rhtml +++ /dev/null @@ -1,12 +0,0 @@ -<% @title = 'Recent Events' %> - -
      -

      <%=@title%>

      - - <% for result in @results %> - <%= render :partial => 'request/request_listing_via_event', :locals => { - :event => result[:model], :info_request => result[:model].info_request } %> - <% end %> - -
      - diff --git a/app/views/user/set_crop_profile_photo.html.erb b/app/views/user/set_crop_profile_photo.html.erb new file mode 100644 index 000000000..fea7ccab8 --- /dev/null +++ b/app/views/user/set_crop_profile_photo.html.erb @@ -0,0 +1,46 @@ +<% @title = _("Change profile photo") %> +<% @profile_photo_javascript = true %> + +<% raise "internal error" if not @user %> + +

      <%= _('Crop your profile photo') %>

      + +<%= foi_error_messages_for :set_profile_photo %> + +
      + +<%= form_tag 'set_photo', :id => 'set_crop_profile_photo_form', :multipart => true do %> + + + + + + +
      + + +
      + +
      + +
      + + + + + + + <%= hidden_field_tag 'draft_profile_photo_id', @draft_profile_photo.id %> + +

      <%= _('Privacy note: Your photo will be shown in public on the Internet, + wherever you do something on {{site_name}}.', :site_name=>site_name)%> + +

      + <%= hidden_field_tag 'submitted_crop_profile_photo', 1 %> + <%= submit_tag _("Done") + " >>" %> +

      + +<% end %> + + +
      diff --git a/app/views/user/set_crop_profile_photo.rhtml b/app/views/user/set_crop_profile_photo.rhtml deleted file mode 100644 index fea7ccab8..000000000 --- a/app/views/user/set_crop_profile_photo.rhtml +++ /dev/null @@ -1,46 +0,0 @@ -<% @title = _("Change profile photo") %> -<% @profile_photo_javascript = true %> - -<% raise "internal error" if not @user %> - -

      <%= _('Crop your profile photo') %>

      - -<%= foi_error_messages_for :set_profile_photo %> - -
      - -<%= form_tag 'set_photo', :id => 'set_crop_profile_photo_form', :multipart => true do %> - - - - - - -
      - - -
      - -
      - -
      - - - - - - - <%= hidden_field_tag 'draft_profile_photo_id', @draft_profile_photo.id %> - -

      <%= _('Privacy note: Your photo will be shown in public on the Internet, - wherever you do something on {{site_name}}.', :site_name=>site_name)%> - -

      - <%= hidden_field_tag 'submitted_crop_profile_photo', 1 %> - <%= submit_tag _("Done") + " >>" %> -

      - -<% end %> - - -
      diff --git a/app/views/user/set_draft_profile_photo.html.erb b/app/views/user/set_draft_profile_photo.html.erb new file mode 100644 index 000000000..a44c78f57 --- /dev/null +++ b/app/views/user/set_draft_profile_photo.html.erb @@ -0,0 +1,58 @@ +<% @title = "Change profile photo" %> + +<% raise "internal error" if not @user %> + +

      <%= _("Choose your profile photo") %>

      + +<%= foi_error_messages_for :draft_profile_photo %> + +
      + +<%= form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> +

      + + <%= file_field_tag :file, :size => 35, :id => 'file_1' %> +

      + +
        +
      • <%= _('Your photo will be shown in public on the Internet, + wherever you do something on {{site_name}}.', :site_name=>site_name)%> +
      • + +
      • <%= _('Please don\'t upload offensive pictures. We will take down images + that we consider inappropriate.')%> +
      • +
      + + +

      + <%= hidden_field_tag 'submitted_draft_profile_photo', 1 %> + + +

      + + +<% end %> + +<% if @user.profile_photo %> + +

      <%= _('OR remove the existing photo')%>

      + + <%= form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> + <%= submit_tag _("Clear photo") %> + <% end %> + +<% end %> + +

      + <%= link_to _("Cancel, return to your profile page"), user_url(@user) %> +

      + +
      diff --git a/app/views/user/set_draft_profile_photo.rhtml b/app/views/user/set_draft_profile_photo.rhtml deleted file mode 100644 index a44c78f57..000000000 --- a/app/views/user/set_draft_profile_photo.rhtml +++ /dev/null @@ -1,58 +0,0 @@ -<% @title = "Change profile photo" %> - -<% raise "internal error" if not @user %> - -

      <%= _("Choose your profile photo") %>

      - -<%= foi_error_messages_for :draft_profile_photo %> - -
      - -<%= form_tag 'set_photo', :id => 'set_draft_profile_photo_form', :multipart => true do %> -

      - - <%= file_field_tag :file, :size => 35, :id => 'file_1' %> -

      - -
        -
      • <%= _('Your photo will be shown in public on the Internet, - wherever you do something on {{site_name}}.', :site_name=>site_name)%> -
      • - -
      • <%= _('Please don\'t upload offensive pictures. We will take down images - that we consider inappropriate.')%> -
      • -
      - - -

      - <%= hidden_field_tag 'submitted_draft_profile_photo', 1 %> - - -

      - - -<% end %> - -<% if @user.profile_photo %> - -

      <%= _('OR remove the existing photo')%>

      - - <%= form_tag 'clear_photo', :id => 'clear_profile_photo_form', :multipart => true do %> - <%= submit_tag _("Clear photo") %> - <% end %> - -<% end %> - -

      - <%= link_to _("Cancel, return to your profile page"), user_url(@user) %> -

      - -
      diff --git a/app/views/user/set_profile_about_me.html.erb b/app/views/user/set_profile_about_me.html.erb new file mode 100644 index 000000000..c4b760307 --- /dev/null +++ b/app/views/user/set_profile_about_me.html.erb @@ -0,0 +1,37 @@ +<% @title = _('Change the text about you on your profile at {{site_name}}', :site_name=>site_name) %> + +<% raise _('internal error') if not @user %> + +<%= foi_error_messages_for :about_me %> + +<%= form_for :about_me do |f| %> +
      +

      <%= _('Edit text about you')%>

      +

      + <%= _(' What are you investigating using Freedom of Information? ')%> +

      +

      + <%= _(' This will appear on your {{site_name}} profile, to make it + easier for others to get involved with what you\'re doing.', :site_name=>site_name)%> +

      +
      + +

      + + <%= f.text_area :about_me, :rows => 5, :cols => 55 %> +

      + +
      +

      + <%= _(' Include relevant links, such as to a campaign page, your blog or a + twitter account. They will be made clickable. + e.g.')%> + https://twitter.com/<%= Configuration::twitter_username %> +

      +
      + +
      + <%= hidden_field_tag 'submitted_about_me', 1 %> + <%= submit_tag _('Save') %> +
      +<% end %> diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml deleted file mode 100644 index c4b760307..000000000 --- a/app/views/user/set_profile_about_me.rhtml +++ /dev/null @@ -1,37 +0,0 @@ -<% @title = _('Change the text about you on your profile at {{site_name}}', :site_name=>site_name) %> - -<% raise _('internal error') if not @user %> - -<%= foi_error_messages_for :about_me %> - -<%= form_for :about_me do |f| %> -
      -

      <%= _('Edit text about you')%>

      -

      - <%= _(' What are you investigating using Freedom of Information? ')%> -

      -

      - <%= _(' This will appear on your {{site_name}} profile, to make it - easier for others to get involved with what you\'re doing.', :site_name=>site_name)%> -

      -
      - -

      - - <%= f.text_area :about_me, :rows => 5, :cols => 55 %> -

      - -
      -

      - <%= _(' Include relevant links, such as to a campaign page, your blog or a - twitter account. They will be made clickable. - e.g.')%> - https://twitter.com/<%= Configuration::twitter_username %> -

      -
      - -
      - <%= hidden_field_tag 'submitted_about_me', 1 %> - <%= submit_tag _('Save') %> -
      -<% end %> diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb new file mode 100644 index 000000000..e67d3b719 --- /dev/null +++ b/app/views/user/show.html.erb @@ -0,0 +1,227 @@ +<% if @show_requests %> + <% @title = _("{{user_name}} - Freedom of Information requests", :user_name => h(@display_user.name)) %> +<% else %> + <% @title = _("{{user_name}} - user profile", :user_name => h(@display_user.name)) %> +<% end %> + +<% if (@same_name_users.size >= 1) %> +

      <%= _('There is more than one person who uses this site and has this name. + One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %> + <%= user_link(@same_name_user) %> + <% end %> +<% end%> + +<% if @show_profile && @is_you && @undescribed_requests.size > 0 %> +

      +

      <%= _('Please go to the following requests, and let us + know if there was information in the recent responses to them.')%>

      +
        + <% for undescribed_request in @undescribed_requests %> +
      • <%=request_link(undescribed_request)%>
      • + <% end %> +
      +

      + <%= _('Thanks very much - this will help others find useful stuff. We\'ll + also, if you need it, give advice on what to do next about your + requests.')%> +

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

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

      + <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> + <% end %> + <% if !@xapian_requests.nil? %> +

      <%= _('On this page')%>

      + <%= _('FOI requests')%> +
      <%= _('Annotations')%> + <% end %> +
      + +
      +

      + <% if @display_user.profile_photo %> + <% if @is_you %> + + <% end %> + + <% if @is_you %> + + <% end %> + <% else %> + <% if @is_you %> + + <%= link_to _('Set your profile photo'), set_profile_photo_url() %> + + <% end %> + <% end %> +

      + +

      <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %>

      + +

      + <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %> + <% if !@user.nil? && @user.admin_page_links? %> + (<%= link_to "admin", user_admin_url(@display_user) %>) + <% end %> +

      + +

      + <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %> + <% if @is_you %> + (<%= _('just to see how it works')%>) + <% end %> +

      + + <% if @display_user.public_banned? %> +
      +

      + + <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%> + +

      +

      + <%= _('They have been given the following explanation:')%> +

      +

      + <%= @display_user.can_fail_html %> +

      +
      + <% end %> + + <%= render :partial => 'user/show_user_info' %> + + <% if not @is_you %> +

      + <%= raw(_('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.fullpath)]) %> +

      + <% end %> +
      +
      +
      +<% end %> + +<% if @show_requests %> + +<% end %> +<% if @show_profile && @is_you %> +

      <%= _("Things you're following")%>

      + <%= render :partial => 'change_receive_email' %> +
      + <% if @track_things.empty? %> +

      <%= _("You're not following anything.")%>

      + <% else %> + <% if @track_things_grouped.size == 1 %> + <%= form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> +

      + <%=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.fullpath %> + <% if @track_things.size > 1 %> + <%= submit_tag _('unsubscribe all') %> + <% end %> +

      + <% end %> + <% 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 %> +

      + <%=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.fullpath %> + <% if track_things.size > 1 %> + <%= submit_tag _('unsubscribe all')%> + <% end %> +

      + <% end %> + <% end %> + +
        + <% for track_thing in track_things %> +
      • + <%= form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %> +
        + <%= track_thing.params[:list_description] %> + <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %> + <%= hidden_field_tag 'r', request.fullpath, { :id => 'r_' + track_thing.id.to_s } %> + <%= submit_tag _('unsubscribe') %> +
        + <% end %> +
      • + <% end %> +
      + <% end %> + <% end %> +<% end %> diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml deleted file mode 100644 index e67d3b719..000000000 --- a/app/views/user/show.rhtml +++ /dev/null @@ -1,227 +0,0 @@ -<% if @show_requests %> - <% @title = _("{{user_name}} - Freedom of Information requests", :user_name => h(@display_user.name)) %> -<% else %> - <% @title = _("{{user_name}} - user profile", :user_name => h(@display_user.name)) %> -<% end %> - -<% if (@same_name_users.size >= 1) %> -

      <%= _('There is more than one person who uses this site and has this name. - One of them is shown below, you may mean a different one:')%> <% for @same_name_user in @same_name_users %> - <%= user_link(@same_name_user) %> - <% end %> -<% end%> - -<% if @show_profile && @is_you && @undescribed_requests.size > 0 %> -

      -

      <%= _('Please go to the following requests, and let us - know if there was information in the recent responses to them.')%>

      -
        - <% for undescribed_request in @undescribed_requests %> -
      • <%=request_link(undescribed_request)%>
      • - <% end %> -
      -

      - <%= _('Thanks very much - this will help others find useful stuff. We\'ll - also, if you need it, give advice on what to do next about your - requests.')%> -

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

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

      - <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'sidebar' } %> - <% end %> - <% if !@xapian_requests.nil? %> -

      <%= _('On this page')%>

      - <%= _('FOI requests')%> -
      <%= _('Annotations')%> - <% end %> -
      - -
      -

      - <% if @display_user.profile_photo %> - <% if @is_you %> - - <% end %> - - <% if @is_you %> - - <% end %> - <% else %> - <% if @is_you %> - - <%= link_to _('Set your profile photo'), set_profile_photo_url() %> - - <% end %> - <% end %> -

      - -

      <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %>

      - -

      - <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %> - <% if !@user.nil? && @user.admin_page_links? %> - (<%= link_to "admin", user_admin_url(@display_user) %>) - <% end %> -

      - -

      - <%= link_to _('Send message to ') + h(@display_user.name), contact_user_url(:id => @display_user.id) %> - <% if @is_you %> - (<%= _('just to see how it works')%>) - <% end %> -

      - - <% if @display_user.public_banned? %> -
      -

      - - <%= _('This user has been banned from {{site_name}} ', :site_name=>site_name)%> - -

      -

      - <%= _('They have been given the following explanation:')%> -

      -

      - <%= @display_user.can_fail_html %> -

      -
      - <% end %> - - <%= render :partial => 'user/show_user_info' %> - - <% if not @is_you %> -

      - <%= raw(_('Sign in to change password, subscriptions and more ({{user_name}} only)',:user_name=>h(@display_user.name)) % [signin_url(:r => request.fullpath)]) %> -

      - <% end %> -
      -
      -
      -<% end %> - -<% if @show_requests %> - -<% end %> -<% if @show_profile && @is_you %> -

      <%= _("Things you're following")%>

      - <%= render :partial => 'change_receive_email' %> -
      - <% if @track_things.empty? %> -

      <%= _("You're not following anything.")%>

      - <% else %> - <% if @track_things_grouped.size == 1 %> - <%= form_tag({:controller => 'track', :action => 'delete_all_type'}, :class => "feed_form") do %> -

      - <%=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.fullpath %> - <% if @track_things.size > 1 %> - <%= submit_tag _('unsubscribe all') %> - <% end %> -

      - <% end %> - <% 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 %> -

      - <%=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.fullpath %> - <% if track_things.size > 1 %> - <%= submit_tag _('unsubscribe all')%> - <% end %> -

      - <% end %> - <% end %> - -
        - <% for track_thing in track_things %> -
      • - <%= form_tag({:controller => 'track', :action => 'update', :track_id => track_thing.id}, :class => "feed_form") do %> -
        - <%= track_thing.params[:list_description] %> - <%= hidden_field_tag 'track_medium', "delete", { :id => 'track_medium_' + track_thing.id.to_s } %> - <%= hidden_field_tag 'r', request.fullpath, { :id => 'r_' + track_thing.id.to_s } %> - <%= submit_tag _('unsubscribe') %> -
        - <% end %> -
      • - <% end %> -
      - <% end %> - <% end %> -<% end %> diff --git a/app/views/user/sign.html.erb b/app/views/user/sign.html.erb new file mode 100644 index 000000000..6a1979155 --- /dev/null +++ b/app/views/user/sign.html.erb @@ -0,0 +1,50 @@ + +<% if !@post_redirect.nil? && @post_redirect.reason_params[:user_name] %> + <% @title = _("Sign in") %> +
      + +

      + <% if @post_redirect.reason_params[:web].empty? %> + <%= _('Please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. + <% else %> + <%= @post_redirect.reason_params[:web] %>, + <%= _('please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. + <% end %> +

      + <% if @post_redirect.post_params["controller"] == "admin_general" %> +

      Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %>

      + <% end %> + + <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => true } %> + +
      + +<% else %> + <% @title = _('Sign in or make a new account') %> + +
      + <% if !@post_redirect.nil? %> +

      + <% if @post_redirect.reason_params[:web].empty? %> + <%= _('Please sign in or make a new account.') %> + <% else %> + <%= _('{{reason}}, please sign in or make a new account.', :reason => @post_redirect.reason_params[:web]) %> + <% end %> +

      + <% end %> +
      +

      <%= _('Sign in') %>

      + <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %> +
      +
      + <%= _('- or -') %> +
      +
      +

      <%= _('Sign up') %>

      + <%= render :partial => 'signup' %> +
      +
      +
      + +<% end %> + diff --git a/app/views/user/sign.rhtml b/app/views/user/sign.rhtml deleted file mode 100644 index 6a1979155..000000000 --- a/app/views/user/sign.rhtml +++ /dev/null @@ -1,50 +0,0 @@ - -<% if !@post_redirect.nil? && @post_redirect.reason_params[:user_name] %> - <% @title = _("Sign in") %> -
      - -

      - <% if @post_redirect.reason_params[:web].empty? %> - <%= _('Please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. - <% else %> - <%= @post_redirect.reason_params[:web] %>, - <%= _('please sign in as ')%><%= link_to h(@post_redirect.reason_params[:user_name]), @post_redirect.reason_params[:user_url] %>. - <% end %> -

      - <% if @post_redirect.post_params["controller"] == "admin_general" %> -

      Don't have a superuser account yet? <%= link_to "Sign in as the emergency user", @post_redirect.uri + "?emergency=1" %>

      - <% end %> - - <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => true } %> - -
      - -<% else %> - <% @title = _('Sign in or make a new account') %> - -
      - <% if !@post_redirect.nil? %> -

      - <% if @post_redirect.reason_params[:web].empty? %> - <%= _('Please sign in or make a new account.') %> - <% else %> - <%= _('{{reason}}, please sign in or make a new account.', :reason => @post_redirect.reason_params[:web]) %> - <% end %> -

      - <% end %> -
      -

      <%= _('Sign in') %>

      - <%= render :partial => 'signin', :locals => { :sign_in_as_existing_user => false } %> -
      -
      - <%= _('- or -') %> -
      -
      -

      <%= _('Sign up') %>

      - <%= render :partial => 'signup' %> -
      -
      -
      - -<% end %> - diff --git a/app/views/user/signchangeemail.html.erb b/app/views/user/signchangeemail.html.erb new file mode 100644 index 000000000..7308179f4 --- /dev/null +++ b/app/views/user/signchangeemail.html.erb @@ -0,0 +1,41 @@ +<% @title = _('Change your email address used on {{site_name}}', :site_name => site_name) %> + +<% raise _('internal error') if not @user %> + +
      + +<%= form_tag({:action => "signchangeemail"}, {:id => "signchangeemail_form"}) do %> + <%= foi_error_messages_for :signchangeemail %> + +
      +

      <% _('Change your email address used on {{site_name}}', :site_name => site_name) %>

      +
      + +

      + + <%= text_field 'signchangeemail', 'old_email', { :size => 20 } %> +

      + +

      + + <%= text_field 'signchangeemail', 'new_email', { :size => 20 } %> +

      + +

      + + <%= password_field 'signchangeemail', 'password', { :size => 15 } %> +

      + +

      + <%= _('Note: + We will send an email to your new email address. Follow the + instructions in it to confirm changing your email.')%> +

      + +
      + <%= hidden_field_tag 'submitted_signchangeemail_do', 1 %> + <%= submit_tag _("Change email on {{site_name}}", :site_name=>site_name) %> +
      +<% end %> + +
      diff --git a/app/views/user/signchangeemail.rhtml b/app/views/user/signchangeemail.rhtml deleted file mode 100644 index 7308179f4..000000000 --- a/app/views/user/signchangeemail.rhtml +++ /dev/null @@ -1,41 +0,0 @@ -<% @title = _('Change your email address used on {{site_name}}', :site_name => site_name) %> - -<% raise _('internal error') if not @user %> - -
      - -<%= form_tag({:action => "signchangeemail"}, {:id => "signchangeemail_form"}) do %> - <%= foi_error_messages_for :signchangeemail %> - -
      -

      <% _('Change your email address used on {{site_name}}', :site_name => site_name) %>

      -
      - -

      - - <%= text_field 'signchangeemail', 'old_email', { :size => 20 } %> -

      - -

      - - <%= text_field 'signchangeemail', 'new_email', { :size => 20 } %> -

      - -

      - - <%= password_field 'signchangeemail', 'password', { :size => 15 } %> -

      - -

      - <%= _('Note: - We will send an email to your new email address. Follow the - instructions in it to confirm changing your email.')%> -

      - -
      - <%= hidden_field_tag 'submitted_signchangeemail_do', 1 %> - <%= submit_tag _("Change email on {{site_name}}", :site_name=>site_name) %> -
      -<% end %> - -
      diff --git a/app/views/user/signchangeemail_confirm.html.erb b/app/views/user/signchangeemail_confirm.html.erb new file mode 100644 index 000000000..bfedbac2d --- /dev/null +++ b/app/views/user/signchangeemail_confirm.html.erb @@ -0,0 +1,14 @@ +<% @title = h("Now check your email!") %> + +

      <%= _('Now check your email!')%>

      + +

      + <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in +it before your email address will be changed.')%> +

      + +

      + <%= _('If you use web-based email or have "junk mail" filters, also check your +bulk/spam mail folders. Sometimes, our messages are marked that way.')%> +

      + diff --git a/app/views/user/signchangeemail_confirm.rhtml b/app/views/user/signchangeemail_confirm.rhtml deleted file mode 100644 index bfedbac2d..000000000 --- a/app/views/user/signchangeemail_confirm.rhtml +++ /dev/null @@ -1,14 +0,0 @@ -<% @title = h("Now check your email!") %> - -

      <%= _('Now check your email!')%>

      - -

      - <%= _('We\'ve sent an email to your new email address. You\'ll need to click the link in -it before your email address will be changed.')%> -

      - -

      - <%= _('If you use web-based email or have "junk mail" filters, also check your -bulk/spam mail folders. Sometimes, our messages are marked that way.')%> -

      - diff --git a/app/views/user/signchangepassword.html.erb b/app/views/user/signchangepassword.html.erb new file mode 100644 index 000000000..51bcb466d --- /dev/null +++ b/app/views/user/signchangepassword.html.erb @@ -0,0 +1,31 @@ +<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %> + +<% raise "internal error" if not @user %> + +
      + +<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> + <%= foi_error_messages_for :user %> + +
      +

      <%= _('Change your password on {{site_name}}', :site_name => site_name)%>

      +
      + +

      + + <%= password_field 'user', 'password', { :size => 15 } %> +

      + +

      + + <%= password_field 'user', 'password_confirmation', { :size => 15 } %> +

      + +
      + <%= hidden_field_tag 'submitted_signchangepassword_do', 1 %> + <%= hidden_field_tag 'pretoken', params[:pretoken] %> + <%= submit_tag _('Change password on {{site_name}}', :site_name => site_name) %> +
      +<% end %> + +
      diff --git a/app/views/user/signchangepassword.rhtml b/app/views/user/signchangepassword.rhtml deleted file mode 100644 index 51bcb466d..000000000 --- a/app/views/user/signchangepassword.rhtml +++ /dev/null @@ -1,31 +0,0 @@ -<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %> - -<% raise "internal error" if not @user %> - -
      - -<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> - <%= foi_error_messages_for :user %> - -
      -

      <%= _('Change your password on {{site_name}}', :site_name => site_name)%>

      -
      - -

      - - <%= password_field 'user', 'password', { :size => 15 } %> -

      - -

      - - <%= password_field 'user', 'password_confirmation', { :size => 15 } %> -

      - -
      - <%= hidden_field_tag 'submitted_signchangepassword_do', 1 %> - <%= hidden_field_tag 'pretoken', params[:pretoken] %> - <%= submit_tag _('Change password on {{site_name}}', :site_name => site_name) %> -
      -<% end %> - -
      diff --git a/app/views/user/signchangepassword_confirm.html.erb b/app/views/user/signchangepassword_confirm.html.erb new file mode 100644 index 000000000..63b6515cd --- /dev/null +++ b/app/views/user/signchangepassword_confirm.html.erb @@ -0,0 +1,13 @@ +<% @title = h( _('Now check your email!')) %> + +

      <%= _('Now check your email!')%>

      + +

      +<%= _('We\'ve sent you an email, click the link in it, then you can change your password.')%> +

      + +

      +<%= _('If you use web-based email or have "junk mail" filters, also check your +bulk/spam mail folders. Sometimes, our messages are marked that way.')%> +

      + diff --git a/app/views/user/signchangepassword_confirm.rhtml b/app/views/user/signchangepassword_confirm.rhtml deleted file mode 100644 index 63b6515cd..000000000 --- a/app/views/user/signchangepassword_confirm.rhtml +++ /dev/null @@ -1,13 +0,0 @@ -<% @title = h( _('Now check your email!')) %> - -

      <%= _('Now check your email!')%>

      - -

      -<%= _('We\'ve sent you an email, click the link in it, then you can change your password.')%> -

      - -

      -<%= _('If you use web-based email or have "junk mail" filters, also check your -bulk/spam mail folders. Sometimes, our messages are marked that way.')%> -

      - diff --git a/app/views/user/signchangepassword_send_confirm.html.erb b/app/views/user/signchangepassword_send_confirm.html.erb new file mode 100644 index 000000000..850237c34 --- /dev/null +++ b/app/views/user/signchangepassword_send_confirm.html.erb @@ -0,0 +1,30 @@ +<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %> + +
      + +<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> + <%= foi_error_messages_for :signchangepassword %> + +
      +

      <%= _('Change your password on {{site_name}}', :site_name => site_name) %>

      +
      + +

      + + <%= text_field 'signchangepassword', 'email', { :size => 20 } %> +

      + +

      + <%= _(' Note: + We will send you an email. Follow the instructions in it to change + your password.')%> +

      + +
      + <%= hidden_field_tag 'submitted_signchangepassword_send_confirm', 1 %> + <%= hidden_field_tag 'pretoken', params[:pretoken] %> + <%= submit_tag _('Submit') %> +
      +<% end %> + +
      diff --git a/app/views/user/signchangepassword_send_confirm.rhtml b/app/views/user/signchangepassword_send_confirm.rhtml deleted file mode 100644 index 850237c34..000000000 --- a/app/views/user/signchangepassword_send_confirm.rhtml +++ /dev/null @@ -1,30 +0,0 @@ -<% @title = _('Change your password on {{site_name}}', :site_name => site_name) %> - -
      - -<%= form_tag({:action => "signchangepassword"}, {:id => "signchangepassword_form"}) do %> - <%= foi_error_messages_for :signchangepassword %> - -
      -

      <%= _('Change your password on {{site_name}}', :site_name => site_name) %>

      -
      - -

      - - <%= text_field 'signchangepassword', 'email', { :size => 20 } %> -

      - -

      - <%= _(' Note: - We will send you an email. Follow the instructions in it to change - your password.')%> -

      - -
      - <%= hidden_field_tag 'submitted_signchangepassword_send_confirm', 1 %> - <%= hidden_field_tag 'pretoken', params[:pretoken] %> - <%= submit_tag _('Submit') %> -
      -<% end %> - -
      diff --git a/app/views/user/signin_successful.html.erb b/app/views/user/signin_successful.html.erb new file mode 100644 index 000000000..675701d74 --- /dev/null +++ b/app/views/user/signin_successful.html.erb @@ -0,0 +1,11 @@ +
      + <%= _("You're in. Continue sending your request") %> +
      + + diff --git a/app/views/user/signin_successful.rhtml b/app/views/user/signin_successful.rhtml deleted file mode 100644 index 675701d74..000000000 --- a/app/views/user/signin_successful.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -
      - <%= _("You're in. Continue sending your request") %> -
      - - diff --git a/app/views/user/wall.html.erb b/app/views/user/wall.html.erb new file mode 100644 index 000000000..190cc0a6d --- /dev/null +++ b/app/views/user/wall.html.erb @@ -0,0 +1,16 @@ +<% @title = h(@display_user.name) + _(" - wall") %> +<% if @is_you %> +
      +

      <%= _('You can change the requests and users you are following on your profile page.', :profile_url => show_user_profile_path) %> + <%= render :partial => 'change_receive_email' %> +

      +<% end %> + diff --git a/app/views/user/wall.rhtml b/app/views/user/wall.rhtml deleted file mode 100644 index 190cc0a6d..000000000 --- a/app/views/user/wall.rhtml +++ /dev/null @@ -1,16 +0,0 @@ -<% @title = h(@display_user.name) + _(" - wall") %> -<% if @is_you %> -
      -

      <%= _('You can change the requests and users you are following on your profile page.', :profile_url => show_user_profile_path) %> - <%= render :partial => 'change_receive_email' %> -

      -<% end %> - diff --git a/app/views/user/wrong_user.html.erb b/app/views/user/wrong_user.html.erb new file mode 100644 index 000000000..30256a639 --- /dev/null +++ b/app/views/user/wrong_user.html.erb @@ -0,0 +1,4 @@ +

      +<%= _('Sorry, but only {{user_name}} is allowed to do that.', :user_name => h(@reason_params[:user_name])) %> +

      + diff --git a/app/views/user/wrong_user.rhtml b/app/views/user/wrong_user.rhtml deleted file mode 100644 index 30256a639..000000000 --- a/app/views/user/wrong_user.rhtml +++ /dev/null @@ -1,4 +0,0 @@ -

      -<%= _('Sorry, but only {{user_name}} is allowed to do that.', :user_name => h(@reason_params[:user_name])) %> -

      - 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..c59c56941 --- /dev/null +++ b/app/views/user/wrong_user_unknown_email.html.erb @@ -0,0 +1,8 @@ + +

      +<%= @reason_params[:web] %>. <%= raw(_('Unfortunately we don\'t know the FOI +email address for that authority, so we can\'t validate this. +Please contact us to sort it out.') % [help_contact_path]) %> +

      + + 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 @@ - -

      -<%= @reason_params[:web] %>. <%= raw(_('Unfortunately we don\'t know the FOI -email address for that authority, so we can\'t validate this. -Please contact us to sort it out.') % [help_contact_path]) %> -

      - - diff --git a/app/views/user_mailer/already_registered.html.erb b/app/views/user_mailer/already_registered.html.erb new file mode 100644 index 000000000..59ffcbf94 --- /dev/null +++ b/app/views/user_mailer/already_registered.html.erb @@ -0,0 +1,11 @@ +<%= @name %>, + +<%= _('You just tried to sign up to {{site_name}}, when you +already have an account. Your name and password have been +left as they previously were. + +Please click on the link below.', :site_name=>site_name)%> <%=@reasons[:email]%> + +<%=@url%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/already_registered.rhtml b/app/views/user_mailer/already_registered.rhtml deleted file mode 100644 index 59ffcbf94..000000000 --- a/app/views/user_mailer/already_registered.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= @name %>, - -<%= _('You just tried to sign up to {{site_name}}, when you -already have an account. Your name and password have been -left as they previously were. - -Please click on the link below.', :site_name=>site_name)%> <%=@reasons[:email]%> - -<%=@url%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/changeemail_already_used.html.erb b/app/views/user_mailer/changeemail_already_used.html.erb new file mode 100644 index 000000000..1d74dda35 --- /dev/null +++ b/app/views/user_mailer/changeemail_already_used.html.erb @@ -0,0 +1,10 @@ +<%= _('Someone, perhaps you, just tried to change their email address on +{{site_name}} from {{old_email}} to {{new_email}}.', :site_name=>site_name, +:old_email=>@old_email, :new_email=>@new_email) %> + +<%= _('This was not possible because there is already an account using +the email address {{email}}.', :email=>@new_email)%>. + +<%= _('The accounts have been left as they previously were.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/changeemail_already_used.rhtml b/app/views/user_mailer/changeemail_already_used.rhtml deleted file mode 100644 index 1d74dda35..000000000 --- a/app/views/user_mailer/changeemail_already_used.rhtml +++ /dev/null @@ -1,10 +0,0 @@ -<%= _('Someone, perhaps you, just tried to change their email address on -{{site_name}} from {{old_email}} to {{new_email}}.', :site_name=>site_name, -:old_email=>@old_email, :new_email=>@new_email) %> - -<%= _('This was not possible because there is already an account using -the email address {{email}}.', :email=>@new_email)%>. - -<%= _('The accounts have been left as they previously were.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/changeemail_confirm.html.erb b/app/views/user_mailer/changeemail_confirm.html.erb new file mode 100644 index 000000000..ffb9737f7 --- /dev/null +++ b/app/views/user_mailer/changeemail_confirm.html.erb @@ -0,0 +1,13 @@ +<%= @name %>, + +<%= _('Please click on the link below to confirm that you want to +change the email address that you use for {{site_name}} +from {{old_email}} to {{new_email}}', +:site_name=>site_name, :old_email=>@old_email, :new_email=>@new_email) %> + +<%=@url%> + +<%= _('We will not reveal your email addresses to anybody unless you +or the law tell us to.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/changeemail_confirm.rhtml b/app/views/user_mailer/changeemail_confirm.rhtml deleted file mode 100644 index ffb9737f7..000000000 --- a/app/views/user_mailer/changeemail_confirm.rhtml +++ /dev/null @@ -1,13 +0,0 @@ -<%= @name %>, - -<%= _('Please click on the link below to confirm that you want to -change the email address that you use for {{site_name}} -from {{old_email}} to {{new_email}}', -:site_name=>site_name, :old_email=>@old_email, :new_email=>@new_email) %> - -<%=@url%> - -<%= _('We will not reveal your email addresses to anybody unless you -or the law tell us to.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/confirm_login.html.erb b/app/views/user_mailer/confirm_login.html.erb new file mode 100644 index 000000000..6f4feff00 --- /dev/null +++ b/app/views/user_mailer/confirm_login.html.erb @@ -0,0 +1,11 @@ +<%= @name %>, + +<%= _('Please click on the link below to confirm your email address.')%> +<%=@reasons[:email]%> + +<%=@url%> + +<%= _('We will not reveal your email address to anybody unless you +or the law tell us to.')%> + +-- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/app/views/user_mailer/confirm_login.rhtml b/app/views/user_mailer/confirm_login.rhtml deleted file mode 100644 index 6f4feff00..000000000 --- a/app/views/user_mailer/confirm_login.rhtml +++ /dev/null @@ -1,11 +0,0 @@ -<%= @name %>, - -<%= _('Please click on the link below to confirm your email address.')%> -<%=@reasons[:email]%> - -<%=@url%> - -<%= _('We will not reveal your email address to anybody unless you -or the law tell us to.')%> - --- <%= _('the {{site_name}} team', :site_name=>site_name) %> diff --git a/doc/THEMES.md b/doc/THEMES.md index c5e4a3eee..02070644a 100644 --- a/doc/THEMES.md +++ b/doc/THEMES.md @@ -66,8 +66,8 @@ add custom help pages, as described below. The core templates that comprise the layout and user interface of an Alaveteli site live in `app/views/`. They are use Rails' ERB syntax. For example, the template for the home page lives at -`app/views/general/frontpage.rhtml`, and the template for the "about -us" page is at `app/views/help/about.rhtml`. +`app/views/general/frontpage.html.erb`, and the template for the "about +us" page is at `app/views/help/about.html.erb`. Obviously, you *could* edit those core files directly, but this would be a Bad Idea, because you would find it increasingly hard to do @@ -90,7 +90,7 @@ the main Rails app -- see `alavetelitheme/install.rb` to see how this happens. The partial at -`alavetelitheme/lib/views/general/_before_head_end.rhtml` includes the +`alavetelitheme/lib/views/general/_before_head_end.html.erb` includes the custom CSS in your theme's stylesheet folder (by convention, in `alavetelitheme/public/stylesheets/`), with: @@ -137,20 +137,20 @@ The latter must have one method: When you've added your extra states, you also need to create the following files in your theme: -* `lib/views/general/_custom_state_descriptions.rhtml`: Descriptions +* `lib/views/general/_custom_state_descriptions.html.erb`: Descriptions of your new states, suitable for displaying to end users -* `lib/views/general/_custom_state_transitions_complete.rhtml`: +* `lib/views/general/_custom_state_transitions_complete.html.erb`: Descriptions for any new states that you might characterise as 'completion' states, for displaying on the categorisation form that we ask requestors to fill out -* `lib/views/general/_custom_state_transitions_pending.rhtml`: As +* `lib/views/general/_custom_state_transitions_pending.html.erb`: As above, but for new states you might characterise as 'pending' states. You can see examples of these customisations in [this commit](https://github.com/sebbacon/informatazyrtare-theme/commit/2b240491237bd72415990399904361ce9bfa431d) for the Kosovan version of Alaveteli, Informata Zyrtare (ignore the -file `lib/views/general/_custom_state_transitions.rhtml`, which is +file `lib/views/general/_custom_state_transitions.html.erb`, which is unused). # Adding new pages in the navigation diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 663588303..ffc15ebe8 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -692,7 +692,7 @@ describe RequestController, "when showing one request" do get :show, :url_title => 'why_do_you_have_such_a_fancy_dog' assert assigns[:info_request].info_request_events[3].incoming_message.get_attachments_for_display.count == 2 # the issue is that the info_request_events have got cached on them the old info_requests. - # where i'm at: trying to replace those fields that got re-read from the raw email. however tests are failing in very strange ways. currently I don't appear to be getting any attachments parsed in at all when in the template (see "*****" in _correspondence.rhtml) but do when I'm in the code. + # where i'm at: trying to replace those fields that got re-read from the raw email. however tests are failing in very strange ways. currently I don't appear to be getting any attachments parsed in at all when in the template (see "*****" in _correspondence.html.erb) but do when I'm in the code. # so at this point, assigns[:info_request].incoming_messages[1].get_attachments_for_display is returning stuff, but the equivalent thing in the template isn't. # but something odd is that the above is return a whole load of attachments which aren't there in the controller diff --git a/spec/views/public_body/show.html.erb_spec.rb b/spec/views/public_body/show.html.erb_spec.rb new file mode 100644 index 000000000..1a972a661 --- /dev/null +++ b/spec/views/public_body/show.html.erb_spec.rb @@ -0,0 +1,119 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe "public_body/show" do + before do + @pb = mock_model(PublicBody, + :name => 'Test Quango', + :short_name => 'tq', + :url_name => 'testquango', + :notes => '', + :type_of_authority => 'A public body', + :eir_only? => nil, + :info_requests => [1, 2, 3, 4], # out of sync with Xapian + :publication_scheme => '', + :disclosure_log => '', + :calculated_home_page => '') + @pb.stub!(:override_request_email).and_return(nil) + @pb.stub!(:is_requestable?).and_return(true) + @pb.stub!(:has_notes?).and_return(false) + @pb.stub!(:has_tag?).and_return(false) + @xap = mock(ActsAsXapian::Search, :matches_estimated => 2) + @xap.stub!(:results).and_return([ + { :model => mock_event }, + { :model => mock_event } + ]) + + assign(:public_body, @pb) + assign(:track_thing, mock_model(TrackThing, + :track_type => 'public_body_updates', :public_body => @pb, :params => {})) + assign(:xapian_requests, @xap) + assign(:page, 1) + assign(:per_page, 10) + end + + it "should be successful" do + render + controller.response.should be_success + end + + it "should be valid HTML" do + render + validate_as_body response.body + end + + it "should show the body's name" do + render + response.should have_selector('h1', :content => "Test Quango") + end + + it "should tell total number of requests" do + render + response.should match "4 Freedom of Information requests" + end + + it "should cope with no results" do + @pb.stub!(:info_requests).and_return([]) + render + response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests") + end + + it "should cope with Xapian being down" do + assign(:xapian_requests, nil) + render + response.should match "The search index is currently offline" + end + + it "should link to Charity Commission site if we have numbers to do so" do + @pb.stub!(:has_tag?).and_return(true) + @pb.stub!(:get_tag_values).and_return(['98765', '12345']) + + render + response.should have_selector("div#header_right") do + have_selector "a", :href => /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/ + end + response.should have_selector("div#header_right") do + have_selector "a", :href => /www.charity-commission.gov.uk.*RegisteredCharityNumber=12345$/ + end + end + + it "should link to Scottish Charity Regulator site if we have an SC number" do + @pb.stub!(:has_tag?).and_return(true) + @pb.stub!(:get_tag_values).and_return(['SC1234']) + + render + response.should have_selector("div#header_right") do + have_selector "a", :href => /www.oscr.org.uk.*id=SC1234$/ + end + end + + + it "should not link to Charity Commission site if we don't have number" do + render + response.should have_selector("div#header_right") do + have_selector "a", :href => /charity-commission.gov.uk/ + end + end + + +end + +def mock_event + return mock_model(InfoRequestEvent, + :info_request => mock_model(InfoRequest, + :title => 'Title', + :url_title => 'title', + :display_status => 'waiting_response', + :calculate_status => 'waiting_response', + :public_body => @pb, + :is_external? => false, + :user => mock_model(User, :name => 'Test User', :url_name => 'testuser') + ), + :incoming_message => nil, :is_incoming_message? => false, + :outgoing_message => nil, :is_outgoing_message? => false, + :comment => nil, :is_comment? => false, + :event_type => 'sent', + :created_at => Time.now - 4.days, + :search_text_main => '' + ) +end + diff --git a/spec/views/public_body/show.rhtml_spec.rb b/spec/views/public_body/show.rhtml_spec.rb deleted file mode 100644 index 1a972a661..000000000 --- a/spec/views/public_body/show.rhtml_spec.rb +++ /dev/null @@ -1,119 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe "public_body/show" do - before do - @pb = mock_model(PublicBody, - :name => 'Test Quango', - :short_name => 'tq', - :url_name => 'testquango', - :notes => '', - :type_of_authority => 'A public body', - :eir_only? => nil, - :info_requests => [1, 2, 3, 4], # out of sync with Xapian - :publication_scheme => '', - :disclosure_log => '', - :calculated_home_page => '') - @pb.stub!(:override_request_email).and_return(nil) - @pb.stub!(:is_requestable?).and_return(true) - @pb.stub!(:has_notes?).and_return(false) - @pb.stub!(:has_tag?).and_return(false) - @xap = mock(ActsAsXapian::Search, :matches_estimated => 2) - @xap.stub!(:results).and_return([ - { :model => mock_event }, - { :model => mock_event } - ]) - - assign(:public_body, @pb) - assign(:track_thing, mock_model(TrackThing, - :track_type => 'public_body_updates', :public_body => @pb, :params => {})) - assign(:xapian_requests, @xap) - assign(:page, 1) - assign(:per_page, 10) - end - - it "should be successful" do - render - controller.response.should be_success - end - - it "should be valid HTML" do - render - validate_as_body response.body - end - - it "should show the body's name" do - render - response.should have_selector('h1', :content => "Test Quango") - end - - it "should tell total number of requests" do - render - response.should match "4 Freedom of Information requests" - end - - it "should cope with no results" do - @pb.stub!(:info_requests).and_return([]) - render - response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests") - end - - it "should cope with Xapian being down" do - assign(:xapian_requests, nil) - render - response.should match "The search index is currently offline" - end - - it "should link to Charity Commission site if we have numbers to do so" do - @pb.stub!(:has_tag?).and_return(true) - @pb.stub!(:get_tag_values).and_return(['98765', '12345']) - - render - response.should have_selector("div#header_right") do - have_selector "a", :href => /charity-commission.gov.uk.*RegisteredCharityNumber=98765$/ - end - response.should have_selector("div#header_right") do - have_selector "a", :href => /www.charity-commission.gov.uk.*RegisteredCharityNumber=12345$/ - end - end - - it "should link to Scottish Charity Regulator site if we have an SC number" do - @pb.stub!(:has_tag?).and_return(true) - @pb.stub!(:get_tag_values).and_return(['SC1234']) - - render - response.should have_selector("div#header_right") do - have_selector "a", :href => /www.oscr.org.uk.*id=SC1234$/ - end - end - - - it "should not link to Charity Commission site if we don't have number" do - render - response.should have_selector("div#header_right") do - have_selector "a", :href => /charity-commission.gov.uk/ - end - end - - -end - -def mock_event - return mock_model(InfoRequestEvent, - :info_request => mock_model(InfoRequest, - :title => 'Title', - :url_title => 'title', - :display_status => 'waiting_response', - :calculate_status => 'waiting_response', - :public_body => @pb, - :is_external? => false, - :user => mock_model(User, :name => 'Test User', :url_name => 'testuser') - ), - :incoming_message => nil, :is_incoming_message? => false, - :outgoing_message => nil, :is_outgoing_message? => false, - :comment => nil, :is_comment? => false, - :event_type => 'sent', - :created_at => Time.now - 4.days, - :search_text_main => '' - ) -end - diff --git a/spec/views/request/_after_actions.html.erb_spec.rb b/spec/views/request/_after_actions.html.erb_spec.rb new file mode 100644 index 000000000..ae398f4ce --- /dev/null +++ b/spec/views/request/_after_actions.html.erb_spec.rb @@ -0,0 +1,93 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe 'when displaying actions that can be taken with regard to a request' do + + before do + @mock_body = mock_model(PublicBody, :name => 'test public body', + :url_name => 'test_public_body') + @mock_user = mock_model(User, :name => 'test user', + :url_name => 'test_user') + @mock_request = mock_model(InfoRequest, :title => 'test request', + :user => @mock_user, + :user_name => @mock_user.name, + :is_external? => false, + :public_body => @mock_body, + :comments_allowed? => true, + :url_title => 'test_request', + :all_can_view? => true) + assign :info_request, @mock_request + end + + describe 'if the request is old and unclassified' do + + before do + assign :old_unclassified, true + end + + it 'should not display a link for the request owner to update the status of the request' do + render :partial => 'request/after_actions' + response.should have_selector('div#owner_actions') do |div| + div.should_not have_selector('a', :content => 'Update the status of this request') + end + end + + it 'should display a link for anyone to update the status of the request' do + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should have_selector('a', :content => 'Update the status of this request') + end + end + + end + + describe 'if the request is not old and unclassified' do + + before do + assign :old_unclassified, false + end + + it 'should display a link for the request owner to update the status of the request' do + render :partial => 'request/after_actions' + response.should have_selector('div#owner_actions') do |div| + div.should have_selector('a', :content => 'Update the status of this request') + end + end + + it 'should not display a link for anyone to update the status of the request' do + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should_not have_selector('a', :content => 'Update the status of this request') + end + end + + end + + it 'should display a link for the request owner to request a review' do + render :partial => 'request/after_actions' + response.should have_selector('div#owner_actions') do |div| + div.should have_selector('a', :content => 'Request an internal review') + end + end + + describe 'if the request is viewable by all' do + + it 'should display the link to download the entire request' do + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should have_selector('a', :content => 'Download a zip file of all correspondence') + end + end + end + + describe 'if the request is not viewable by all' do + + it 'should not display the link to download the entire request' do + @mock_request.stub!(:all_can_view?).and_return(false) + render :partial => 'request/after_actions' + response.should have_selector('div#anyone_actions') do |div| + div.should_not have_selector('a', :content => 'Download a zip file of all correspondence') + end + end + end + +end diff --git a/spec/views/request/_after_actions.rhtml_spec.rb b/spec/views/request/_after_actions.rhtml_spec.rb deleted file mode 100644 index ae398f4ce..000000000 --- a/spec/views/request/_after_actions.rhtml_spec.rb +++ /dev/null @@ -1,93 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe 'when displaying actions that can be taken with regard to a request' do - - before do - @mock_body = mock_model(PublicBody, :name => 'test public body', - :url_name => 'test_public_body') - @mock_user = mock_model(User, :name => 'test user', - :url_name => 'test_user') - @mock_request = mock_model(InfoRequest, :title => 'test request', - :user => @mock_user, - :user_name => @mock_user.name, - :is_external? => false, - :public_body => @mock_body, - :comments_allowed? => true, - :url_title => 'test_request', - :all_can_view? => true) - assign :info_request, @mock_request - end - - describe 'if the request is old and unclassified' do - - before do - assign :old_unclassified, true - end - - it 'should not display a link for the request owner to update the status of the request' do - render :partial => 'request/after_actions' - response.should have_selector('div#owner_actions') do |div| - div.should_not have_selector('a', :content => 'Update the status of this request') - end - end - - it 'should display a link for anyone to update the status of the request' do - render :partial => 'request/after_actions' - response.should have_selector('div#anyone_actions') do |div| - div.should have_selector('a', :content => 'Update the status of this request') - end - end - - end - - describe 'if the request is not old and unclassified' do - - before do - assign :old_unclassified, false - end - - it 'should display a link for the request owner to update the status of the request' do - render :partial => 'request/after_actions' - response.should have_selector('div#owner_actions') do |div| - div.should have_selector('a', :content => 'Update the status of this request') - end - end - - it 'should not display a link for anyone to update the status of the request' do - render :partial => 'request/after_actions' - response.should have_selector('div#anyone_actions') do |div| - div.should_not have_selector('a', :content => 'Update the status of this request') - end - end - - end - - it 'should display a link for the request owner to request a review' do - render :partial => 'request/after_actions' - response.should have_selector('div#owner_actions') do |div| - div.should have_selector('a', :content => 'Request an internal review') - end - end - - describe 'if the request is viewable by all' do - - it 'should display the link to download the entire request' do - render :partial => 'request/after_actions' - response.should have_selector('div#anyone_actions') do |div| - div.should have_selector('a', :content => 'Download a zip file of all correspondence') - end - end - end - - describe 'if the request is not viewable by all' do - - it 'should not display the link to download the entire request' do - @mock_request.stub!(:all_can_view?).and_return(false) - render :partial => 'request/after_actions' - response.should have_selector('div#anyone_actions') do |div| - div.should_not have_selector('a', :content => 'Download a zip file of all correspondence') - end - end - end - -end diff --git a/spec/views/request/_describe_state.html.erb_spec.rb b/spec/views/request/_describe_state.html.erb_spec.rb new file mode 100644 index 000000000..88dea53c5 --- /dev/null +++ b/spec/views/request/_describe_state.html.erb_spec.rb @@ -0,0 +1,173 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe 'when showing the form for describing the state of a request' do + + def expect_radio_button(value) + do_render + response.should have_selector('input', :type => 'radio', :value => value) + end + + def expect_no_radio_button(value) + do_render + response.should_not have_selector('input', :type => 'radio', :value => value) + end + + def do_render + render :partial => 'request/describe_state', :locals => {:id_suffix => '1'} + end + + before do + @mock_user = mock_model(User, :name => 'test user', :url_name => 'test_user') + @mock_request = mock_model(InfoRequest, + :described_state => '', + :user => @mock_user, + :user_name => @mock_user.name, + :is_external? => false + ) + assign :info_request, @mock_request + end + + describe 'if the user is a regular user (not the request owner)' do + + before do + assign :is_owning_user, false + end + + describe 'if the request is not old and unclassified' do + + it 'should not show the form' do + do_render + response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') + end + + it 'should give a link to login' do + do_render + response.should have_selector('a', :content => 'sign in') + end + + end + + describe 'if the request is old and unclassified' do + + before do + assign :old_unclassified, true + end + + it 'should not show the form' do + do_render + response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') + end + + it 'should show the form for someone else to classify the request' do + do_render + response.should have_selector('h2', :content => 'We need your help') + end + + it 'should not give a link to login' do + do_render + response.should_not have_selector('a', :content => 'sign in') + end + end + + end + + describe 'if showing the form to the user owning the request' do + + before do + assign :is_owning_user, true + end + + describe 'when the request is not in internal review' do + + before do + @mock_request.stub!(:described_state).and_return('waiting response') + end + + it 'should show a radio button to set the status to "waiting response"' do + expect_radio_button('waiting_response') + end + + it 'should show a radio button to set the status to "waiting clarification"' do + expect_radio_button('waiting_clarification') + end + + it 'should not show a radio button to set the status to "internal_review"' do + expect_no_radio_button('internal_review') + end + + end + + describe 'when the user has asked to update the status of the request' do + + before do + assign :update_status, true + end + + it 'should show a radio button to set the status to "internal_review"' do + expect_radio_button('internal_review') + end + + it 'should show a radio button to set the status to "requires_admin"' do + expect_radio_button('requires_admin') + end + + it 'should show a radio button to set the status to "user_withdrawn"' do + expect_radio_button('user_withdrawn') + end + + end + + describe 'when the request is in internal review' do + + before do + @mock_request.stub!(:described_state).and_return('internal_review') + end + + it 'should show a radio button to set the status to "internal review"' do + expect_radio_button('internal_review') + end + + it 'should show the text "The review has finished and overall:"' do + do_render + response.should have_selector('p', :content => 'The review has finished and overall:') + end + + end + + describe 'when request is awaiting a description and the user has not asked to update the status' do + end + + it 'should show a radio button to set the status to "gone postal"' do + expect_radio_button('gone_postal') + end + + it 'should show a radio button to set the status to "not held"' do + expect_radio_button('not_held') + end + + it 'should show a radio button to set the status to "partially successful"' do + expect_radio_button('partially_successful') + end + + it 'should show a radio button to set the status to "successful"' do + expect_radio_button('successful') + end + + it 'should show a radio button to set the status to "rejected"' do + expect_radio_button('rejected') + end + + it 'should show a radio button to set the status to "error_message"' do + expect_radio_button('error_message') + end + + it 'should not show a radio button to set the status to "requires_admin"' do + expect_no_radio_button('requires_admin') + end + + it 'should not show a radio button to set the status to "user_withdrawn"' do + expect_no_radio_button('user_withdrawn') + end + + end +end diff --git a/spec/views/request/_describe_state.rhtml_spec.rb b/spec/views/request/_describe_state.rhtml_spec.rb deleted file mode 100644 index 88dea53c5..000000000 --- a/spec/views/request/_describe_state.rhtml_spec.rb +++ /dev/null @@ -1,173 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe 'when showing the form for describing the state of a request' do - - def expect_radio_button(value) - do_render - response.should have_selector('input', :type => 'radio', :value => value) - end - - def expect_no_radio_button(value) - do_render - response.should_not have_selector('input', :type => 'radio', :value => value) - end - - def do_render - render :partial => 'request/describe_state', :locals => {:id_suffix => '1'} - end - - before do - @mock_user = mock_model(User, :name => 'test user', :url_name => 'test_user') - @mock_request = mock_model(InfoRequest, - :described_state => '', - :user => @mock_user, - :user_name => @mock_user.name, - :is_external? => false - ) - assign :info_request, @mock_request - end - - describe 'if the user is a regular user (not the request owner)' do - - before do - assign :is_owning_user, false - end - - describe 'if the request is not old and unclassified' do - - it 'should not show the form' do - do_render - response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') - end - - it 'should give a link to login' do - do_render - response.should have_selector('a', :content => 'sign in') - end - - end - - describe 'if the request is old and unclassified' do - - before do - assign :old_unclassified, true - end - - it 'should not show the form' do - do_render - response.should_not have_selector('h2', :content => 'What best describes the status of this request now?') - end - - it 'should show the form for someone else to classify the request' do - do_render - response.should have_selector('h2', :content => 'We need your help') - end - - it 'should not give a link to login' do - do_render - response.should_not have_selector('a', :content => 'sign in') - end - end - - end - - describe 'if showing the form to the user owning the request' do - - before do - assign :is_owning_user, true - end - - describe 'when the request is not in internal review' do - - before do - @mock_request.stub!(:described_state).and_return('waiting response') - end - - it 'should show a radio button to set the status to "waiting response"' do - expect_radio_button('waiting_response') - end - - it 'should show a radio button to set the status to "waiting clarification"' do - expect_radio_button('waiting_clarification') - end - - it 'should not show a radio button to set the status to "internal_review"' do - expect_no_radio_button('internal_review') - end - - end - - describe 'when the user has asked to update the status of the request' do - - before do - assign :update_status, true - end - - it 'should show a radio button to set the status to "internal_review"' do - expect_radio_button('internal_review') - end - - it 'should show a radio button to set the status to "requires_admin"' do - expect_radio_button('requires_admin') - end - - it 'should show a radio button to set the status to "user_withdrawn"' do - expect_radio_button('user_withdrawn') - end - - end - - describe 'when the request is in internal review' do - - before do - @mock_request.stub!(:described_state).and_return('internal_review') - end - - it 'should show a radio button to set the status to "internal review"' do - expect_radio_button('internal_review') - end - - it 'should show the text "The review has finished and overall:"' do - do_render - response.should have_selector('p', :content => 'The review has finished and overall:') - end - - end - - describe 'when request is awaiting a description and the user has not asked to update the status' do - end - - it 'should show a radio button to set the status to "gone postal"' do - expect_radio_button('gone_postal') - end - - it 'should show a radio button to set the status to "not held"' do - expect_radio_button('not_held') - end - - it 'should show a radio button to set the status to "partially successful"' do - expect_radio_button('partially_successful') - end - - it 'should show a radio button to set the status to "successful"' do - expect_radio_button('successful') - end - - it 'should show a radio button to set the status to "rejected"' do - expect_radio_button('rejected') - end - - it 'should show a radio button to set the status to "error_message"' do - expect_radio_button('error_message') - end - - it 'should not show a radio button to set the status to "requires_admin"' do - expect_no_radio_button('requires_admin') - end - - it 'should not show a radio button to set the status to "user_withdrawn"' do - expect_no_radio_button('user_withdrawn') - end - - end -end diff --git a/spec/views/request/list.html.erb_spec.rb b/spec/views/request/list.html.erb_spec.rb new file mode 100644 index 000000000..521d946bc --- /dev/null +++ b/spec/views/request/list.html.erb_spec.rb @@ -0,0 +1,49 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe "request/list" do + + before do + assign :page, 1 + assign :per_page, 10 + end + + def make_mock_event + return mock_model(InfoRequestEvent, + :info_request => mock_model(InfoRequest, + :title => 'Title', + :url_title => 'title', + :display_status => 'awaiting_response', + :calculate_status => 'awaiting_response', + :public_body => mock_model(PublicBody, :name => 'Test Quango', :url_name => 'testquango'), + :user => mock_model(User, :name => 'Test User', :url_name => 'testuser'), + :is_external? => false + ), + :incoming_message => nil, :is_incoming_message? => false, + :outgoing_message => nil, :is_outgoing_message? => false, + :comment => nil, :is_comment? => false, + :event_type => 'sent', + :created_at => Time.now - 4.days, + :search_text_main => '' + ) + end + + it "should be successful" do + assign :list_results, [ make_mock_event, make_mock_event ] + assign :matches_estimated, 2 + assign :show_no_more_than, 100 + render + response.should have_selector("div.request_listing") + response.should_not have_selector("p", :content => "No requests of this sort yet") + end + + it "should cope with no results" do + assign :list_results, [ ] + assign :matches_estimated, 0 + assign :show_no_more_than, 0 + render + response.should have_selector("p", :content => "No requests of this sort yet") + response.should_not have_selector("div.request_listing") + end + +end + diff --git a/spec/views/request/list.rhtml_spec.rb b/spec/views/request/list.rhtml_spec.rb deleted file mode 100644 index 521d946bc..000000000 --- a/spec/views/request/list.rhtml_spec.rb +++ /dev/null @@ -1,49 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe "request/list" do - - before do - assign :page, 1 - assign :per_page, 10 - end - - def make_mock_event - return mock_model(InfoRequestEvent, - :info_request => mock_model(InfoRequest, - :title => 'Title', - :url_title => 'title', - :display_status => 'awaiting_response', - :calculate_status => 'awaiting_response', - :public_body => mock_model(PublicBody, :name => 'Test Quango', :url_name => 'testquango'), - :user => mock_model(User, :name => 'Test User', :url_name => 'testuser'), - :is_external? => false - ), - :incoming_message => nil, :is_incoming_message? => false, - :outgoing_message => nil, :is_outgoing_message? => false, - :comment => nil, :is_comment? => false, - :event_type => 'sent', - :created_at => Time.now - 4.days, - :search_text_main => '' - ) - end - - it "should be successful" do - assign :list_results, [ make_mock_event, make_mock_event ] - assign :matches_estimated, 2 - assign :show_no_more_than, 100 - render - response.should have_selector("div.request_listing") - response.should_not have_selector("p", :content => "No requests of this sort yet") - end - - it "should cope with no results" do - assign :list_results, [ ] - assign :matches_estimated, 0 - assign :show_no_more_than, 0 - render - response.should have_selector("p", :content => "No requests of this sort yet") - response.should_not have_selector("div.request_listing") - end - -end - diff --git a/spec/views/request/show.html.erb_spec.rb b/spec/views/request/show.html.erb_spec.rb new file mode 100644 index 000000000..cc5226847 --- /dev/null +++ b/spec/views/request/show.html.erb_spec.rb @@ -0,0 +1,109 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe 'when viewing an information request' do + + before do + @mock_body = mock_model(PublicBody, :name => 'test body', + :url_name => 'test_body', + :is_school? => false) + @mock_user = mock_model(User, :name => 'test user', + :url_name => 'test_user', + :profile_photo => nil) + @mock_request = mock_model(InfoRequest, :title => 'test request', + :awaiting_description => false, + :law_used_with_a => 'A Freedom of Information request', + :law_used_full => 'Freedom of Information', + :public_body => @mock_body, + :user => @mock_user, + :user_name => @mock_user.name, + :is_external? => false, + :calculate_status => 'waiting_response', + :date_response_required_by => Date.today, + :prominence => 'normal') + end + + def request_page + assign :info_request, @mock_request + assign :info_request_events, [] + assign :status, @mock_request.calculate_status + # This is so icky! + view.stub!(:_render_partial) + render :template => 'request/show' + end + + describe 'when a status update has been requested' do + + before do + assign :update_status, true + end + + it 'should show the first form for describing the state of the request' do + request_page + response.should have_selector("div.describe_state_form#describe_state_form_1") + end + + end + + describe 'when it is awaiting a description' do + + before do + @mock_request.stub!(:awaiting_description).and_return(true) + end + + it 'should show the first form for describing the state of the request' do + request_page + response.should have_selector("div.describe_state_form#describe_state_form_1") + end + + it 'should show the second form for describing the state of the request' do + request_page + response.should have_selector("div.describe_state_form#describe_state_form_2") + end + + end + + describe 'when the user is the request owner' do + + before do + assign :is_owning_user, true + end + + describe 'when the request status is "waiting clarification"' do + + before do + @mock_request.stub!(:calculate_status).and_return('waiting_clarification') + end + + describe 'when there is a last response' do + + before do + @mock_response = mock_model(IncomingMessage) + @mock_request.stub!(:get_last_response).and_return(@mock_response) + end + + + it 'should show a link to follow up the last response with clarification' do + request_page + expected_url = "http://test.host/en/request/#{@mock_request.id}/response/#{@mock_response.id}#followup" + response.should have_selector("a", :href => expected_url, :content => 'send a follow up message') + end + + end + + describe 'when there is no last response' do + + before do + @mock_request.stub!(:get_last_response).and_return(nil) + end + + + it 'should show a link to follow up the request without reference to a specific response' do + request_page + expected_url = "http://test.host/en/request/#{@mock_request.id}/response#followup" + response.should have_selector("a", :href => expected_url, :content => 'send a follow up message') + end + end + end + + end +end diff --git a/spec/views/request/show.rhtml_spec.rb b/spec/views/request/show.rhtml_spec.rb deleted file mode 100644 index cc5226847..000000000 --- a/spec/views/request/show.rhtml_spec.rb +++ /dev/null @@ -1,109 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe 'when viewing an information request' do - - before do - @mock_body = mock_model(PublicBody, :name => 'test body', - :url_name => 'test_body', - :is_school? => false) - @mock_user = mock_model(User, :name => 'test user', - :url_name => 'test_user', - :profile_photo => nil) - @mock_request = mock_model(InfoRequest, :title => 'test request', - :awaiting_description => false, - :law_used_with_a => 'A Freedom of Information request', - :law_used_full => 'Freedom of Information', - :public_body => @mock_body, - :user => @mock_user, - :user_name => @mock_user.name, - :is_external? => false, - :calculate_status => 'waiting_response', - :date_response_required_by => Date.today, - :prominence => 'normal') - end - - def request_page - assign :info_request, @mock_request - assign :info_request_events, [] - assign :status, @mock_request.calculate_status - # This is so icky! - view.stub!(:_render_partial) - render :template => 'request/show' - end - - describe 'when a status update has been requested' do - - before do - assign :update_status, true - end - - it 'should show the first form for describing the state of the request' do - request_page - response.should have_selector("div.describe_state_form#describe_state_form_1") - end - - end - - describe 'when it is awaiting a description' do - - before do - @mock_request.stub!(:awaiting_description).and_return(true) - end - - it 'should show the first form for describing the state of the request' do - request_page - response.should have_selector("div.describe_state_form#describe_state_form_1") - end - - it 'should show the second form for describing the state of the request' do - request_page - response.should have_selector("div.describe_state_form#describe_state_form_2") - end - - end - - describe 'when the user is the request owner' do - - before do - assign :is_owning_user, true - end - - describe 'when the request status is "waiting clarification"' do - - before do - @mock_request.stub!(:calculate_status).and_return('waiting_clarification') - end - - describe 'when there is a last response' do - - before do - @mock_response = mock_model(IncomingMessage) - @mock_request.stub!(:get_last_response).and_return(@mock_response) - end - - - it 'should show a link to follow up the last response with clarification' do - request_page - expected_url = "http://test.host/en/request/#{@mock_request.id}/response/#{@mock_response.id}#followup" - response.should have_selector("a", :href => expected_url, :content => 'send a follow up message') - end - - end - - describe 'when there is no last response' do - - before do - @mock_request.stub!(:get_last_response).and_return(nil) - end - - - it 'should show a link to follow up the request without reference to a specific response' do - request_page - expected_url = "http://test.host/en/request/#{@mock_request.id}/response#followup" - response.should have_selector("a", :href => expected_url, :content => 'send a follow up message') - end - end - end - - end -end diff --git a/spec/views/request_game/play.html.erb_spec.rb b/spec/views/request_game/play.html.erb_spec.rb new file mode 100644 index 000000000..b5cf57c23 --- /dev/null +++ b/spec/views/request_game/play.html.erb_spec.rb @@ -0,0 +1,37 @@ +require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) + +describe 'request_game/play' do + + before do + @mock_body = mock_model(PublicBody, :name => 'test body', + :url_name => 'test_body', + :is_school? => false) + @mock_user = mock_model(User, :name => 'test user', + :url_name => 'test_user', + :profile_photo => nil) + @mock_request = mock_model(InfoRequest, :title => 'test request', + :awaiting_description => false, + :law_used_with_a => 'A Freedom of Information request', + :law_used_full => 'Freedom of Information', + :public_body => @mock_body, + :url_title => 'a_test_request', + :user => @mock_user, + :calculate_status => 'waiting_response', + :date_response_required_by => Date.today, + :prominence => 'normal', + :initial_request_text => 'hi there', + :display_status => 'Awaiting categorisation', + :created_at => Time.now) + assign :league_table_28_days, [] + assign :league_table_all_time, [] + assign :requests, [@mock_request] + assign :play_urls, true + end + + it 'should show the correct url for a request' do + render + response.should include("/categorise/request/a_test_request") + end + + +end diff --git a/spec/views/request_game/play.rhtml_spec.rb b/spec/views/request_game/play.rhtml_spec.rb deleted file mode 100644 index b5cf57c23..000000000 --- a/spec/views/request_game/play.rhtml_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -require File.expand_path(File.join('..', '..', '..', 'spec_helper'), __FILE__) - -describe 'request_game/play' do - - before do - @mock_body = mock_model(PublicBody, :name => 'test body', - :url_name => 'test_body', - :is_school? => false) - @mock_user = mock_model(User, :name => 'test user', - :url_name => 'test_user', - :profile_photo => nil) - @mock_request = mock_model(InfoRequest, :title => 'test request', - :awaiting_description => false, - :law_used_with_a => 'A Freedom of Information request', - :law_used_full => 'Freedom of Information', - :public_body => @mock_body, - :url_title => 'a_test_request', - :user => @mock_user, - :calculate_status => 'waiting_response', - :date_response_required_by => Date.today, - :prominence => 'normal', - :initial_request_text => 'hi there', - :display_status => 'Awaiting categorisation', - :created_at => Time.now) - assign :league_table_28_days, [] - assign :league_table_all_time, [] - assign :requests, [@mock_request] - assign :play_urls, true - end - - it 'should show the correct url for a request' do - render - response.should include("/categorise/request/a_test_request") - end - - -end -- cgit v1.2.3