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

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

Issue 6356070: Metadata editor idea. This is just a dirty sketch that shows how I want to make metaeditor work. (Closed)
Patch Set: Added macros-based meta editor Created 12 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:
View unified diff | Download patch
OLDNEW
1 {# 1 {#
2 Helpers for using flatland with jinja2 to create html forms. 2 Helpers for using flatland with jinja2 to create html forms.
3 3
4 @copyright: Thomas Waldmann, Jason Kirtland, Scott Wilson, Cheer Xiao 4 @copyright: Thomas Waldmann, Jason Kirtland, Scott Wilson, Cheer Xiao
5 @license: see flatland license 5 @license: see flatland license
6 #} 6 #}
7 7
8 {% macro render_errors(field) %} 8 {% macro render_errors(field) %}
9 {% if field.errors %} 9 {% if field.errors %}
10 <ul class="moin-error"> 10 <ul class="moin-error">
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 'text': annotated_input, 43 'text': annotated_input,
44 'url': annotated_input, 44 'url': annotated_input,
45 'email': annotated_input, 45 'email': annotated_input,
46 'password': annotated_input, 46 'password': annotated_input,
47 'file': annotated_input, 47 'file': annotated_input,
48 'checkbox': annotated_input, 48 'checkbox': annotated_input,
49 'multiline_text': multiline_text, 49 'multiline_text': multiline_text,
50 'inline_checkbox': inline_checkbox, 50 'inline_checkbox': inline_checkbox,
51 'any_integer': any_integer, 51 'any_integer': any_integer,
52 'small_natural': small_natural, 52 'small_natural': small_natural,
53 'datetime': datetime,
53 'search': search, 54 'search': search,
54 'submit': raw_input, 55 'submit': raw_input,
55 'hidden': raw_input, 56 'hidden': raw_input,
56 'select': select, 57 'select': select,
57 }[field.properties.widget] or stub -%} 58 }[field.properties.widget] or stub -%}
58 {{ macro(field, *varargs, **kwargs) }} 59 {{ macro(field, *varargs, **kwargs) }}
59 {% endmacro %} 60 {% endmacro %}
60 61
61 {% macro stub(field) %} 62 {% macro stub(field) %}
62 <fieldset> 63 <fieldset>
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 {% macro small_natural(field) %} 125 {% macro small_natural(field) %}
125 {{ gen.label(field) }} 126 {{ gen.label(field) }}
126 <dd> 127 <dd>
127 {% for i in range(field.properties.lower, field.properties.upper+1) %} 128 {% for i in range(field.properties.lower, field.properties.upper+1) %}
128 {{ gen.input(field, type='radio', value=i|string) }} 129 {{ gen.input(field, type='radio', value=i|string) }}
129 {{ _radio_label(field, value=i|string) }} 130 {{ _radio_label(field, value=i|string) }}
130 {% endfor %} 131 {% endfor %}
131 </dd> 132 </dd>
132 {% endmacro %} 133 {% endmacro %}
133 134
135 {% macro datetime(field) %}
136 {{ annotated_input(field, 'text') }}
137 {% endmacro %}
138
134 {% macro search(field) %} 139 {% macro search(field) %}
135 {{ raw_input(field, id='moin-search-query') }} 140 {{ raw_input(field, id='moin-search-query') }}
136 {% endmacro %} 141 {% endmacro %}
137 142
138 {% macro select(field) %} 143 {% macro select(field) %}
139 <dt> 144 <dt>
140 {{ gen.label(field) }} 145 {{ gen.label(field) }}
141 </dt> 146 </dt>
142 <dd> 147 <dd>
143 {{ gen.select.open(field) }} 148 {{ gen.select.open(field) }}
(...skipping 26 matching lines...) Expand all
170 <td class="file_upload_cancel"><button>{{ _("Cancel") }}</button ></td> 175 <td class="file_upload_cancel"><button>{{ _("Cancel") }}</button ></td>
171 <td class="file_name"></td> 176 <td class="file_name"></td>
172 <td class="file_upload_progress"><div></div></td> 177 <td class="file_upload_progress"><div></div></td>
173 </tr> 178 </tr>
174 </table> 179 </table>
175 </div> 180 </div>
176 <link rel="stylesheet" href="{{ url_for('serve.files', name='jquery_file_upl oad', filename='jquery.fileupload-ui.css') }}"> 181 <link rel="stylesheet" href="{{ url_for('serve.files', name='jquery_file_upl oad', filename='jquery.fileupload-ui.css') }}">
177 <script src="{{ url_for('serve.files', name='jquery_file_upload', filename=' jquery.fileupload.js') }}"></script> 182 <script src="{{ url_for('serve.files', name='jquery_file_upload', filename=' jquery.fileupload.js') }}"></script>
178 <script src="{{ url_for('serve.files', name='jquery_file_upload', filename=' jquery.fileupload-ui.js') }}"></script> 183 <script src="{{ url_for('serve.files', name='jquery_file_upload', filename=' jquery.fileupload-ui.js') }}"></script>
179 {% endmacro %} 184 {% endmacro %}
OLDNEW

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