{"action":"created","comment":{"url":"https://api.github.com/repos/ccnmtl/dmt/pulls/comments/24026645","id":24026645,"diff_hunk":"@@ -684,68 +684,50 @@ <h4 class=\"modal-title\" id=\"reassign-label\">Change Owner</h4>\n {% if item.attachment_set.all.count %}\n <h4 class=\"attachment-header\">Attachments</h4>\n \n-<table class=\"table table-condensed item-attachment\">\n-\t<tbody>\n-\t{% for attachment in item.attachment_set.all %}\n-\t<tr>\n-\t\t<td class=\"attachment-thumbnail\">\n-\t\t{% if attachment.image %}\n-\t\t  {% if attachment.url %}\n-\t\t  <img src=\"{{attachment.url}}\" />\n-\t\t  {% else %}\n-\t\t  <img src=\"{{attachment.src}}\" />\n-\t\t  {% endif %}\n-\t\t{% else %}\n-\t\t  <img src=\"/media/img/icon-document.png\" />\n-\t\t{% endif %}\n-\t\t</td>\n-\t\t<td>\n-      <table class=\"table table-condensed\">\n-        <thead>\n-        <tr>\n-          <th>Title</th>\n-          <th>Uploaded by</th>\n-          <th>Date</th>\n-        </tr>\n-        </thead>\n-\t      <tbody>\n-        <tr>\n-          <td>{{attachment.title|default:attachment.filename}}</td>\n-          <td>{{attachment.author.fullname}}</td>\n-          <td>{{attachment.last_mod}}</td>\n-        </tr>\n-\t      </tbody>\n-      </table>\n-      <ul class=\"attachment-action-set clearfix\">\n-        <li class=\"attachment-action\">\n-        {% if attachment.image %}\n-          {% if attachment.url %}\n-          <a href=\"{{attachment.url}}\" class=\"btn btn-default btn-sm\">        <span class=\"glyphicon glyphicon-download\"></span> <span class=\"attachment-action-text\">Download</span></a>\n-          {% else %}\n-          <a href=\"{{attachment.src}}\" class=\"btn btn-default btn-sm\">        <span class=\"glyphicon glyphicon-download\"></span> <span class=\"attachment-action-text\">Download</span></a>\n-          {% endif %}\n+{% for attachment in item.attachment_set.all %}\n+<div class=\"row\">\n+    <div class=\"col-sm-6\">\n+        <div class=\"attachment-thumbnail\">\n+            {% if attachment.image %}\n+            {% if attachment.url %}\n+            <a href=\"{{attachment.url}}\"><img src=\"{{attachment.url}}\" /></a>\n+            {% else %}\n+            <a href=\"{{attachment.src}}\"><img src=\"{{attachment.src}}\" /></a>\n+            {% endif %}\n+            {% else %}\n+            <img src=\"/media/img/icon-document.png\" />\n+            {% endif %}\n+        </div>\n+    </div>\n+    <div class=\"col-sm-6\">\n+        <div class=\"attachment-description\">\n+            {{attachment.description|markdown|emoji_replace}}\n+        </div>\n+        <div class=\"attachment-metadata\">\n+            Uploaded by\n+            <a href=\"{% url 'user_detail' attachment.author.username %}\"\n+               >{{attachment.author.fullname}}</a>\n+            on {{attachment.last_mod}}\n+        </div>\n+        <ul class=\"attachment-action-set clearfix\">\n+            <li class=\"attachment-action\">\n+                <a href=\"{% url 'delete_attachment' attachment.id %}\"\n+                   class=\"btn btn-default btn-sm\"\n+                   title=\"delete attachment\"\n+                   ><span class=\"glyphicon glyphicon-trash\"></span>\n+                    <span class=\"attachment-action-text\">Delete</span></a>\n+            </li>\n+        </ul>\n+        {% if attachment.url %}\n         {% else %}\n-          {% if attachment.url %}\n-          <a href=\"{{attachment.url}}\" class=\"btn btn-default btn-sm\">        <span class=\"glyphicon glyphicon-download\"></span> <span class=\"attachment-action-text\">Download</span></a>\n-          {% endif %}\n+        <div class=\"alert alert-warning\">sorry, DMT does not yet support the old PMT attachments. For now, to view/download this one, you will need to <a href=\"http://pmt.ccnmtl.columbia.edu/item/{{object.iid}}/\">go back to the PMT</a></div>","path":"dmt/templates/main/item_detail.html","position":83,"original_position":83,"commit_id":"f12f8403efd5caf6d0fedc2bfa484732e5201264","original_commit_id":"f12f8403efd5caf6d0fedc2bfa484732e5201264","user":{"login":"sdreher","id":141369,"avatar_url":"https://avatars.githubusercontent.com/u/141369?v=3","gravatar_id":"","url":"https://api.github.com/users/sdreher","html_url":"https://github.com/sdreher","followers_url":"https://api.github.com/users/sdreher/followers","following_url":"https://api.github.com/users/sdreher/following{/other_user}","gists_url":"https://api.github.com/users/sdreher/gists{/gist_id}","starred_url":"https://api.github.com/users/sdreher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sdreher/subscriptions","organizations_url":"https://api.github.com/users/sdreher/orgs","repos_url":"https://api.github.com/users/sdreher/repos","events_url":"https://api.github.com/users/sdreher/events{/privacy}","received_events_url":"https://api.github.com/users/sdreher/received_events","type":"User","site_admin":false},"body":"Can you still \"go back\"?","created_at":"2015-02-03T18:35:05Z","updated_at":"2015-02-03T18:35:05Z","html_url":"https://github.com/ccnmtl/dmt/pull/309#discussion_r24026645","pull_request_url":"https://api.github.com/repos/ccnmtl/dmt/pulls/309","_links":{"self":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/comments/24026645"},"html":{"href":"https://github.com/ccnmtl/dmt/pull/309#discussion_r24026645"},"pull_request":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/309"}}},"pull_request":{"url":"https://api.github.com/repos/ccnmtl/dmt/pulls/309","id":28562271,"html_url":"https://github.com/ccnmtl/dmt/pull/309","diff_url":"https://github.com/ccnmtl/dmt/pull/309.diff","patch_url":"https://github.com/ccnmtl/dmt/pull/309.patch","issue_url":"https://api.github.com/repos/ccnmtl/dmt/issues/309","number":309,"state":"open","locked":false,"title":"Improve attachment display","user":{"login":"nikolas","id":59292,"avatar_url":"https://avatars.githubusercontent.com/u/59292?v=3","gravatar_id":"","url":"https://api.github.com/users/nikolas","html_url":"https://github.com/nikolas","followers_url":"https://api.github.com/users/nikolas/followers","following_url":"https://api.github.com/users/nikolas/following{/other_user}","gists_url":"https://api.github.com/users/nikolas/gists{/gist_id}","starred_url":"https://api.github.com/users/nikolas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikolas/subscriptions","organizations_url":"https://api.github.com/users/nikolas/orgs","repos_url":"https://api.github.com/users/nikolas/repos","events_url":"https://api.github.com/users/nikolas/events{/privacy}","received_events_url":"https://api.github.com/users/nikolas/received_events","type":"User","site_admin":false},"body":"* Attachment image now links to itself\r\n\r\n![2015-02-03-105210_935x531_scrot](https://cloud.githubusercontent.com/assets/59292/6023418/bccd64e2-ab92-11e4-8d7e-1e4756cf3de6.png)\r\n","created_at":"2015-02-03T15:45:00Z","updated_at":"2015-02-03T18:35:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94c003d61801e9e7ffaceee9d4a1184d1cd32b92","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ccnmtl/dmt/pulls/309/commits","review_comments_url":"https://api.github.com/repos/ccnmtl/dmt/pulls/309/comments","review_comment_url":"https://api.github.com/repos/ccnmtl/dmt/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ccnmtl/dmt/issues/309/comments","statuses_url":"https://api.github.com/repos/ccnmtl/dmt/statuses/f12f8403efd5caf6d0fedc2bfa484732e5201264","head":{"label":"ccnmtl:attachment-ui-update","ref":"attachment-ui-update","sha":"f12f8403efd5caf6d0fedc2bfa484732e5201264","user":{"login":"ccnmtl","id":52456,"avatar_url":"https://avatars.githubusercontent.com/u/52456?v=3","gravatar_id":"","url":"https://api.github.com/users/ccnmtl","html_url":"https://github.com/ccnmtl","followers_url":"https://api.github.com/users/ccnmtl/followers","following_url":"https://api.github.com/users/ccnmtl/following{/other_user}","gists_url":"https://api.github.com/users/ccnmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ccnmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccnmtl/subscriptions","organizations_url":"https://api.github.com/users/ccnmtl/orgs","repos_url":"https://api.github.com/users/ccnmtl/repos","events_url":"https://api.github.com/users/ccnmtl/events{/privacy}","received_events_url":"https://api.github.com/users/ccnmtl/received_events","type":"Organization","site_admin":false},"repo":{"id":20538228,"name":"dmt","full_name":"ccnmtl/dmt","owner":{"login":"ccnmtl","id":52456,"avatar_url":"https://avatars.githubusercontent.com/u/52456?v=3","gravatar_id":"","url":"https://api.github.com/users/ccnmtl","html_url":"https://github.com/ccnmtl","followers_url":"https://api.github.com/users/ccnmtl/followers","following_url":"https://api.github.com/users/ccnmtl/following{/other_user}","gists_url":"https://api.github.com/users/ccnmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ccnmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccnmtl/subscriptions","organizations_url":"https://api.github.com/users/ccnmtl/orgs","repos_url":"https://api.github.com/users/ccnmtl/repos","events_url":"https://api.github.com/users/ccnmtl/events{/privacy}","received_events_url":"https://api.github.com/users/ccnmtl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ccnmtl/dmt","description":"django port of our PMT","fork":false,"url":"https://api.github.com/repos/ccnmtl/dmt","forks_url":"https://api.github.com/repos/ccnmtl/dmt/forks","keys_url":"https://api.github.com/repos/ccnmtl/dmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ccnmtl/dmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ccnmtl/dmt/teams","hooks_url":"https://api.github.com/repos/ccnmtl/dmt/hooks","issue_events_url":"https://api.github.com/repos/ccnmtl/dmt/issues/events{/number}","events_url":"https://api.github.com/repos/ccnmtl/dmt/events","assignees_url":"https://api.github.com/repos/ccnmtl/dmt/assignees{/user}","branches_url":"https://api.github.com/repos/ccnmtl/dmt/branches{/branch}","tags_url":"https://api.github.com/repos/ccnmtl/dmt/tags","blobs_url":"https://api.github.com/repos/ccnmtl/dmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ccnmtl/dmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ccnmtl/dmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/ccnmtl/dmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ccnmtl/dmt/statuses/{sha}","languages_url":"https://api.github.com/repos/ccnmtl/dmt/languages","stargazers_url":"https://api.github.com/repos/ccnmtl/dmt/stargazers","contributors_url":"https://api.github.com/repos/ccnmtl/dmt/contributors","subscribers_url":"https://api.github.com/repos/ccnmtl/dmt/subscribers","subscription_url":"https://api.github.com/repos/ccnmtl/dmt/subscription","commits_url":"https://api.github.com/repos/ccnmtl/dmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/ccnmtl/dmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/ccnmtl/dmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/ccnmtl/dmt/issues/comments/{number}","contents_url":"https://api.github.com/repos/ccnmtl/dmt/contents/{+path}","compare_url":"https://api.github.com/repos/ccnmtl/dmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ccnmtl/dmt/merges","archive_url":"https://api.github.com/repos/ccnmtl/dmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ccnmtl/dmt/downloads","issues_url":"https://api.github.com/repos/ccnmtl/dmt/issues{/number}","pulls_url":"https://api.github.com/repos/ccnmtl/dmt/pulls{/number}","milestones_url":"https://api.github.com/repos/ccnmtl/dmt/milestones{/number}","notifications_url":"https://api.github.com/repos/ccnmtl/dmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ccnmtl/dmt/labels{/name}","releases_url":"https://api.github.com/repos/ccnmtl/dmt/releases{/id}","created_at":"2014-06-05T19:24:31Z","updated_at":"2015-02-02T19:16:43Z","pushed_at":"2015-02-03T15:51:33Z","git_url":"git://github.com/ccnmtl/dmt.git","ssh_url":"git@github.com:ccnmtl/dmt.git","clone_url":"https://github.com/ccnmtl/dmt.git","svn_url":"https://github.com/ccnmtl/dmt","homepage":null,"size":47610,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ccnmtl:master","ref":"master","sha":"76e801715a91ede706381dbb8ef5f1e631cc0a5f","user":{"login":"ccnmtl","id":52456,"avatar_url":"https://avatars.githubusercontent.com/u/52456?v=3","gravatar_id":"","url":"https://api.github.com/users/ccnmtl","html_url":"https://github.com/ccnmtl","followers_url":"https://api.github.com/users/ccnmtl/followers","following_url":"https://api.github.com/users/ccnmtl/following{/other_user}","gists_url":"https://api.github.com/users/ccnmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ccnmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccnmtl/subscriptions","organizations_url":"https://api.github.com/users/ccnmtl/orgs","repos_url":"https://api.github.com/users/ccnmtl/repos","events_url":"https://api.github.com/users/ccnmtl/events{/privacy}","received_events_url":"https://api.github.com/users/ccnmtl/received_events","type":"Organization","site_admin":false},"repo":{"id":20538228,"name":"dmt","full_name":"ccnmtl/dmt","owner":{"login":"ccnmtl","id":52456,"avatar_url":"https://avatars.githubusercontent.com/u/52456?v=3","gravatar_id":"","url":"https://api.github.com/users/ccnmtl","html_url":"https://github.com/ccnmtl","followers_url":"https://api.github.com/users/ccnmtl/followers","following_url":"https://api.github.com/users/ccnmtl/following{/other_user}","gists_url":"https://api.github.com/users/ccnmtl/gists{/gist_id}","starred_url":"https://api.github.com/users/ccnmtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccnmtl/subscriptions","organizations_url":"https://api.github.com/users/ccnmtl/orgs","repos_url":"https://api.github.com/users/ccnmtl/repos","events_url":"https://api.github.com/users/ccnmtl/events{/privacy}","received_events_url":"https://api.github.com/users/ccnmtl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ccnmtl/dmt","description":"django port of our PMT","fork":false,"url":"https://api.github.com/repos/ccnmtl/dmt","forks_url":"https://api.github.com/repos/ccnmtl/dmt/forks","keys_url":"https://api.github.com/repos/ccnmtl/dmt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ccnmtl/dmt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ccnmtl/dmt/teams","hooks_url":"https://api.github.com/repos/ccnmtl/dmt/hooks","issue_events_url":"https://api.github.com/repos/ccnmtl/dmt/issues/events{/number}","events_url":"https://api.github.com/repos/ccnmtl/dmt/events","assignees_url":"https://api.github.com/repos/ccnmtl/dmt/assignees{/user}","branches_url":"https://api.github.com/repos/ccnmtl/dmt/branches{/branch}","tags_url":"https://api.github.com/repos/ccnmtl/dmt/tags","blobs_url":"https://api.github.com/repos/ccnmtl/dmt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ccnmtl/dmt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ccnmtl/dmt/git/refs{/sha}","trees_url":"https://api.github.com/repos/ccnmtl/dmt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ccnmtl/dmt/statuses/{sha}","languages_url":"https://api.github.com/repos/ccnmtl/dmt/languages","stargazers_url":"https://api.github.com/repos/ccnmtl/dmt/stargazers","contributors_url":"https://api.github.com/repos/ccnmtl/dmt/contributors","subscribers_url":"https://api.github.com/repos/ccnmtl/dmt/subscribers","subscription_url":"https://api.github.com/repos/ccnmtl/dmt/subscription","commits_url":"https://api.github.com/repos/ccnmtl/dmt/commits{/sha}","git_commits_url":"https://api.github.com/repos/ccnmtl/dmt/git/commits{/sha}","comments_url":"https://api.github.com/repos/ccnmtl/dmt/comments{/number}","issue_comment_url":"https://api.github.com/repos/ccnmtl/dmt/issues/comments/{number}","contents_url":"https://api.github.com/repos/ccnmtl/dmt/contents/{+path}","compare_url":"https://api.github.com/repos/ccnmtl/dmt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ccnmtl/dmt/merges","archive_url":"https://api.github.com/repos/ccnmtl/dmt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ccnmtl/dmt/downloads","issues_url":"https://api.github.com/repos/ccnmtl/dmt/issues{/number}","pulls_url":"https://api.github.com/repos/ccnmtl/dmt/pulls{/number}","milestones_url":"https://api.github.com/repos/ccnmtl/dmt/milestones{/number}","notifications_url":"https://api.github.com/repos/ccnmtl/dmt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ccnmtl/dmt/labels{/name}","releases_url":"https://api.github.com/repos/ccnmtl/dmt/releases{/id}","created_at":"2014-06-05T19:24:31Z","updated_at":"2015-02-02T19:16:43Z","pushed_at":"2015-02-03T15:51:33Z","git_url":"git://github.com/ccnmtl/dmt.git","ssh_url":"git@github.com:ccnmtl/dmt.git","clone_url":"https://github.com/ccnmtl/dmt.git","svn_url":"https://github.com/ccnmtl/dmt","homepage":null,"size":47610,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":1,"forks":7,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/309"},"html":{"href":"https://github.com/ccnmtl/dmt/pull/309"},"issue":{"href":"https://api.github.com/repos/ccnmtl/dmt/issues/309"},"comments":{"href":"https://api.github.com/repos/ccnmtl/dmt/issues/309/comments"},"review_comments":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/309/comments"},"review_comment":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ccnmtl/dmt/pulls/309/commits"},"statuses":{"href":"https://api.github.com/repos/ccnmtl/dmt/statuses/f12f8403efd5caf6d0fedc2bfa484732e5201264"}}}}