{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/e-petitions/pulls/comments/31995268","id":31995268,"diff_hunk":"@@ -1,4 +1,12 @@\n-<%= render 'admin/shared/results_per_page', :path => admin_root_path %>\n+<%= form_tag admin_root_path, method: :get, class: 'filter' do %>\n+  <%= radio_button_tag :state, Petition::IN_MODERATION, true %>\n+  <%= label_tag :state_awaiting_moderation, 'awaiting moderation', class: 'radio-button' %>\n+  <%= radio_button_tag :state, Petition::COLLECTING_SPONSORS,  params[:state] == 'collecting sponsors' ? true : false %>","path":"app/views/admin/todolist/index.html.erb","position":5,"original_position":5,"commit_id":"8faf5270f0276d357bb8a2f264be6d88be4a1e8d","original_commit_id":"8faf5270f0276d357bb8a2f264be6d88be4a1e8d","user":{"login":"otlaitil","id":6061086,"avatar_url":"https://avatars.githubusercontent.com/u/6061086?v=3","gravatar_id":"","url":"https://api.github.com/users/otlaitil","html_url":"https://github.com/otlaitil","followers_url":"https://api.github.com/users/otlaitil/followers","following_url":"https://api.github.com/users/otlaitil/following{/other_user}","gists_url":"https://api.github.com/users/otlaitil/gists{/gist_id}","starred_url":"https://api.github.com/users/otlaitil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otlaitil/subscriptions","organizations_url":"https://api.github.com/users/otlaitil/orgs","repos_url":"https://api.github.com/users/otlaitil/repos","events_url":"https://api.github.com/users/otlaitil/events{/privacy}","received_events_url":"https://api.github.com/users/otlaitil/received_events","type":"User","site_admin":false},"body":"Nitpick: you can drop the ` ? true : false ` part :)","created_at":"2015-06-09T09:14:10Z","updated_at":"2015-06-09T09:14:10Z","html_url":"https://github.com/alphagov/e-petitions/pull/109#discussion_r31995268","pull_request_url":"https://api.github.com/repos/alphagov/e-petitions/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/comments/31995268"},"html":{"href":"https://github.com/alphagov/e-petitions/pull/109#discussion_r31995268"},"pull_request":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/e-petitions/pulls/109","id":37225783,"html_url":"https://github.com/alphagov/e-petitions/pull/109","diff_url":"https://github.com/alphagov/e-petitions/pull/109.diff","patch_url":"https://github.com/alphagov/e-petitions/pull/109.patch","issue_url":"https://api.github.com/repos/alphagov/e-petitions/issues/109","number":109,"state":"open","locked":false,"title":"Petitions in sponsorhip in admin view","user":{"login":"mybits","id":5237879,"avatar_url":"https://avatars.githubusercontent.com/u/5237879?v=3","gravatar_id":"","url":"https://api.github.com/users/mybits","html_url":"https://github.com/mybits","followers_url":"https://api.github.com/users/mybits/followers","following_url":"https://api.github.com/users/mybits/following{/other_user}","gists_url":"https://api.github.com/users/mybits/gists{/gist_id}","starred_url":"https://api.github.com/users/mybits/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mybits/subscriptions","organizations_url":"https://api.github.com/users/mybits/orgs","repos_url":"https://api.github.com/users/mybits/repos","events_url":"https://api.github.com/users/mybits/events{/privacy}","received_events_url":"https://api.github.com/users/mybits/received_events","type":"User","site_admin":false},"body":"Admin to be able to filter in todo list page the petitions that are still collecting sponsors. The default list on index page is the list of petitions that await a moderation.\r\nThat PR also fix admin being unable to edit or update a petition that is not in the sponsored state - we want admin to be able to edit/update the petition in pending/validated state. For these states the current status will be displayed on edit petting view page (just to show you're about to edit the petition in non-sponsored state).\r\n\r\nPT: https://www.pivotaltracker.com/n/projects/307301/stories/95523540","created_at":"2015-06-09T07:22:51Z","updated_at":"2015-06-09T09:14:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef30bf58245c38ed2a750fee13a91a1e8b07b915","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/e-petitions/pulls/109/commits","review_comments_url":"https://api.github.com/repos/alphagov/e-petitions/pulls/109/comments","review_comment_url":"https://api.github.com/repos/alphagov/e-petitions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/e-petitions/issues/109/comments","statuses_url":"https://api.github.com/repos/alphagov/e-petitions/statuses/8faf5270f0276d357bb8a2f264be6d88be4a1e8d","head":{"label":"alphagov:petitions-in-sponsorhip-in-admin-view","ref":"petitions-in-sponsorhip-in-admin-view","sha":"8faf5270f0276d357bb8a2f264be6d88be4a1e8d","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":4434819,"name":"e-petitions","full_name":"alphagov/e-petitions","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/e-petitions","description":"This is the code base for the UK Government's e-petitions service (http://epetitions.direct.gov.uk)","fork":false,"url":"https://api.github.com/repos/alphagov/e-petitions","forks_url":"https://api.github.com/repos/alphagov/e-petitions/forks","keys_url":"https://api.github.com/repos/alphagov/e-petitions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/e-petitions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/e-petitions/teams","hooks_url":"https://api.github.com/repos/alphagov/e-petitions/hooks","issue_events_url":"https://api.github.com/repos/alphagov/e-petitions/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/e-petitions/events","assignees_url":"https://api.github.com/repos/alphagov/e-petitions/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/e-petitions/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/e-petitions/tags","blobs_url":"https://api.github.com/repos/alphagov/e-petitions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/e-petitions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/e-petitions/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/e-petitions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/e-petitions/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/e-petitions/languages","stargazers_url":"https://api.github.com/repos/alphagov/e-petitions/stargazers","contributors_url":"https://api.github.com/repos/alphagov/e-petitions/contributors","subscribers_url":"https://api.github.com/repos/alphagov/e-petitions/subscribers","subscription_url":"https://api.github.com/repos/alphagov/e-petitions/subscription","commits_url":"https://api.github.com/repos/alphagov/e-petitions/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/e-petitions/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/e-petitions/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/e-petitions/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/e-petitions/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/e-petitions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/e-petitions/merges","archive_url":"https://api.github.com/repos/alphagov/e-petitions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/e-petitions/downloads","issues_url":"https://api.github.com/repos/alphagov/e-petitions/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/e-petitions/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/e-petitions/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/e-petitions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/e-petitions/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/e-petitions/releases{/id}","created_at":"2012-05-24T16:04:02Z","updated_at":"2015-05-15T08:26:34Z","pushed_at":"2015-06-09T09:12:17Z","git_url":"git://github.com/alphagov/e-petitions.git","ssh_url":"git@github.com:alphagov/e-petitions.git","clone_url":"https://github.com/alphagov/e-petitions.git","svn_url":"https://github.com/alphagov/e-petitions","homepage":"http://epetitions.direct.gov.uk","size":3711,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":5,"forks":9,"open_issues":5,"watchers":18,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"7688062a5dd860403f960eb4471d4e258411b6f9","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":4434819,"name":"e-petitions","full_name":"alphagov/e-petitions","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/e-petitions","description":"This is the code base for the UK Government's e-petitions service (http://epetitions.direct.gov.uk)","fork":false,"url":"https://api.github.com/repos/alphagov/e-petitions","forks_url":"https://api.github.com/repos/alphagov/e-petitions/forks","keys_url":"https://api.github.com/repos/alphagov/e-petitions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/e-petitions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/e-petitions/teams","hooks_url":"https://api.github.com/repos/alphagov/e-petitions/hooks","issue_events_url":"https://api.github.com/repos/alphagov/e-petitions/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/e-petitions/events","assignees_url":"https://api.github.com/repos/alphagov/e-petitions/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/e-petitions/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/e-petitions/tags","blobs_url":"https://api.github.com/repos/alphagov/e-petitions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/e-petitions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/e-petitions/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/e-petitions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/e-petitions/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/e-petitions/languages","stargazers_url":"https://api.github.com/repos/alphagov/e-petitions/stargazers","contributors_url":"https://api.github.com/repos/alphagov/e-petitions/contributors","subscribers_url":"https://api.github.com/repos/alphagov/e-petitions/subscribers","subscription_url":"https://api.github.com/repos/alphagov/e-petitions/subscription","commits_url":"https://api.github.com/repos/alphagov/e-petitions/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/e-petitions/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/e-petitions/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/e-petitions/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/e-petitions/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/e-petitions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/e-petitions/merges","archive_url":"https://api.github.com/repos/alphagov/e-petitions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/e-petitions/downloads","issues_url":"https://api.github.com/repos/alphagov/e-petitions/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/e-petitions/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/e-petitions/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/e-petitions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/e-petitions/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/e-petitions/releases{/id}","created_at":"2012-05-24T16:04:02Z","updated_at":"2015-05-15T08:26:34Z","pushed_at":"2015-06-09T09:12:17Z","git_url":"git://github.com/alphagov/e-petitions.git","ssh_url":"git@github.com:alphagov/e-petitions.git","clone_url":"https://github.com/alphagov/e-petitions.git","svn_url":"https://github.com/alphagov/e-petitions","homepage":"http://epetitions.direct.gov.uk","size":3711,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":5,"forks":9,"open_issues":5,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/109"},"html":{"href":"https://github.com/alphagov/e-petitions/pull/109"},"issue":{"href":"https://api.github.com/repos/alphagov/e-petitions/issues/109"},"comments":{"href":"https://api.github.com/repos/alphagov/e-petitions/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/e-petitions/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/e-petitions/statuses/8faf5270f0276d357bb8a2f264be6d88be4a1e8d"}}}}