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

Delta Between Two Patch Sets: MoinMoin/templates/ticket/base.html

Issue 256840043: ticket comments
Left Patch Set: fixed rendering of datetime Created 8 years, 8 months ago
Right Patch Set: created indented comments/replies threads Created 8 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « MoinMoin/templates/comments.html ('k') | MoinMoin/templates/ticket/modify.html » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 {% import "forms.html" as forms %} 1 {% import "forms.html" as forms %}
2 {% extends theme("layout.html") %} 2 {% extends theme("layout.html") %}
3 3
4 {% macro render_meta() %} 4 {% macro render_meta() %}
5 {% for e in [ 5 {% for e in [
6 'effort', 6 'effort',
7 'difficulty', 7 'difficulty',
8 'severity', 8 'severity',
9 'priority', 9 'priority',
10 'tags', 10 'tags',
(...skipping 21 matching lines...) Expand all
32 {% for e in [ 32 {% for e in [
33 'supersedes', 33 'supersedes',
34 'required_by', 34 'required_by',
35 'subscribers', 35 'subscribers',
36 ] %} 36 ] %}
37 {{ forms.render(form['backrefs'][e]) }} 37 {{ forms.render(form['backrefs'][e]) }}
38 {% endfor %} 38 {% endfor %}
39 {% endmacro %} 39 {% endmacro %}
40 40
41 41
42 {% macro render_comment(comment) %} 42 {% macro print_comment(comment) %}
43 <div class="comments"> 43 <div class="comment-content" style="left:{{ comment[1] }}px;">
44 {% set comment_number = 1 %} 44 <span class="comment-tip comment-tip-left"></span>
45 {% for comment in comments %} 45 <div class="message">
46 <div class="comment-content"> 46 <dl id="{{ comment[0].meta['itemid'] }}">
47 <dl id="{{ comment.meta['itemid'] }}"> 47
48 <p> 48 <div class="message-markup">
49 <b>comment {{ comment_number }}:</b> 49 {{ ((comment[0].meta['content'])) }}
50 {% if comment.meta['reply_to'] %} 50 </div>
51 <code>In reply to <a class="jumper" href="#{{ co mment.meta['reply_to'] }}">{{ comment.meta['reply_to'][:4] }}</a></code> 51 <span class="moin-ticket-subtext">
52 {% endif %} 52 <a href="#" class="reply" reply_to={{ comment[0].meta['itemi d'] }} refers_to={{ comment[0].meta['refers_to'] }}>reply</a> |·
53 </p> 53 <a class="jumper" href="#{{ comment[0].meta['itemid'] }}">{{ comment[0].meta['itemid'][:4] }}</a>
54 <p>{{ Markup((comment.meta['content'])) }}</p> 54 {% if comment[0].meta['reply_to'] %}
55 <p> 55 In reply to <a class="jumper" href="#{{ comment[0].meta[ 'reply_to'] }}">{{ comment[0].meta['reply_to'][:4] }}</a>
56 <a href="#" class="reply" reply_to={{ comment.meta[' itemid'] }} refers_to={{ comment.meta['refers_to'] }}>reply</a> 56 {% endif %}
57 </p> 57 posted by {{ comment[0].meta['author'] }} on {{ datetime.dat etime.fromtimestamp(comment[0].meta['mtime']).strftime('%Y-%m-%d %H:%M:%S') }}
58 <p class="moin-ticket-subtext"> 58 </span>
59 <a class="jumper" href="#{{ comment.meta['itemid'] }}">{ { comment.meta['itemid'][:4] }}</a> 59 </dl>
60 posted by {{ comment.meta['author'] }} on {{ datetim e.datetime.fromtimestamp(comment.meta['mtime']).strftime('%Y-%m-%d %H:%M:%S') }} 60 </div>
61 </p> 61 </div>
62 </dl> 62 {% endmacro %}
63 {% set comment_number = comment_number + 1 %} 63
64 </div> 64 {% macro render_comments() %}
65 <div class="moin-ticket-comments">
66 {% for root in roots %}
67 {% set comment_tree = build_tree(comments, root, [], 30) %}
68 {{ print_comment([root, 0]) }}
69 {% for comment in comment_tree %}
70 {{ print_comment(comment) }}
71 {% endfor %}
65 {% endfor %} 72 {% endfor %}
66 </div> 73 </div>
67 {% endmacro %} 74 {% endmacro %}
68 75
69 {% macro subscribe() %} 76 {% macro subscribe() %}
70 {% if user.valid and exists %} 77 {% if user.valid and exists %}
71 <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }} " class="moin-button" rel="nofollow" title="Switch notifications about item chan ges on or off"> 78 <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }} " class="moin-button" rel="nofollow" title="Switch notifications about item chan ges on or off">
72 <i class="fa fa-envelope fa-fw"></i> 79 <i class="fa fa-envelope fa-fw"></i>
73 {%- if user.is_subscribed_to(item) %} 80 {%- if user.is_subscribed_to(item) %}
74 {{ _('Unsubscribe') }} 81 {{ _('Unsubscribe') }}
75 {%- else %} 82 {%- else %}
76 {{ _('Subscribe') }} 83 {{ _('Subscribe') }}
77 {%- endif %} 84 {%- endif %}
78 </a> 85 </a>
79 {% endif %} 86 {% endif %}
80 {% endmacro %} 87 {% endmacro %}
81 88
82 {% macro subscribe() %} 89 {% macro subscribe() %}
83 {% if user.valid and exists %} 90 {% if user.valid and exists %}
84 <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }} " class="moin-button" rel="nofollow" title="Switch notifications about item chan ges on or off"> 91 <a href="{{ url_for('frontend.subscribe_item', item_name=item.fqname) }} " class="moin-button" rel="nofollow" title="Switch notifications about item chan ges on or off">
85 <i class="fa fa-envelope fa-fw"></i> 92 <i class="fa fa-envelope fa-fw"></i>
86 {%- if user.is_subscribed_to(item) %} 93 {%- if user.is_subscribed_to(item) %}
87 {{ _('Unsubscribe') }} 94 {{ _('Unsubscribe') }}
88 {%- else %} 95 {%- else %}
89 {{ _('Subscribe') }} 96 {{ _('Subscribe') }}
90 {%- endif %} 97 {%- endif %}
91 </a> 98 </a>
92 {% endif %} 99 {% endif %}
100 {% endmacro %}
101
102 {% macro render_file(file) %}
103 <div>
104 <a href="{{ url_for('.show_item', item_name=file.fullname) }}"
105 class="{{ file.meta['contenttype']|contenttype_to_class }} moin-itemt ype-{{ file.meta['itemtype'] }} moin-item">
106 </a>
107 <a href="{{ url_for('.download_item', item_name=file.fullname) }}" title ="{{ file.relname }}">
108 {{ file.relname|shorten_item_name }}
109 </a>
110 </div>
93 {% endmacro %} 111 {% endmacro %}
94 112
95 {% block head %} 113 {% block head %}
96 {{ super() }} 114 {{ super() }}
97 <link media="all" rel="stylesheet" href="{{ url_for('static', filename='css/ ticket.css') }}" /> 115 <link media="all" rel="stylesheet" href="{{ url_for('static', filename='css/ ticket.css') }}" />
98 {% endblock %} 116 {% endblock %}
99 117
100 {% set exists = item.fqname and storage.get_item(**item.fqname.query) %} 118 {% set exists = item.fqname and storage.get_item(**item.fqname.query) %}
101 {% block local_panel %} 119 {% block local_panel %}
102 {% if user.valid and exists %} 120 {% if user.valid and exists %}
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 {% block footer_itemviews %} 179 {% block footer_itemviews %}
162 {{ itemviews() }} 180 {{ itemviews() }}
163 {% endblock %} 181 {% endblock %}
164 182
165 {% block body_scripts %} 183 {% block body_scripts %}
166 {{ super() }} 184 {{ super() }}
167 <script src="{{ url_for('serve.files', name='jquery', filename='jquery.min.j s') }}"></script> 185 <script src="{{ url_for('serve.files', name='jquery', filename='jquery.min.j s') }}"></script>
168 <script src="{{ url_for('static', filename='js/search.js') }}"></script> 186 <script src="{{ url_for('static', filename='js/search.js') }}"></script>
169 <script src="{{ url_for('static', filename='js/tickets.js') }}"></script> 187 <script src="{{ url_for('static', filename='js/tickets.js') }}"></script>
170 {% endblock %} 188 {% endblock %}
LEFTRIGHT

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