{"action":"created","comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/77311112","id":77311112,"diff_hunk":"@@ -0,0 +1,193 @@\n+# -*- encoding : utf-8 -*-\n+module InfoRequestHelper\n+  include ConfigHelper\n+  include DateTimeHelper\n+  include LinkToHelper\n+\n+  def status_text(status, opts = {})\n+    method = \"status_text_#{ status }\"\n+    if respond_to?(method, true)\n+      send(method, opts)\n+    else\n+      custom_state_description(status)\n+    end\n+  end\n+\n+  private\n+\n+  def status_text_waiting_response(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    str = _('Currently <strong>waiting for a response</strong> from ' \\\n+            '{{public_body_link}}, they must respond promptly and',\n+            :public_body_link => public_body_link(info_request.public_body))\n+    str += ' '\n+    str += _('normally')\n+    str += ' '\n+    str += _('no later than')\n+    str += ' '\n+    str += content_tag(:strong,\n+                       simple_date(info_request.date_response_required_by))\n+    str += ' '\n+    str += \"(\"\n+    str += link_to _(\"details\"), \"/help/requesting#quickly_response\"\n+    str += \").\"\n+  end\n+\n+  def status_text_waiting_response_overdue(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    str = _('Response to this request is <strong>delayed</strong>.')\n+    str += ' '\n+    str += _('By law, {{public_body_link}} should normally have responded ' \\\n+             '<strong>promptly</strong> and',\n+             :public_body_link => public_body_link(info_request.public_body))\n+    str += ' '\n+    str += _('by')\n+    str += ' '\n+    str += content_tag(:strong,\n+                       simple_date(info_request.date_response_required_by))\n+    str += ' '\n+    str += \"(\"\n+    str += link_to _('details'),\n+                   help_requesting_path(:anchor => 'quickly_response')\n+    str += \")\"\n+  end\n+\n+  def status_text_waiting_response_very_overdue(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    str = _('Response to this request is <strong>long overdue</strong>.')\n+    str += ' '\n+    str += _('By law, under all circumstances, {{public_body_link}} should ' \\\n+            'have responded by now',\n+            :public_body_link => public_body_link(info_request.public_body))\n+    str += ' '\n+    str += \"(\"\n+    str += link_to _('details'),\n+                   help_requesting_path(:anchor => 'quickly_response')\n+    str += \").\"\n+\n+    unless info_request.is_external?\n+      str += ' '\n+      str += _('You can <strong>complain</strong> by')\n+      str += ' '\n+      str += link_to _(\"requesting an internal review\"),\n+                    new_request_followup_path(:request_id => info_request.id) +\n+                    \"?internal_review=1#followup\"\n+      str += '.'\n+    end\n+\n+    str\n+  end\n+\n+  def status_text_not_held(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    _('{{authority_name}} <strong>did not have</strong> the information ' \\\n+      'requested.',\n+      :authority_name => public_body_link(info_request.public_body))\n+  end\n+\n+  def status_text_rejected(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    _('The request was <strong>refused</strong> by {{authority_name}}.',\n+      :authority_name => public_body_link(info_request.public_body))\n+  end\n+\n+  def status_text_successful(opts = {})\n+    _('The request was <strong>successful</strong>.')\n+  end\n+\n+  def status_text_partially_successful(opts = {})\n+    _('The request was <strong>partially successful</strong>.')\n+  end\n+\n+  def status_text_waiting_clarification(opts = {})\n+    info_request = opts.fetch(:info_request)\n+    is_owning_user = opts.fetch(:is_owning_user)\n+\n+    str = ''\n+\n+    if is_owning_user && !info_request.is_external?\n+      str += _('{{authority_name}} is <strong>waiting for your clarification' \\\n+               '</strong>.',\n+               :authority_name => info_request.public_body.name)\n+      str += ' '\n+      str += _('Please')\n+      str += ' '\n+      str += link_to _(\"send a follow up message\"),\n+                     respond_to_last_path(info_request, :anchor => 'followup')\n+      str += '.'\n+    else\n+      str += _('The request is <strong>waiting for clarification</strong>.')\n+\n+      unless info_request.is_external?\n+        redirect_to = opts.fetch(:redirect_to)\n+\n+        str += ' '\n+        str += _('If you are {{user_link}}, please',\n+                 :user_link => user_link_for_request(info_request))\n+        str += ' '\n+        str += link_to _(\"sign in\"), signin_path(:r => redirect_to)\n+        str += ' '\n+        str += _('to send a follow up message.')\n+      end\n+    end\n+\n+    str\n+  end\n+\n+  def status_text_gone_postal(opts = {})\n+    _('The authority would like to / has <strong>responded by ' \\\n+      'post</strong> to this request.')\n+  end\n+\n+  def status_text_internal_review(opts = {})\n+    info_request = opts.fetch(:info_request)\n+\n+    _('Waiting for an <strong>internal review</strong> by ' \\\n+      '{{public_body_link}} of their handling of this request.',\n+      :public_body_link => public_body_link(info_request.public_body))\n+  end\n+\n+  def status_text_error_message(opts = {})\n+    _('There was a <strong>delivery error</strong> or similar, which ' \\\n+      'needs fixing by the {{site_name}} team.',\n+      :site_name => site_name)\n+  end\n+\n+  def status_text_requires_admin(opts = {})\n+     _('This request has had an unusual response, and <strong>requires ' \\","path":"app/helpers/info_request_helper.rb","position":162,"original_position":162,"commit_id":"d922b66086465ef9317aae1902c59a11041d223c","original_commit_id":"d922b66086465ef9317aae1902c59a11041d223c","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use 2 (not 3) spaces for indentation.","created_at":"2016-09-02T08:31:33Z","updated_at":"2016-09-02T08:31:33Z","html_url":"https://github.com/mysociety/alaveteli/pull/3451#discussion_r77311112","pull_request_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451","_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments/77311112"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/3451#discussion_r77311112"},"pull_request":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451"}}},"pull_request":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451","id":80826103,"html_url":"https://github.com/mysociety/alaveteli/pull/3451","diff_url":"https://github.com/mysociety/alaveteli/pull/3451.diff","patch_url":"https://github.com/mysociety/alaveteli/pull/3451.patch","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3451","number":3451,"state":"open","locked":false,"title":"Add action menus for request actions","user":{"login":"wrightmartin","id":2292925,"avatar_url":"https://avatars.githubusercontent.com/u/2292925?v=3","gravatar_id":"","url":"https://api.github.com/users/wrightmartin","html_url":"https://github.com/wrightmartin","followers_url":"https://api.github.com/users/wrightmartin/followers","following_url":"https://api.github.com/users/wrightmartin/following{/other_user}","gists_url":"https://api.github.com/users/wrightmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/wrightmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wrightmartin/subscriptions","organizations_url":"https://api.github.com/users/wrightmartin/orgs","repos_url":"https://api.github.com/users/wrightmartin/repos","events_url":"https://api.github.com/users/wrightmartin/events{/privacy}","received_events_url":"https://api.github.com/users/wrightmartin/received_events","type":"User","site_admin":false},"body":"Work on https://github.com/mysociety/alaveteli/issues/3269\r\nFixes https://github.com/mysociety/alaveteli/issues/3293\r\n\r\nThis replaces the majority of the 'lesser used' actions on the request page with an action menu\r\n\r\n### todo\r\n- [ ] Hide the role-based action submenus based on permissions","created_at":"2016-08-10T16:33:20Z","updated_at":"2016-09-02T08:31:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5eefa7ca2a853e20c8f98ae365f55e11f6f19f9d","assignee":{"login":"garethrees","id":282788,"avatar_url":"https://avatars.githubusercontent.com/u/282788?v=3","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false},"assignees":[{"login":"garethrees","id":282788,"avatar_url":"https://avatars.githubusercontent.com/u/282788?v=3","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451/commits","review_comments_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451/comments","review_comment_url":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/3451/comments","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/d922b66086465ef9317aae1902c59a11041d223c","head":{"label":"mysociety:add-action-menus-for-request-actions","ref":"add-action-menus-for-request-actions","sha":"d922b66086465ef9317aae1902c59a11041d223c","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?v=3","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?v=3","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/alaveteli/deployments","created_at":"2010-11-30T13:11:39Z","updated_at":"2016-08-30T10:08:33Z","pushed_at":"2016-09-02T08:31:30Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":118344,"stargazers_count":176,"watchers_count":176,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":782,"forks":117,"open_issues":782,"watchers":176,"default_branch":"develop"}},"base":{"label":"mysociety:develop","ref":"develop","sha":"8a624404809d0d1b5c8e684d3908b2156b504e89","user":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?v=3","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"repo":{"id":1125389,"name":"alaveteli","full_name":"mysociety/alaveteli","owner":{"login":"mysociety","id":141338,"avatar_url":"https://avatars.githubusercontent.com/u/141338?v=3","gravatar_id":"","url":"https://api.github.com/users/mysociety","html_url":"https://github.com/mysociety","followers_url":"https://api.github.com/users/mysociety/followers","following_url":"https://api.github.com/users/mysociety/following{/other_user}","gists_url":"https://api.github.com/users/mysociety/gists{/gist_id}","starred_url":"https://api.github.com/users/mysociety/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mysociety/subscriptions","organizations_url":"https://api.github.com/users/mysociety/orgs","repos_url":"https://api.github.com/users/mysociety/repos","events_url":"https://api.github.com/users/mysociety/events{/privacy}","received_events_url":"https://api.github.com/users/mysociety/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mysociety/alaveteli","description":"Provide a Freedom of Information request system for your jurisdiction","fork":false,"url":"https://api.github.com/repos/mysociety/alaveteli","forks_url":"https://api.github.com/repos/mysociety/alaveteli/forks","keys_url":"https://api.github.com/repos/mysociety/alaveteli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mysociety/alaveteli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mysociety/alaveteli/teams","hooks_url":"https://api.github.com/repos/mysociety/alaveteli/hooks","issue_events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/events{/number}","events_url":"https://api.github.com/repos/mysociety/alaveteli/events","assignees_url":"https://api.github.com/repos/mysociety/alaveteli/assignees{/user}","branches_url":"https://api.github.com/repos/mysociety/alaveteli/branches{/branch}","tags_url":"https://api.github.com/repos/mysociety/alaveteli/tags","blobs_url":"https://api.github.com/repos/mysociety/alaveteli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mysociety/alaveteli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mysociety/alaveteli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mysociety/alaveteli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mysociety/alaveteli/statuses/{sha}","languages_url":"https://api.github.com/repos/mysociety/alaveteli/languages","stargazers_url":"https://api.github.com/repos/mysociety/alaveteli/stargazers","contributors_url":"https://api.github.com/repos/mysociety/alaveteli/contributors","subscribers_url":"https://api.github.com/repos/mysociety/alaveteli/subscribers","subscription_url":"https://api.github.com/repos/mysociety/alaveteli/subscription","commits_url":"https://api.github.com/repos/mysociety/alaveteli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mysociety/alaveteli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mysociety/alaveteli/contents/{+path}","compare_url":"https://api.github.com/repos/mysociety/alaveteli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mysociety/alaveteli/merges","archive_url":"https://api.github.com/repos/mysociety/alaveteli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mysociety/alaveteli/downloads","issues_url":"https://api.github.com/repos/mysociety/alaveteli/issues{/number}","pulls_url":"https://api.github.com/repos/mysociety/alaveteli/pulls{/number}","milestones_url":"https://api.github.com/repos/mysociety/alaveteli/milestones{/number}","notifications_url":"https://api.github.com/repos/mysociety/alaveteli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mysociety/alaveteli/labels{/name}","releases_url":"https://api.github.com/repos/mysociety/alaveteli/releases{/id}","deployments_url":"https://api.github.com/repos/mysociety/alaveteli/deployments","created_at":"2010-11-30T13:11:39Z","updated_at":"2016-08-30T10:08:33Z","pushed_at":"2016-09-02T08:31:30Z","git_url":"git://github.com/mysociety/alaveteli.git","ssh_url":"git@github.com:mysociety/alaveteli.git","clone_url":"https://github.com/mysociety/alaveteli.git","svn_url":"https://github.com/mysociety/alaveteli","homepage":"http://alaveteli.org","size":118344,"stargazers_count":176,"watchers_count":176,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":117,"mirror_url":null,"open_issues_count":782,"forks":117,"open_issues":782,"watchers":176,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451"},"html":{"href":"https://github.com/mysociety/alaveteli/pull/3451"},"issue":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/3451"},"comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/issues/3451/comments"},"review_comments":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451/comments"},"review_comment":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mysociety/alaveteli/pulls/3451/commits"},"statuses":{"href":"https://api.github.com/repos/mysociety/alaveteli/statuses/d922b66086465ef9317aae1902c59a11041d223c"}}}}
{"actor":{"display_login":"houndci-bot"}}