Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2813)

Unified Diff: MoinMoin/templates/ticket/base.html

Issue 256840043: ticket comments
Patch Set: created indented comments/replies threads Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « MoinMoin/templates/comments.html ('k') | MoinMoin/templates/ticket/modify.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: MoinMoin/templates/ticket/base.html
===================================================================
--- a/MoinMoin/templates/ticket/base.html
+++ b/MoinMoin/templates/ticket/base.html
@@ -38,6 +38,41 @@
{% endfor %}
{% endmacro %}
+
+{% macro print_comment(comment) %}
+ <div class="comment-content" style="left:{{ comment[1] }}px;">
+ <span class="comment-tip comment-tip-left"></span>
+ <div class="message">
+ <dl id="{{ comment[0].meta['itemid'] }}">
+
+ <div class="message-markup">
+ {{ ((comment[0].meta['content'])) }}
+ </div>
+ <span class="moin-ticket-subtext">
+ <a href="#" class="reply" reply_to={{ comment[0].meta['itemid'] }} refers_to={{ comment[0].meta['refers_to'] }}>reply</a> |
+ <a class="jumper" href="#{{ comment[0].meta['itemid'] }}">{{ comment[0].meta['itemid'][:4] }}</a>
+ {% if comment[0].meta['reply_to'] %}
+ In reply to <a class="jumper" href="#{{ comment[0].meta['reply_to'] }}">{{ comment[0].meta['reply_to'][:4] }}</a>
+ {% endif %}
+ posted by {{ comment[0].meta['author'] }} on {{ datetime.datetime.fromtimestamp(comment[0].meta['mtime']).strftime('%Y-%m-%d %H:%M:%S') }}
+ </span>
+ </dl>
+ </div>
+ </div>
+{% endmacro %}
+
+{% macro render_comments() %}
+ <div class="moin-ticket-comments">
+ {% for root in roots %}
+ {% set comment_tree = build_tree(comments, root, [], 30) %}
+ {{ print_comment([root, 0]) }}
+ {% for comment in comment_tree %}
+ {{ print_comment(comment) }}
+ {% endfor %}
+ {% endfor %}
+ </div>
+{% endmacro %}
+
{% macro subscribe() %}
{% if user.valid and exists %}
<a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }}" class="moin-button" rel="nofollow" title="Switch notifications about item changes on or off">
@@ -146,6 +181,8 @@
{% endblock %}
{% block body_scripts %}
+ {{ super() }}
<script src="{{ url_for('serve.files', name='jquery', filename='jquery.min.js') }}"></script>
<script src="{{ url_for('static', filename='js/search.js') }}"></script>
+ <script src="{{ url_for('static', filename='js/tickets.js') }}"></script>
{% endblock %}
« no previous file with comments | « MoinMoin/templates/comments.html ('k') | MoinMoin/templates/ticket/modify.html » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b