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

Side by Side Diff: MoinMoin/templates/utils.html

Issue 110210043: Improved the item metadata section GUI (Closed)
Patch Set: Correction Created 10 years, 9 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:
View unified diff | Download patch
« no previous file with comments | « MoinMoin/templates/meta.html ('k') | MoinMoin/themes/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {% import 'forms.html' as forms %} 1 {% import 'forms.html' as forms %}
2 2
3 {% macro show_editor_info(info) %} 3 {% macro show_editor_info(info) %}
4 {%- if info.uri -%} 4 {%- if info.uri -%}
5 <a href="{{ info.uri }}" class="{{ info.css }}" title="{{ info.title }}"> 5 <a href="{{ info.uri }}" class="{{ info.css }}" title="{{ info.title }}">
6 {%- elif info.email -%} 6 {%- elif info.email -%}
7 <a href="mailto:{{ info.email }}" class="{{ info.css }}" title="{{ info.ti tle }}"> 7 <a href="mailto:{{ info.email }}" class="{{ info.css }}" title="{{ info.ti tle }}">
8 {%- else -%} 8 {%- else -%}
9 <span class="{{ info.css }}" title="{{ info.title }}"> 9 <span class="{{ info.css }}" title="{{ info.title }}">
10 {%- endif -%} 10 {%- endif -%}
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 {% endif %} 94 {% endif %}
95 {% endmacro %} 95 {% endmacro %}
96 96
97 {% macro header_search(form) %} 97 {% macro header_search(form) %}
98 {{ gen.form.open(form, id='moin-searchform', method='get', action=url_for('f rontend.search')) }} 98 {{ gen.form.open(form, id='moin-searchform', method='get', action=url_for('f rontend.search')) }}
99 {{ forms.render(form['q']) }} 99 {{ forms.render(form['q']) }}
100 {{ forms.render_submit(form, id='moin-search-submit') }} 100 {{ forms.render_submit(form, id='moin-search-submit') }}
101 {{ forms.render_errors(form) }} 101 {{ forms.render_errors(form) }}
102 {{ gen.form.close() }} 102 {{ gen.form.close() }}
103 {% endmacro %} 103 {% endmacro %}
104
105 {% macro meta_info(meta) %}
106 <!-- Bootstrap classes list-group and list-group-item used to display the metada ta info in an unordered list -->
107 <ul class="list-group">
108 <li class="list-group-item">Action: {{ meta['action'] }}</li>
109 <li class="list-group-item">Address: {{ meta['address'] }}</li>
110 <li class="list-group-item">Comment: '{{ meta['comment'] }}'</li>
111 <li class="list-group-item">Content Type: {{ meta['contenttype']|shorten _ctype }} [{{ meta['contenttype'] }}]</li>
112 <li class="list-group-item">Data ID: {{ meta['dataid'] }}</li>
113 <li class="list-group-item">External Links:
114 {% if meta['externallinks'] %}
115 {% for item in meta['externallinks'] %}
116 <a href="{{ item|safe }}">
117 {{ item }}
118 </a>,
119 {% endfor %}
120 {% else %}
121 (None)
122 {% endif %}
123 </li>
124 <li class="list-group-item">Item ID: {{ meta['itemid'] }}</li>
125 <li class="list-group-item">Item Links:
126 {% if meta['itemlinks'] %}
127 {% for item in meta['itemlinks'] %}
128 <a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.item_exists(item) %}class="moin-nonexistent"{% endif %}>
129 {{ item }}
130 </a>,
131 {% endfor %}
132 {% else %}
133 (None)
134 {% endif %}
135 </li>
136 <li class="list-group-item">Item Transclusions:
137 {% if meta['itemtransclusions'] %}
138 {% for item in meta['itemtransclusions'] %}
139 <a href="{{ url_for('frontend.show_item', item_name=item) }}" {% if not theme_supp.item_exists(item) %}class="moin-nonexistent"{% endif %}>
140 {{ item }}
141 </a>,
142 {% endfor %}
143 {% else %}
144 (None)
145 {% endif %}
146 </li>
147 <li class="list-group-item">Item Type: {{ meta['itemtype'] }}</li>
148 <li class="list-group-item">Modified Time: {{ meta['mtime']|datetimeform at }}</li>
149 <li class="list-group-item">Name:
150 {% if meta['name'] %}
151 {% for name in meta['name'] %}
152 {{ name }}
153 {% endfor %}
154 {% else %}
155 (None)
156 {% endif %}
157 </li>
158 <li class="list-group-item">Old Name:
159 {% if meta['name_old'] %}
160 {% for name in meta['name_old'] %}
161 {{ name }}
162 {% endfor %}
163 {% else %}
164 (None)
165 {% endif %}
166 </li>
167 <li class="list-group-item">Namespace: '{{ meta['namespace'] }}'</li>
168 <li class="list-group-item">Revision ID: {{ meta['revid'] }}</li>
169 <li class="list-group-item">SHA1: {{ meta['sha1'] }}</li>
170 <li class="list-group-item">Size: {{ meta['size']|filesizeformat }}</li>
171 <li class="list-group-item">Summary: '{{ meta['summary'] }}'</li>
172 <li class="list-group-item">Tags:
173 {% if meta['tags'] %}
174 {% for tag in meta['tags'] %}
175 {{ tag }}
176 {% endfor %}
177 {% else %}
178 (None)
179 {% endif %}
180 </li>
181 <li class="list-group-item">Wiki Name: {{ meta['wikiname'] }}</li>
182 </ul>
183 {% endmacro %}
OLDNEW
« no previous file with comments | « MoinMoin/templates/meta.html ('k') | MoinMoin/themes/__init__.py » ('j') | no next file with comments »

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