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

Delta Between Two Patch Sets: MoinMoin/templates/display_widgets.html

Issue 10889044: Rough TicketIndex implementation
Left Patch Set: ticket/index.html: add an id to the <table>, use <thead> and <tbody> Created 10 years, 8 months ago
Right Patch Set: put display_fields.py under a new schema package Created 10 years, 8 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:
Right: Side by side diff | Download
« no previous file with change/comment | « MoinMoin/schema/display.py ('k') | MoinMoin/templates/ticket/index.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
(no file at all)
1 {#
2 Implementation of metadata field displaying widgets.
3 #}
4
5 {% macro plain(value) %}
6 {{ value }}
7 {% endmacro %}
8
9 {% macro tags(tags) %}
10 <ul class="moin-tags">
11 {% for t in tags %}
12 <li>
13 {{ t }}
14 </li>
15 {% endfor %}
16 </ul>
17 {% endmacro %}
18
19 {% macro reference(itemid) %}
20 {% if itemid %}
21 {% set name = storage.get_item(itemid=itemid).name %}
22 <a href="{{ url_for_item(name) }}"> {{ name }} </a>
23 {% else %}
24 {{ _('(None)') }}
25 {% endif %}
26 {% endmacro %}
27
28 {% macro render(value, widget) %}
29 {%- set macro = {
30 'plain': plain,
31 'tags': tags,
32 'reference': reference,
33 }[widget] or undefined -%}
34 {% if macro is defined %}
35 {{ macro(value, *varargs, **kwargs) }}
36 {% else %}
37 STUB: widget {{ '%r'|format(widget) }} is not implemented. The value is {{ ' %r'|format(value) }}.
38 {% endif %}
39 {% endmacro %}
LEFTRIGHT

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