diff --git a/pagure/templates/_formhelper.html b/pagure/templates/_formhelper.html index cb8a220..bab5e18 100644 --- a/pagure/templates/_formhelper.html +++ b/pagure/templates/_formhelper.html @@ -62,24 +62,38 @@ {% endmacro %} -{% macro show_comment(user, date, content, id) %} +{% macro show_comment(comment, id, repo, username, issueid, form) %}
- {{ user.user | avatar(16) | safe }} - - {{ user.user }} - - {{ date | humanize}} + {{ comment.user.user | avatar(16) | safe }} + + {{ comment.user.user }} + - {{ comment.date_created | humanize}} ΒΆ
{% autoescape false %} - {{ content | markdown }} + {% if id == 0 %} + {{ comment.content | markdown }} + {% else %} + {{ comment.comment | markdown }} + {% endif %} {% endautoescape %}
diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html index c6857bb..bc70d6c 100644 --- a/pagure/templates/issue.html +++ b/pagure/templates/issue.html @@ -4,6 +4,11 @@ {% block title %}Issue #{{ issueid }} - {{ repo.name }}{% endblock %} {%block tag %}home{% endblock %} +{% block header %} + +{% endblock %} + {% block repo %} {% if authenticated and form %} @@ -90,12 +95,11 @@ {% endif %} -{{ show_comment(issue.user, issue.date_created, issue.content, 0) }} +{{ show_comment(issue, 0, repo, username, issueid, form) }} {% if issue.comments %} {% for comment in issue.comments %} - {{ show_comment(comment.user, comment.date_created, comment.comment, - loop.index) }} + {{ show_comment(comment, loop.index, repo, username, issueid, form) }} {% endfor %} {% endif %} diff --git a/tests/test_progit_flask_ui_issues.py b/tests/test_progit_flask_ui_issues.py index dce6193..af4ed7c 100644 --- a/tests/test_progit_flask_ui_issues.py +++ b/tests/test_progit_flask_ui_issues.py @@ -618,7 +618,7 @@ class PagureFlaskIssuestests(tests.Modeltests): self.assertEqual(output.data.count( ''), 1) self.assertEqual(output.data.count( - '
\n ' + '
\n ' '

We should work on this!

'), 1) # Project w/o issue tracker