Mercurial > moin > 2.0
annotate MoinMoin/templates/modify.html @ 1654:5acaea38f1a2
Duplicate templates removed from foobar
author | Jaiditya Mathur <jaiditya.mathur@gmail.com> |
---|---|
date | Sat, 11 Aug 2012 02:28:29 +0530 |
parents | 8b7a85055643 |
children | 6a788472c293 |
rev | line source |
---|---|
242
e93157b8b0bd
refactor modify views to use flatland, see details below
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
227
diff
changeset
|
1 {% import "forms.html" as forms %} |
1451 | 2 {% import "utils.html" as utils %} |
1654
5acaea38f1a2
Duplicate templates removed from foobar
Jaiditya Mathur <jaiditya.mathur@gmail.com>
parents:
1629
diff
changeset
|
3 {% extends theme("show.html") %} |
1241
95abf895be4f
Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents:
892
diff
changeset
|
4 |
1624
c6974ba2e2b2
Widget-based metadata editor.
Cheer Xiao <xiaqqaix@gmail.com>
parents:
1451
diff
changeset
|
5 {% from form.meta_template import meta_editor %} |
1451 | 6 {# Import macros data_editor and extra_head from content_form's template. |
7 extra_head is optional, so instead of a simple "import from" we need to do | |
8 this manually #} | |
9 {% import form['content_form'].template as content_template %} | |
10 {% set extra_head = content_template.extra_head %} | |
11 {% set data_editor = content_template.data_editor %} | |
12 | |
1241
95abf895be4f
Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents:
892
diff
changeset
|
13 {% set title = _("Modifying %(item_name)s", item_name=item_name) %} |
95abf895be4f
Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents:
892
diff
changeset
|
14 |
1451 | 15 {% block head %} |
16 {{ super() }} | |
17 {% if extra_head %} | |
18 {{ extra_head() }} | |
19 {% endif %} | |
20 {% endblock %} | |
21 | |
22 {% block subitem_navigation %} | |
23 {% call(fullname, shortname, contenttype, has_children) utils.render_subitem_navigation(item_name, True) %} | |
24 {% set shortname = shortname|json_dumps %} | |
25 {% set fullname = fullname|json_dumps %} | |
26 <button class="link-action" onclick='linkSubitem({{ shortname }}, {{ fullname }})' | |
27 title="{{ _('Link to Subitem') }}">{{ _('Link') }}</button> | |
28 <button class="transclude-action" | |
29 onclick='transcludeSubitem({{ shortname }}, {{ fullname }})' | |
30 title="{{ _('Transclude Subitem') }}">{{ _('Transclude') }}</button> | |
31 {% endcall %} | |
32 {% endblock %} | |
33 | |
34 | |
227
7099a64c00ad
remove TABs, remove CRLF lineendings - please use spaces and LF only
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
0
diff
changeset
|
35 {% block content %} |
1241
95abf895be4f
Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents:
892
diff
changeset
|
36 <h1>{{ title }}</h1> |
1588
48bcafd8f5ec
Modernized theme modify form styling
Jaiditya Mathur <jaiditya.mathur@gmail.com>
parents:
1451
diff
changeset
|
37 <div id="moin-modify" class="moin-form"> |
1330
cae27a401354
fix issue #165 +modify fails html5 validation
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1317
diff
changeset
|
38 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }} |
1317
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
39 {{ forms.render_errors(form) }} |
1451 | 40 {# |
41 Workaround: | |
42 For *Draw content, hide form['submit'] and form['comment'], since *Draw | |
43 POSTs originate from their respective applets. | |
44 #} | |
45 {% if not form['content_form'].is_draw %} | |
46 {{ forms.render(form['submit']) }} | |
47 <dl> | |
48 {{ forms.render_textcha(gen, form) }} | |
49 {{ forms.render(form['comment']) }} | |
50 </dl> | |
51 {% endif %} | |
52 {{ data_editor(form['content_form']) }} | |
53 {% if form['content_form'].help %} | |
54 <pre id="moin-editor-help">{{ form['content_form'].help }}</pre> | |
55 {% endif %} | |
1624
c6974ba2e2b2
Widget-based metadata editor.
Cheer Xiao <xiaqqaix@gmail.com>
parents:
1451
diff
changeset
|
56 {{ meta_editor(form['meta_form']) }} |
1317
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
57 <dl> |
1624
c6974ba2e2b2
Widget-based metadata editor.
Cheer Xiao <xiaqqaix@gmail.com>
parents:
1451
diff
changeset
|
58 {{ forms.render(form['extra_meta_text']) }} |
1317
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
59 </dl> |
1451 | 60 {# |
1317
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
61 {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }} |
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
62 <br /> |
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
63 {{ forms.render_errors(form['meta_text']) }} |
1451 | 64 #} |
1317
ce5454f5edaa
CSS cleanup, remove unused selectors, fixes #172 align columns of integers to right, partial fix for #165 html errors on +modify
Roger Haase <crosseyedpenguin@yahoo.com>
parents:
1241
diff
changeset
|
65 {{ gen.form.close() }} |
227
7099a64c00ad
remove TABs, remove CRLF lineendings - please use spaces and LF only
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
0
diff
changeset
|
66 </div> |
7099a64c00ad
remove TABs, remove CRLF lineendings - please use spaces and LF only
Thomas Waldmann <tw AT waldmann-edv DOT de>
parents:
0
diff
changeset
|
67 {% endblock %} |