{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/comments/74418656","id":74418656,"diff_hunk":"@@ -1,56 +1,142 @@\n-<div class=\"form\">\n-    <div class=\"form-group\">\n-        <div class=\"input-group\">\n-            <span class=\"input-group-addon\"> User ID </span>\n-            {{input class=\"form-control\" value=newContributorId}}\n+<div class=\"row form\">\n+    <div class=\"col-xs-12 col-sm-6 col-division-right\">\n+        <div class=\"row\">\n+            <div class=\"col-xs-11\">\n+                <form {{action 'findContributors' 1 on='submit'}}>\n+                    <div class=\"input-group search-box\">\n+                        <input type=\"text\" class=\"form-control input-lg searchQuery\" onchange={{action \"updateQuery\" value=\"target.value\"}} placeholder=\"Search by name\">\n+                        <span class=\"input-group-btn\">\n+                            <button class=\"btn btn-default btn-lg\" type=\"button\" {{action 'findContributors' 1}} >\n+                                <i class=\"glyphicon glyphicon-search\"></i>\n+                            </button>\n+                        </span>\n+                    </div>\n+                </form>\n+            </div>\n+        </div>\n+        <div class=\"row\">\n+            <div class=\"col-xs-11\">\n+                {{#if (not (eq addState 'emptyView'))}}\n+                    {{#if (eq addState 'searchView')}}\n+                        <div class=\"unregisteredUsers\">\n+                            <p> Can't find the user you're looking for? </p>\n+                            <button class=\"btn btn-primary btn-small\" {{action \"unregisteredView\"}}> Add an unregistered user </button>\n+                        </div>\n+                        <h3> Results </h3>\n+                        {{#if newSearchResults}}\n+                            <table class=\"table author-table\">\n+                                {{#each newSearchResults as |result|}}\n+                                    <tr>\n+                                        <td>\n+                                            <img class=\"m-l-xs\" src={{result.links.profile_image}} height=40 width=40>\n+                                            <a href={{result.links.html}}> {{result.fullName}} </a>\n+\n+                                        </td>\n+                                        <td> <button class=\"btn btn-success btn-small\" {{action \"addContributor\" result}}> Add </button> </td>\n+                                    </tr>\n+                                {{/each}}\n+                            </table>\n+                        {{else}}\n+                            No results found.\n+                        {{/if}}\n+                        {{#if (gt pages 1)}}\n+                            {{osf-paginator totalSearchResults=totalSearchResults maxPages=5 fetchResults=findContributors query=query}}\n+                        {{/if}}\n+                    {{/if}}\n+                    {{#if (eq addState 'unregisteredView')}}\n+                        <h3> Add Unregistered User </h3>\n+                        <div class=\"user-validation\">\n+                            {{unregistered-contributor-form emptyView=(action 'emptyView') addUnregisteredContributor=(action 'addUnregisteredContributor')}}","path":"app/templates/components/preprint-form-authors.hbs","position":54,"original_position":54,"commit_id":"22503bcc9bb23d3d7111a37344ad8ab0069c98e6","original_commit_id":"a24a41d32ab3e2c90783a9f1cb4998def3bbd178","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"body":"I had just named it the empty view.  There are three possible views here.  This just switched it to the empty view. You're right - it's poorly named.","created_at":"2016-08-11T13:11:54Z","updated_at":"2016-08-11T13:11:54Z","html_url":"https://github.com/CenterForOpenScience/ember-preprints/pull/19#discussion_r74418656","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/comments/74418656"},"html":{"href":"https://github.com/CenterForOpenScience/ember-preprints/pull/19#discussion_r74418656"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19","id":80728699,"html_url":"https://github.com/CenterForOpenScience/ember-preprints/pull/19","diff_url":"https://github.com/CenterForOpenScience/ember-preprints/pull/19.diff","patch_url":"https://github.com/CenterForOpenScience/ember-preprints/pull/19.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/19","number":19,"state":"open","locked":false,"title":"[WIP] Feature/Author Management [PREP-81]","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"body":"<h3> Ticket </h3>\r\nhttps://openscience.atlassian.net/browse/PREP-81\r\n\r\n<h3> Purpose </h3>\r\n\r\nAdds author management for preprints.  \r\n❗ Needs companions ember-osf PR https://github.com/CenterForOpenScience/ember-osf/pull/111, https://github.com/CenterForOpenScience/osf.io/pull/6130, https://github.com/CenterForOpenScience/osf.io/pull/6090\r\n\r\n<h3>  TODO  </h3>\r\n- [x] List contributors\r\n- [x] Add contributors\r\n- [x] Search contributors (currently filtering on v2 users)\r\n- [x] Paginate contributor search results (needs https://github.com/CenterForOpenScience/ember-osf/pull/111)\r\n- [x] Add unregistered contributors\r\n- [x] Update contributors (each modification sends immediate request rather than bulk updates)\r\n- [x] Remove contributors\r\n- [x] Popovers with explanations\r\n- [x] Allow cookie auth to work for creating unregistered contributors https://github.com/CenterForOpenScience/osf.io/pull/6130\r\n- [x] Template logic to minimize requests that will fail (instead of modals informing user that request is not allowed, or allowing request to go through and using growl box).  Disable buttons when clicking will result in failed request.\r\n- [x] Sending emails for unregistered contributors (HOLD - can follow demo)\r\n- [ ] Get rid of hardcoding node in route.\r\n- [ ] Unregistered contributors added here are missing field used to determine permissions checking.  Because this field is missing, if an unregistered contributor is added in the demo, it is possible that some requests may be allowed to go through that would be prevented in the UI otherwise. \r\n- [ ] Drag and drop (API v2 additions pending)\r\n- [ ] Catching API v2 errors\r\n\r\n<h3> Current State</h3>\r\n![screen shot 2016-08-09 at 10 55 19 pm](https://cloud.githubusercontent.com/assets/9755598/17540963/f23ad970-5e88-11e6-9c88-182467fb66ae.png)\r\n","created_at":"2016-08-10T03:20:00Z","updated_at":"2016-08-11T13:11:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa4bcea9f0e9caa6f7024b31b79fdc38dacdf2ff","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19/comments","review_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/19/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/statuses/22503bcc9bb23d3d7111a37344ad8ab0069c98e6","head":{"label":"pattisdr:feature/author-management","ref":"feature/author-management","sha":"22503bcc9bb23d3d7111a37344ad8ab0069c98e6","user":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"repo":{"id":64675120,"name":"ember-preprints","full_name":"pattisdr/ember-preprints","owner":{"login":"pattisdr","id":9755598,"avatar_url":"https://avatars.githubusercontent.com/u/9755598?v=3","gravatar_id":"","url":"https://api.github.com/users/pattisdr","html_url":"https://github.com/pattisdr","followers_url":"https://api.github.com/users/pattisdr/followers","following_url":"https://api.github.com/users/pattisdr/following{/other_user}","gists_url":"https://api.github.com/users/pattisdr/gists{/gist_id}","starred_url":"https://api.github.com/users/pattisdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pattisdr/subscriptions","organizations_url":"https://api.github.com/users/pattisdr/orgs","repos_url":"https://api.github.com/users/pattisdr/repos","events_url":"https://api.github.com/users/pattisdr/events{/privacy}","received_events_url":"https://api.github.com/users/pattisdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pattisdr/ember-preprints","description":null,"fork":true,"url":"https://api.github.com/repos/pattisdr/ember-preprints","forks_url":"https://api.github.com/repos/pattisdr/ember-preprints/forks","keys_url":"https://api.github.com/repos/pattisdr/ember-preprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pattisdr/ember-preprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pattisdr/ember-preprints/teams","hooks_url":"https://api.github.com/repos/pattisdr/ember-preprints/hooks","issue_events_url":"https://api.github.com/repos/pattisdr/ember-preprints/issues/events{/number}","events_url":"https://api.github.com/repos/pattisdr/ember-preprints/events","assignees_url":"https://api.github.com/repos/pattisdr/ember-preprints/assignees{/user}","branches_url":"https://api.github.com/repos/pattisdr/ember-preprints/branches{/branch}","tags_url":"https://api.github.com/repos/pattisdr/ember-preprints/tags","blobs_url":"https://api.github.com/repos/pattisdr/ember-preprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pattisdr/ember-preprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pattisdr/ember-preprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/pattisdr/ember-preprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pattisdr/ember-preprints/statuses/{sha}","languages_url":"https://api.github.com/repos/pattisdr/ember-preprints/languages","stargazers_url":"https://api.github.com/repos/pattisdr/ember-preprints/stargazers","contributors_url":"https://api.github.com/repos/pattisdr/ember-preprints/contributors","subscribers_url":"https://api.github.com/repos/pattisdr/ember-preprints/subscribers","subscription_url":"https://api.github.com/repos/pattisdr/ember-preprints/subscription","commits_url":"https://api.github.com/repos/pattisdr/ember-preprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/pattisdr/ember-preprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/pattisdr/ember-preprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/pattisdr/ember-preprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/pattisdr/ember-preprints/contents/{+path}","compare_url":"https://api.github.com/repos/pattisdr/ember-preprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pattisdr/ember-preprints/merges","archive_url":"https://api.github.com/repos/pattisdr/ember-preprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pattisdr/ember-preprints/downloads","issues_url":"https://api.github.com/repos/pattisdr/ember-preprints/issues{/number}","pulls_url":"https://api.github.com/repos/pattisdr/ember-preprints/pulls{/number}","milestones_url":"https://api.github.com/repos/pattisdr/ember-preprints/milestones{/number}","notifications_url":"https://api.github.com/repos/pattisdr/ember-preprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pattisdr/ember-preprints/labels{/name}","releases_url":"https://api.github.com/repos/pattisdr/ember-preprints/releases{/id}","deployments_url":"https://api.github.com/repos/pattisdr/ember-preprints/deployments","created_at":"2016-08-01T14:45:25Z","updated_at":"2016-08-01T14:45:26Z","pushed_at":"2016-08-10T23:28:40Z","git_url":"git://github.com/pattisdr/ember-preprints.git","ssh_url":"git@github.com:pattisdr/ember-preprints.git","clone_url":"https://github.com/pattisdr/ember-preprints.git","svn_url":"https://github.com/pattisdr/ember-preprints","homepage":null,"size":8560,"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":"dca3e5e84c6d0565de69623ec62a79e10e01892b","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":63790282,"name":"ember-preprints","full_name":"CenterForOpenScience/ember-preprints","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/ember-preprints","description":null,"fork":false,"url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints","forks_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/forks","keys_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/teams","hooks_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/hooks","issue_events_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/events{/number}","events_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/events","assignees_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/assignees{/user}","branches_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/branches{/branch}","tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/tags","blobs_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/git/refs{/sha}","trees_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/statuses/{sha}","languages_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/languages","stargazers_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/stargazers","contributors_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/contributors","subscribers_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/subscribers","subscription_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/subscription","commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/commits{/sha}","git_commits_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/git/commits{/sha}","comments_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/comments{/number}","issue_comment_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/comments{/number}","contents_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/contents/{+path}","compare_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/merges","archive_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/downloads","issues_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues{/number}","pulls_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls{/number}","milestones_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/milestones{/number}","notifications_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/labels{/name}","releases_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/releases{/id}","deployments_url":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/deployments","created_at":"2016-07-20T14:56:36Z","updated_at":"2016-07-20T14:58:52Z","pushed_at":"2016-08-11T04:04:11Z","git_url":"git://github.com/CenterForOpenScience/ember-preprints.git","ssh_url":"git@github.com:CenterForOpenScience/ember-preprints.git","clone_url":"https://github.com/CenterForOpenScience/ember-preprints.git","svn_url":"https://github.com/CenterForOpenScience/ember-preprints","homepage":null,"size":9310,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":7,"forks":10,"open_issues":7,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19"},"html":{"href":"https://github.com/CenterForOpenScience/ember-preprints/pull/19"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/19"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/ember-preprints/statuses/22503bcc9bb23d3d7111a37344ad8ab0069c98e6"}}}}
{"actor":{"display_login":"pattisdr"}}