{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/30269382","id":30269382,"diff_hunk":"@@ -0,0 +1,54 @@\n+React = require 'react'\n+PromiseToSetState = require '../lib/promise-to-set-state'\n+talkClient = require '../api/talk'\n+apiClient = require '../api/client'\n+getSubjectLocation = require '../lib/get-subject-location'\n+Paginator = require '../talk/lib/paginator'\n+{Navigation} = require 'react-router'\n+\n+module?.exports = React.createClass\n+  displayName: 'CollectionShow'\n+  mixins: [Navigation, PromiseToSetState]\n+\n+  getInitialState: ->\n+    subjects: []\n+    subjectsMeta: {}\n+    collection: {}\n+\n+  componentWillMount: ->\n+    @setData(1) # start on page 1\n+\n+  subjectsRequest: (page) ->\n+    collection_id = @props.params?.collection_id\n+    apiClient.type('subjects').get({page, collection_id})\n+\n+  collectionRequest: ->\n+    apiClient.type('collections').get({id: +@props.params?.collection_id}).index(0)\n+\n+  setData: (page) ->\n+    @subjectsRequest(page).then (subjects) =>\n+      @setState {subjectsMeta: subjects[0]?.getMeta()}, =>\n+        @promiseToSetState {\n+          collection: @collectionRequest()\n+          subjects: @subjectsRequest(page)\n+          }\n+\n+  goToPage: (n) ->\n+    @transitionTo(@props.path, @props.params, {page: n})\n+    @setData(n)\n+\n+  subject: (d, i) ->\n+    # 'http://' may need to prefix some older subjects...\n+    <img key={i} src={getSubjectLocation(d).src} />","path":"app/collections/show.cjsx","position":42,"original_position":42,"commit_id":"ecd98aded4df2a8afe60b835509e6031c31ac676","original_commit_id":"ecd98aded4df2a8afe60b835509e6031c31ac676","user":{"login":"brian-c","id":464389,"avatar_url":"https://avatars.githubusercontent.com/u/464389?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-c","html_url":"https://github.com/brian-c","followers_url":"https://api.github.com/users/brian-c/followers","following_url":"https://api.github.com/users/brian-c/following{/other_user}","gists_url":"https://api.github.com/users/brian-c/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-c/subscriptions","organizations_url":"https://api.github.com/users/brian-c/orgs","repos_url":"https://api.github.com/users/brian-c/repos","events_url":"https://api.github.com/users/brian-c/events{/privacy}","received_events_url":"https://api.github.com/users/brian-c/received_events","type":"User","site_admin":false},"body":"Could this be a link to the subject discussion page?","created_at":"2015-05-13T19:58:05Z","updated_at":"2015-05-13T19:58:05Z","html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/314#discussion_r30269382","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments/30269382"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/314#discussion_r30269382"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314","id":35342550,"html_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/314","diff_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/314.diff","patch_url":"https://github.com/zooniverse/Panoptes-Front-End/pull/314.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/314","number":314,"state":"open","locked":false,"title":"Add favoriting, and start working towards collections features","user":{"login":"aweiksnar","id":4039480,"avatar_url":"https://avatars.githubusercontent.com/u/4039480?v=3","gravatar_id":"","url":"https://api.github.com/users/aweiksnar","html_url":"https://github.com/aweiksnar","followers_url":"https://api.github.com/users/aweiksnar/followers","following_url":"https://api.github.com/users/aweiksnar/following{/other_user}","gists_url":"https://api.github.com/users/aweiksnar/gists{/gist_id}","starred_url":"https://api.github.com/users/aweiksnar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aweiksnar/subscriptions","organizations_url":"https://api.github.com/users/aweiksnar/orgs","repos_url":"https://api.github.com/users/aweiksnar/repos","events_url":"https://api.github.com/users/aweiksnar/events{/privacy}","received_events_url":"https://api.github.com/users/aweiksnar/received_events","type":"User","site_admin":false},"body":"- Adds a favorite button \r\n  - It takes in a single 'subject' prop and handles itself from there\r\n  - The code for this feels overly verbose / fragile. Any objections if I try bringing in flux or some other layer for components like this?\r\n- Lets users (moderators) edit the permissions of their board via a group of radio buttons \r\n- Standardizes a bunch of errors to just throw the error message\r\n- A very raw collections view (/collections or collections/:id), just a paginated list of subjects right now\r\n  - You should see a favorites collection pop up here with any added subjects\r\n  - the form here was for dev, but I'd like to build it out it for general collections use\r\n","created_at":"2015-05-13T16:00:52Z","updated_at":"2015-05-13T19:58:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c34a8283892c35842cf444653b92b8b9647512c2","assignee":{"login":"brian-c","id":464389,"avatar_url":"https://avatars.githubusercontent.com/u/464389?v=3","gravatar_id":"","url":"https://api.github.com/users/brian-c","html_url":"https://github.com/brian-c","followers_url":"https://api.github.com/users/brian-c/followers","following_url":"https://api.github.com/users/brian-c/following{/other_user}","gists_url":"https://api.github.com/users/brian-c/gists{/gist_id}","starred_url":"https://api.github.com/users/brian-c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brian-c/subscriptions","organizations_url":"https://api.github.com/users/brian-c/orgs","repos_url":"https://api.github.com/users/brian-c/repos","events_url":"https://api.github.com/users/brian-c/events{/privacy}","received_events_url":"https://api.github.com/users/brian-c/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/314/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/ecd98aded4df2a8afe60b835509e6031c31ac676","head":{"label":"zooniverse:favoriting-and-cleanup","ref":"favoriting-and-cleanup","sha":"ecd98aded4df2a8afe60b835509e6031c31ac676","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19498290,"name":"Panoptes-Front-End","full_name":"zooniverse/Panoptes-Front-End","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes-Front-End","description":"Frontend for zooniverse/Panoptes","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","forks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/releases{/id}","created_at":"2014-05-06T14:53:43Z","updated_at":"2015-05-08T16:04:36Z","pushed_at":"2015-05-13T19:15:43Z","git_url":"git://github.com/zooniverse/Panoptes-Front-End.git","ssh_url":"git@github.com:zooniverse/Panoptes-Front-End.git","clone_url":"https://github.com/zooniverse/Panoptes-Front-End.git","svn_url":"https://github.com/zooniverse/Panoptes-Front-End","homepage":"","size":4262,"stargazers_count":8,"watchers_count":8,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":94,"forks":5,"open_issues":94,"watchers":8,"default_branch":"master"}},"base":{"label":"zooniverse:master","ref":"master","sha":"8ff1114b7465d7585969d4c0f60560b8f1e8c5bb","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19498290,"name":"Panoptes-Front-End","full_name":"zooniverse/Panoptes-Front-End","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes-Front-End","description":"Frontend for zooniverse/Panoptes","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End","forks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/releases{/id}","created_at":"2014-05-06T14:53:43Z","updated_at":"2015-05-08T16:04:36Z","pushed_at":"2015-05-13T19:15:43Z","git_url":"git://github.com/zooniverse/Panoptes-Front-End.git","ssh_url":"git@github.com:zooniverse/Panoptes-Front-End.git","clone_url":"https://github.com/zooniverse/Panoptes-Front-End.git","svn_url":"https://github.com/zooniverse/Panoptes-Front-End","homepage":"","size":4262,"stargazers_count":8,"watchers_count":8,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":94,"forks":5,"open_issues":94,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314"},"html":{"href":"https://github.com/zooniverse/Panoptes-Front-End/pull/314"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/314"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/issues/314/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/pulls/314/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes-Front-End/statuses/ecd98aded4df2a8afe60b835509e6031c31ac676"}}}}