From aeef222860797652f53b79e49b81cf87e357f20b Mon Sep 17 00:00:00 2001 From: Ryan Lerch Date: Sep 27 2018 08:35:07 +0000 Subject: move attachements to sidebar this moves the attachements listing to the sidebar of the issue page. Fixes #3697 --- diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html index b171be5..50b7897 100644 --- a/pagure/templates/_formhelper.html +++ b/pagure/templates/_formhelper.html @@ -326,39 +326,28 @@ {% endmacro %} {% macro show_attachments(attachments) %} -
-
- Attachments -
- -
-
-
- - {% for attachment in attachments %} - {# - attachment[0] = link - attachment[1] = file name - attachment[2] = display name - attachment[3] = date - attachment[4] = comment id - #} - - {{ attachment[2] }} - {{ attachment[3] }} - {% if attachment[4] is not none %} - Comment - {% else %} - From Issue description - {% endif %} - Download -
-
-
- {% endfor %} -
+
+ {% for attachment in attachments %} + {# + attachment[0] = link + attachment[1] = file name + attachment[2] = display name + attachment[3] = date + attachment[4] = comment id + #} +
+ +
+ Attached {{ attachment[3] | humanize}} + {% if attachment[4] is not none %} + View Comment + {% else %} + View Comment + {% endif %} +
-
+ {% endfor %}
-
{% endmacro %} diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index 3dae173..027241b 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -172,13 +172,6 @@ namespace=repo.namespace, repo=repo.name, issueid=issueid)
- {% if attachments %} -
- {{ show_attachments(attachments) }} -
-
- {% endif %} -
{% if issue.comments %} {% for comment in issue.comments %} @@ -558,6 +551,27 @@ namespace=repo.namespace, repo=repo.name, issueid=issueid) + {% if attachments %} +
+
+
+ Attachments + {{attachments|count}} +
+ {##} +
+ {{ show_attachments(attachments) }} +
+ {% endif %} + {% if g.authenticated %}