annotate MoinMoin/themes/basic/templates/modify.html @ 2346:eb3c2da11ba1

separate item views as the itemviews template (basic theme)
author sharky93 <rishabhr123@gmail.com>
date Thu, 25 Jul 2013 12:50:22 +0530
parents 7dd810dc82e1
children dce2bf1e02f4
rev   line source
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
1 {% extends theme("layout.html") %}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
2 {% import "forms.html" as forms %}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
3 {% import "utils.html" as utils %}
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
4 {% from theme("modify_meta.html") import basic_meta_editor %}
2341
16e04336a1d2 moves the upload file below content textarea, in modify view
sharky93 <rishabhr123@gmail.com>
parents: 2340
diff changeset
5 {% from theme("modify_text.html") import basic_data_editor %}
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
6 {% import theme("itemviews.html") as itemviews with context %}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
7
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
8 {% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
9
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
10 {% block views %}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
11 {{ itemviews }}
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
12 {% endblock %}
2335
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
13
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
14 {% block content %}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
15 <h2>{{ title }}</h2>
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
16 <div id="moin-modify" class="moin-form">
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
17 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
18 {{ forms.render_errors(form) }}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
19 {#
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
20 Workaround:
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
21 For *Draw content, hide submit button and form['comment'], since *Draw
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
22 POSTs originate from their respective applets.
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
23 #}
2337
7c01aeab600c Adds main edit as a tab, tabs now right.
sharky93 <rishabhr123@gmail.com>
parents: 2336
diff changeset
24 <div class="tabbable tabs-right">
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
25 <ul class="nav nav-tabs">
2345
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
26 <li class="active"><a href="#editor" data-toggle="tab">Edit Content</a></li>
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
27 <li><a href="#meta" data-toggle="tab">Edit Meta</a></li>
2339
60c3cba1aad4 Added help section in the tabs in the modify view
sharky93 <rishabhr123@gmail.com>
parents: 2338
diff changeset
28 <li><a href="#help" data-toggle="tab">Help</a></li>
2337
7c01aeab600c Adds main edit as a tab, tabs now right.
sharky93 <rishabhr123@gmail.com>
parents: 2336
diff changeset
29 </ul>
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
30 <div class="tab-content">
2337
7c01aeab600c Adds main edit as a tab, tabs now right.
sharky93 <rishabhr123@gmail.com>
parents: 2336
diff changeset
31 <div class="tab-pane active" id="editor">
2341
16e04336a1d2 moves the upload file below content textarea, in modify view
sharky93 <rishabhr123@gmail.com>
parents: 2340
diff changeset
32 {{ basic_data_editor(form['content_form'], item_name, class='input-block-level') }}
2337
7c01aeab600c Adds main edit as a tab, tabs now right.
sharky93 <rishabhr123@gmail.com>
parents: 2336
diff changeset
33 </div>
2345
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
34 <div class="tab-pane active" id="meta">
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
35 {{ basic_meta_editor(form['meta_form']) }}
2345
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
36 {% set field = form['extra_meta_text'] %}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
37 {{ gen.label(field) }}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
38 {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string, class='span6') }}
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
39 </div>
2344
d1656cdee689 fixes displaying meta info and help without JS
sharky93 <rishabhr123@gmail.com>
parents: 2343
diff changeset
40 <div class="tab-pane active" id="help">
2339
60c3cba1aad4 Added help section in the tabs in the modify view
sharky93 <rishabhr123@gmail.com>
parents: 2338
diff changeset
41 {% if form['content_form'].help %}
60c3cba1aad4 Added help section in the tabs in the modify view
sharky93 <rishabhr123@gmail.com>
parents: 2338
diff changeset
42 <pre id="moin-editor-help">{{ form['content_form'].help }}</pre>
60c3cba1aad4 Added help section in the tabs in the modify view
sharky93 <rishabhr123@gmail.com>
parents: 2338
diff changeset
43 {% endif %}
60c3cba1aad4 Added help section in the tabs in the modify view
sharky93 <rishabhr123@gmail.com>
parents: 2338
diff changeset
44 </div>
2336
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
45 </div>
f844f7307aa6 tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents: 2335
diff changeset
46 </div> <!-- left tabbable -->
2335
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
47 {#
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
48 {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
49 <br />
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
50 {{ forms.render_errors(form['meta_text']) }}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
51 #}
2345
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
52 {% if not form['content_form'].is_draw %}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
53 {{ forms.render_textcha(gen, form) }}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
54 {{ gen.input(form['comment'], type="text", class="input-block-level") }}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
55 {{ forms.render_submit(form, value='Save', class='btn btn-primary', id='moin-save-text-button') }}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
56 {% endif %}
7dd810dc82e1 combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
sharky93 <rishabhr123@gmail.com>
parents: 2344
diff changeset
57
2335
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
58 {{ gen.form.close() }}
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
59 </div>
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
60 {% endblock %}