annotate MoinMoin/templates/modify.html @ 2945:72c5a7d688b5

trivial change to fix indentation on modify.html
author RogerHaase <haaserd@gmail.com>
date Sun, 10 May 2015 14:05:56 -0700
parents 86df79fae350
children
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
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
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
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
6 {# Import macros data_editor and extra_head from content_form's template.
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
7 extra_head is optional, so instead of a simple "import from" we need to do
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
8 this manually #}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
9 {% import form['content_form'].template as content_template %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
10 {% set extra_head = content_template.extra_head %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
11 {% set data_editor = content_template.data_editor %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
12
2261
a90551dc4b75 Updated fqname support to modify view.
Ashutosh Singla <ashu1461@gmail.com>
parents: 2121
diff changeset
13 {% set title = _("Modifying '%(item_name)s'", item_name=fqname.value) %}
1241
95abf895be4f Refactor title code, fixes #147
Sam Toyer <samATqxcvDOTnet>
parents: 892
diff changeset
14
1451
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
15 {% block head %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
16 {{ super() }}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
17 {% if extra_head %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
18 {{ extra_head() }}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
19 {% endif %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
20 {% endblock %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
21
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
22 {% block subitem_navigation %}
2263
6dd5af01d54d Sub-items pannel now has fqname support.
Ashutosh Singla <ashu1461@gmail.com>
parents: 2261
diff changeset
23 {% call(fullname, shortname, contenttype, has_children) utils.render_subitem_navigation(fqname, True) %}
1451
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
24 {% set shortname = shortname|json_dumps %}
2523
03efbc0de719 Fixes unused variables, unnecessary global functions, variables in the main JS, linter ready, using objects.
sharky93 <rishabhr123@gmail.com>
parents: 2084
diff changeset
25 <button class="moin-insertname-action" data-name="{{ fullname }}"
2084
d366d1af5e1e fixes : Transcluding and Linking subitems bug, changed transcluding and linking buttons to only one InsertName
Ashutosh Singla <ashu1461@gmail.com>
parents: 1988
diff changeset
26 title="{{ _('Insert Name') }}">{{ _('Insert Name') }}</button>
1451
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
27 {% endcall %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
28 {% endblock %}
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
29
c32ff2e07e7a Introduce itemtype.
Cheer Xiao <xiaqqaix@gmail.com>
parents: 1420
diff changeset
30
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
31 {% block content %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
32 <h1>{{ title }}</h1>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
33 <div id="moin-modify" class="moin-form">
2910
86df79fae350 Add download link to modify view (fixes #205)
Aviral Dasgupta <me@aviraldg.com>
parents: 2879
diff changeset
34 <a class="btn btn-success" style="float: right" href="{{ url_for('.download_item', item_name=item_name, mimetype='application/x.moin.download') }}">
2945
72c5a7d688b5 trivial change to fix indentation on modify.html
RogerHaase <haaserd@gmail.com>
parents: 2910
diff changeset
35 <span class="fa fa-download"></span> {{ _('Download') }}
2910
86df79fae350 Add download link to modify view (fixes #205)
Aviral Dasgupta <me@aviraldg.com>
parents: 2879
diff changeset
36 </a>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
37 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
38 {{ forms.render_errors(form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
39 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
40 Workaround:
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
41 For *Draw content, hide submit button and form['comment'], since *Draw
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
42 POSTs originate from their respective applets.
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
43 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
44 {% if not form['content_form'].is_draw %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
45 {{ forms.render_submit(form, id='moin-save-text-button') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
46 <dl>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
47 {{ forms.render_textcha(gen, form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
48 {{ forms.render(form['comment']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
49 </dl>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
50 {% endif %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
51 {{ data_editor(form['content_form'], item_name) }}
2879
cfdec0c11e3d fix #88 add editor help based upon the content type of the target item
RogerHaase <haaserd@gmail.com>
parents: 2788
diff changeset
52 {{ utils.help_on_editing(help) }}
2788
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
53 {% set may_admin = user.may.admin(fqname) %}
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
54 {{ meta_editor(form['meta_form'], may_admin) }}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
55 <dl>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
56 {{ forms.render(form['extra_meta_text']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
57 </dl>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
58 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
59 {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
60 <br />
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
61 {{ forms.render_errors(form['meta_text']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
62 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
63 {{ gen.form.close() }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
64 </div>
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
65 {% endblock %}
1781
90eb2ea82c32 add auto-scroll edit textarea after doubleclick; auto-scroll show page after edit
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1773
diff changeset
66
90eb2ea82c32 add auto-scroll edit textarea after doubleclick; auto-scroll show page after edit
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1773
diff changeset
67 {% block options_for_javascript %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
68 {%- if user.scroll_page_after_edit -%}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
69 <br id="moin-scroll-page-after-edit" />
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2545
diff changeset
70 {%- endif %}
1781
90eb2ea82c32 add auto-scroll edit textarea after doubleclick; auto-scroll show page after edit
Roger Haase <crosseyedpenguin@yahoo.com>
parents: 1773
diff changeset
71 {% endblock %}