{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/24845115","id":24845115,"diff_hunk":"@@ -44,20 +45,31 @@\n                     <!-- Flashed Messages -->\n                     <div data-bind=\"html: message, attr: {class: messageClass}\"></div>\n             </div><!--view model scope ends -->\n-            </div>\n+        </div>\n+        <div class=\"panel panel-default\">\n+            <div class=\"panel-heading\"><h3 class=\"panel-title\">Configure Notification Preferences</h3></div>\n+                <form id=\"selectNotifications\">\n+                    <div id=\"grid\"></div>\n+                </form>\n+        </div>\n     </div>\n </div>\n </%def>\n \n <%def name=\"javascript()\">\n     <% import website %>\n+    <% import json %>\n     ${parent.javascript()}\n     <script type=\"text/javascript\">\n-        window.contextVars = $.extend({}, window.contextVars, {'mailingList': '${website.settings.MAILCHIMP_GENERAL_LIST}'});\n+        window.contextVars = $.extend({}, window.contextVars, {'mailingList': '${website.settings.MAILCHIMP_GENERAL_LIST}',\n+                                                               'notificationsData': ${json.dumps(notifications_data)}","path":"website/templates/profile/notifications.mako","position":31,"original_position":31,"commit_id":"4a1a980d9607b6b150666e7bf10631b08c90b9e8","original_commit_id":"4a1a980d9607b6b150666e7bf10631b08c90b9e8","user":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"body":"Once you've added an endpoint to `GET /api/v/subscriptions/` (see previous comment), this should no longer be necessary.","created_at":"2015-02-17T19:25:52Z","updated_at":"2015-02-17T19:25:52Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1772#discussion_r24845115","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/24845115"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1772#discussion_r24845115"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772","id":29194891,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/1772","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/1772.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/1772.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1772","number":1772,"state":"open","locked":false,"title":"Feature: OSF Email Notifications","user":{"login":"samanehsan","id":6414394,"avatar_url":"https://avatars.githubusercontent.com/u/6414394?v=3","gravatar_id":"","url":"https://api.github.com/users/samanehsan","html_url":"https://github.com/samanehsan","followers_url":"https://api.github.com/users/samanehsan/followers","following_url":"https://api.github.com/users/samanehsan/following{/other_user}","gists_url":"https://api.github.com/users/samanehsan/gists{/gist_id}","starred_url":"https://api.github.com/users/samanehsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanehsan/subscriptions","organizations_url":"https://api.github.com/users/samanehsan/orgs","repos_url":"https://api.github.com/users/samanehsan/repos","events_url":"https://api.github.com/users/samanehsan/events{/privacy}","received_events_url":"https://api.github.com/users/samanehsan/received_events","type":"User","site_admin":false},"body":"TODO: \r\n- [ ] Integrate html email templates by @caneruguz \r\n- [x] Finish writing tests\r\n- [x] Fix line height/placement of event titles in treebeard\r\n- [x] Refactor logic used in multiple locations into separate functions:\r\n - [x] getting all user subscriptions for a single node \r\n - [x] removing user from a subscription\r\n- [x] Use celery for sending emails","created_at":"2015-02-12T16:46:38Z","updated_at":"2015-02-17T19:25:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c2c81d4bc35ddfdd5e1979e9c8250cf28bcfad01","assignee":null,"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/24","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/24/labels","id":983320,"number":24,"title":"0.27.0","description":"","creator":{"login":"sloria","id":2379650,"avatar_url":"https://avatars.githubusercontent.com/u/2379650?v=3","gravatar_id":"","url":"https://api.github.com/users/sloria","html_url":"https://github.com/sloria","followers_url":"https://api.github.com/users/sloria/followers","following_url":"https://api.github.com/users/sloria/following{/other_user}","gists_url":"https://api.github.com/users/sloria/gists{/gist_id}","starred_url":"https://api.github.com/users/sloria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloria/subscriptions","organizations_url":"https://api.github.com/users/sloria/orgs","repos_url":"https://api.github.com/users/sloria/repos","events_url":"https://api.github.com/users/sloria/events{/privacy}","received_events_url":"https://api.github.com/users/sloria/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":0,"state":"open","created_at":"2015-02-17T18:17:25Z","updated_at":"2015-02-17T18:31:22Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/{number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1772/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/4a1a980d9607b6b150666e7bf10631b08c90b9e8","head":{"label":"samanehsan:feature/notifications","ref":"feature/notifications","sha":"4a1a980d9607b6b150666e7bf10631b08c90b9e8","user":{"login":"samanehsan","id":6414394,"avatar_url":"https://avatars.githubusercontent.com/u/6414394?v=3","gravatar_id":"","url":"https://api.github.com/users/samanehsan","html_url":"https://github.com/samanehsan","followers_url":"https://api.github.com/users/samanehsan/followers","following_url":"https://api.github.com/users/samanehsan/following{/other_user}","gists_url":"https://api.github.com/users/samanehsan/gists{/gist_id}","starred_url":"https://api.github.com/users/samanehsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanehsan/subscriptions","organizations_url":"https://api.github.com/users/samanehsan/orgs","repos_url":"https://api.github.com/users/samanehsan/repos","events_url":"https://api.github.com/users/samanehsan/events{/privacy}","received_events_url":"https://api.github.com/users/samanehsan/received_events","type":"User","site_admin":false},"repo":{"id":26921095,"name":"osf.io","full_name":"samanehsan/osf.io","owner":{"login":"samanehsan","id":6414394,"avatar_url":"https://avatars.githubusercontent.com/u/6414394?v=3","gravatar_id":"","url":"https://api.github.com/users/samanehsan","html_url":"https://github.com/samanehsan","followers_url":"https://api.github.com/users/samanehsan/followers","following_url":"https://api.github.com/users/samanehsan/following{/other_user}","gists_url":"https://api.github.com/users/samanehsan/gists{/gist_id}","starred_url":"https://api.github.com/users/samanehsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samanehsan/subscriptions","organizations_url":"https://api.github.com/users/samanehsan/orgs","repos_url":"https://api.github.com/users/samanehsan/repos","events_url":"https://api.github.com/users/samanehsan/events{/privacy}","received_events_url":"https://api.github.com/users/samanehsan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samanehsan/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/samanehsan/osf.io","forks_url":"https://api.github.com/repos/samanehsan/osf.io/forks","keys_url":"https://api.github.com/repos/samanehsan/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samanehsan/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samanehsan/osf.io/teams","hooks_url":"https://api.github.com/repos/samanehsan/osf.io/hooks","issue_events_url":"https://api.github.com/repos/samanehsan/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/samanehsan/osf.io/events","assignees_url":"https://api.github.com/repos/samanehsan/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/samanehsan/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/samanehsan/osf.io/tags","blobs_url":"https://api.github.com/repos/samanehsan/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samanehsan/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samanehsan/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/samanehsan/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samanehsan/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/samanehsan/osf.io/languages","stargazers_url":"https://api.github.com/repos/samanehsan/osf.io/stargazers","contributors_url":"https://api.github.com/repos/samanehsan/osf.io/contributors","subscribers_url":"https://api.github.com/repos/samanehsan/osf.io/subscribers","subscription_url":"https://api.github.com/repos/samanehsan/osf.io/subscription","commits_url":"https://api.github.com/repos/samanehsan/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/samanehsan/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/samanehsan/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/samanehsan/osf.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/samanehsan/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/samanehsan/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samanehsan/osf.io/merges","archive_url":"https://api.github.com/repos/samanehsan/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samanehsan/osf.io/downloads","issues_url":"https://api.github.com/repos/samanehsan/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/samanehsan/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/samanehsan/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/samanehsan/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samanehsan/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/samanehsan/osf.io/releases{/id}","created_at":"2014-11-20T16:27:37Z","updated_at":"2014-12-16T16:49:09Z","pushed_at":"2015-02-17T16:34:49Z","git_url":"git://github.com/samanehsan/osf.io.git","ssh_url":"git@github.com:samanehsan/osf.io.git","clone_url":"https://github.com/samanehsan/osf.io.git","svn_url":"https://github.com/samanehsan/osf.io","homepage":"http://osf.io","size":76084,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"CenterForOpenScience:develop","ref":"develop","sha":"1d4166fe9329e60c1a2abc98ba098c62dcf4d4e5","user":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"repo":{"id":10199599,"name":"osf.io","full_name":"CenterForOpenScience/osf.io","owner":{"login":"CenterForOpenScience","id":3344584,"avatar_url":"https://avatars.githubusercontent.com/u/3344584?v=3","gravatar_id":"","url":"https://api.github.com/users/CenterForOpenScience","html_url":"https://github.com/CenterForOpenScience","followers_url":"https://api.github.com/users/CenterForOpenScience/followers","following_url":"https://api.github.com/users/CenterForOpenScience/following{/other_user}","gists_url":"https://api.github.com/users/CenterForOpenScience/gists{/gist_id}","starred_url":"https://api.github.com/users/CenterForOpenScience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CenterForOpenScience/subscriptions","organizations_url":"https://api.github.com/users/CenterForOpenScience/orgs","repos_url":"https://api.github.com/users/CenterForOpenScience/repos","events_url":"https://api.github.com/users/CenterForOpenScience/events{/privacy}","received_events_url":"https://api.github.com/users/CenterForOpenScience/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CenterForOpenScience/osf.io","description":"Facilitating Open Science","fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/osf.io","forks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/comments/{number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/releases{/id}","created_at":"2013-05-21T15:53:37Z","updated_at":"2015-02-17T17:51:04Z","pushed_at":"2015-02-17T17:54:41Z","git_url":"git://github.com/CenterForOpenScience/osf.io.git","ssh_url":"git@github.com:CenterForOpenScience/osf.io.git","clone_url":"https://github.com/CenterForOpenScience/osf.io.git","svn_url":"https://github.com/CenterForOpenScience/osf.io","homepage":"http://osf.io","size":86287,"stargazers_count":70,"watchers_count":70,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":352,"forks":45,"open_issues":352,"watchers":70,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/1772"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1772"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/1772/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/1772/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/4a1a980d9607b6b150666e7bf10631b08c90b9e8"}}}}