{"action":"created","comment":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/33171539","id":33171539,"diff_hunk":"@@ -198,12 +199,17 @@ var FileViewPage = {\n         $('.file-view-panels').removeClass().addClass('file-view-panels').addClass(fileViewPanelsLayout);\n \n         m.render(document.getElementById('toggleBar'), m('.btn-toolbar[style=margin-top:20px]', [\n-            ctrl.canEdit() ? m('.btn-group', {style: 'margin-left: 0;'}, [\n-                m('.btn.btn-sm.btn-danger.file-delete', {onclick: $(document).trigger.bind($(document), 'fileviewpage:delete')}, 'Delete')\n+            ctrl.viewUrl ? m('.btn-group', {}, [\n+                m('a', {href: ctrl.viewUrl, target: '_blank', class: 'btn btn-sm btn-success'}, 'View ', [","path":"website/static/js/filepage/index.js","position":15,"original_position":15,"commit_id":"3acf934e7d52516a9044c1fafb53237a6efdd426","original_commit_id":"3acf934e7d52516a9044c1fafb53237a6efdd426","user":{"login":"GaryKriebel","id":9437946,"avatar_url":"https://avatars.githubusercontent.com/u/9437946?v=3","gravatar_id":"","url":"https://api.github.com/users/GaryKriebel","html_url":"https://github.com/GaryKriebel","followers_url":"https://api.github.com/users/GaryKriebel/followers","following_url":"https://api.github.com/users/GaryKriebel/following{/other_user}","gists_url":"https://api.github.com/users/GaryKriebel/gists{/gist_id}","starred_url":"https://api.github.com/users/GaryKriebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GaryKriebel/subscriptions","organizations_url":"https://api.github.com/users/GaryKriebel/orgs","repos_url":"https://api.github.com/users/GaryKriebel/repos","events_url":"https://api.github.com/users/GaryKriebel/events{/privacy}","received_events_url":"https://api.github.com/users/GaryKriebel/received_events","type":"User","site_admin":false},"body":"I'll pull the code and give it a look.","created_at":"2015-06-24T17:16:52Z","updated_at":"2015-06-24T17:16:52Z","html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3154#discussion_r33171539","pull_request_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154","_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/comments/33171539"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3154#discussion_r33171539"},"pull_request":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154"}}},"pull_request":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154","id":37822944,"html_url":"https://github.com/CenterForOpenScience/osf.io/pull/3154","diff_url":"https://github.com/CenterForOpenScience/osf.io/pull/3154.diff","patch_url":"https://github.com/CenterForOpenScience/osf.io/pull/3154.patch","issue_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3154","number":3154,"state":"open","locked":false,"title":"[feature] File view page: link to remote location","user":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"body":"#### Purpose\r\n- Adds a button to the file view page which links to the external source url (provided in the file metadata retrieved from WaterButler) for the file being displayed.\r\n- Addresses [#2926](https://github.com/CenterForOpenScience/osf.io/issues/2926)\r\n- Addons Supported:\r\n - [x] GitHub\r\n - [x] Google Drive\r\n - [x] Figshare\r\n - [x] Dropbox\r\n - [x] Box\r\n- Screenshot:\r\n![screen shot 2015-06-17 at 10 53 59 am](https://cloud.githubusercontent.com/assets/7913604/8210266/3592cc54-14df-11e5-9dda-d0f7fbef8ca6.png)\r\n\r\n#### Notes\r\n- Dependent on WaterButler PR [#52](https://github.com/CenterForOpenScience/waterbutler/pull/52)","created_at":"2015-06-16T17:58:02Z","updated_at":"2015-06-24T17:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f4e732dbd3488e98ba075d5b2d1f0b876557f487","assignee":{"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},"milestone":{"url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/40","html_url":"https://github.com/CenterForOpenScience/osf.io/milestones/0.42.0","labels_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/milestones/40/labels","id":1175091,"number":40,"title":"0.42.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":21,"closed_issues":0,"state":"open","created_at":"2015-06-22T13:30:59Z","updated_at":"2015-06-24T16:00:17Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154/commits","review_comments_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154/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/3154/comments","statuses_url":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/3acf934e7d52516a9044c1fafb53237a6efdd426","head":{"label":"caseyrollins:feature/source-urls","ref":"feature/source-urls","sha":"3acf934e7d52516a9044c1fafb53237a6efdd426","user":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"repo":{"id":26963858,"name":"osf.io","full_name":"caseyrollins/osf.io","owner":{"login":"caseyrollins","id":7913604,"avatar_url":"https://avatars.githubusercontent.com/u/7913604?v=3","gravatar_id":"","url":"https://api.github.com/users/caseyrollins","html_url":"https://github.com/caseyrollins","followers_url":"https://api.github.com/users/caseyrollins/followers","following_url":"https://api.github.com/users/caseyrollins/following{/other_user}","gists_url":"https://api.github.com/users/caseyrollins/gists{/gist_id}","starred_url":"https://api.github.com/users/caseyrollins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caseyrollins/subscriptions","organizations_url":"https://api.github.com/users/caseyrollins/orgs","repos_url":"https://api.github.com/users/caseyrollins/repos","events_url":"https://api.github.com/users/caseyrollins/events{/privacy}","received_events_url":"https://api.github.com/users/caseyrollins/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caseyrollins/osf.io","description":"Facilitating Open Science","fork":true,"url":"https://api.github.com/repos/caseyrollins/osf.io","forks_url":"https://api.github.com/repos/caseyrollins/osf.io/forks","keys_url":"https://api.github.com/repos/caseyrollins/osf.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caseyrollins/osf.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caseyrollins/osf.io/teams","hooks_url":"https://api.github.com/repos/caseyrollins/osf.io/hooks","issue_events_url":"https://api.github.com/repos/caseyrollins/osf.io/issues/events{/number}","events_url":"https://api.github.com/repos/caseyrollins/osf.io/events","assignees_url":"https://api.github.com/repos/caseyrollins/osf.io/assignees{/user}","branches_url":"https://api.github.com/repos/caseyrollins/osf.io/branches{/branch}","tags_url":"https://api.github.com/repos/caseyrollins/osf.io/tags","blobs_url":"https://api.github.com/repos/caseyrollins/osf.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caseyrollins/osf.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caseyrollins/osf.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/caseyrollins/osf.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caseyrollins/osf.io/statuses/{sha}","languages_url":"https://api.github.com/repos/caseyrollins/osf.io/languages","stargazers_url":"https://api.github.com/repos/caseyrollins/osf.io/stargazers","contributors_url":"https://api.github.com/repos/caseyrollins/osf.io/contributors","subscribers_url":"https://api.github.com/repos/caseyrollins/osf.io/subscribers","subscription_url":"https://api.github.com/repos/caseyrollins/osf.io/subscription","commits_url":"https://api.github.com/repos/caseyrollins/osf.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/caseyrollins/osf.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/caseyrollins/osf.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/caseyrollins/osf.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/caseyrollins/osf.io/contents/{+path}","compare_url":"https://api.github.com/repos/caseyrollins/osf.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caseyrollins/osf.io/merges","archive_url":"https://api.github.com/repos/caseyrollins/osf.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caseyrollins/osf.io/downloads","issues_url":"https://api.github.com/repos/caseyrollins/osf.io/issues{/number}","pulls_url":"https://api.github.com/repos/caseyrollins/osf.io/pulls{/number}","milestones_url":"https://api.github.com/repos/caseyrollins/osf.io/milestones{/number}","notifications_url":"https://api.github.com/repos/caseyrollins/osf.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caseyrollins/osf.io/labels{/name}","releases_url":"https://api.github.com/repos/caseyrollins/osf.io/releases{/id}","created_at":"2014-11-21T14:49:09Z","updated_at":"2015-04-14T17:57:50Z","pushed_at":"2015-06-23T17:56:52Z","git_url":"git://github.com/caseyrollins/osf.io.git","ssh_url":"git@github.com:caseyrollins/osf.io.git","clone_url":"https://github.com/caseyrollins/osf.io.git","svn_url":"https://github.com/caseyrollins/osf.io","homepage":"http://osf.io","size":93239,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"dcc2e388af3f7b7cdaf075633cf8568d49530e5c","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-06-18T22:11:45Z","pushed_at":"2015-06-24T16:11:35Z","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":211494,"stargazers_count":113,"watchers_count":113,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":462,"forks":99,"open_issues":462,"watchers":113,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154"},"html":{"href":"https://github.com/CenterForOpenScience/osf.io/pull/3154"},"issue":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3154"},"comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/issues/3154/comments"},"review_comments":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/pulls/3154/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/3154/commits"},"statuses":{"href":"https://api.github.com/repos/CenterForOpenScience/osf.io/statuses/3acf934e7d52516a9044c1fafb53237a6efdd426"}}}}