From bb881c6a7e52a304e1059448929fcf4aa000d755 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 26 2015 10:46:10 +0000 Subject: Move the macro show_comment into the _formhelper file for re-use --- diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html index 2846168..74c22bc 100644 --- a/pagure/templates/_formhelper.html +++ b/pagure/templates/_formhelper.html @@ -60,3 +60,27 @@ {% endfor %} {% endif %} {% endmacro %} + + +{% macro show_comment(user, date, content, id) %} +
+
+ {{ user.user | avatar(16) | safe }} + + {{ user.user }} + - {{ date | humanize}} + + +
+
+ {% autoescape false %} + {{ content | crossref | markdown }} + {% endautoescape %} +
+
+{% endmacro %} diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index e21a625..c6857bb 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -1,32 +1,9 @@ {% extends "repo_master.html" %} -{% from "_formhelper.html" import render_field %} +{% from "_formhelper.html" import render_field, show_comment %} {% block title %}Issue #{{ issueid }} - {{ repo.name }}{% endblock %} {%block tag %}home{% endblock %} -{% macro show_comment(user, date, content, id) %} -
-
- {{ user.user | avatar(16) | safe }} - - {{ user.user }} - - {{ date | humanize}} - - -
-
- {% autoescape false %} - {{ content | crossref | markdown }} - {% endautoescape %} -
-
-{% endmacro %} - {% block repo %} {% if authenticated and form %}