annotate MoinMoin/themes/basic/templates/modify.html @ 2944:afe523052a7f

rework global history styling for modernized and basic themes, add user and comment fields, partial fix #471
author RogerHaase <haaserd@gmail.com>
date Sun, 10 May 2015 13:51:39 -0700
parents 4ab27780d078
children 72c5a7d688b5
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 %}
2661
cfa54a0ad2c7 Added some more meta data information(specific to blog items such as ptime, supertags etc) to be displayed in blog modify view in basic theme
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2567
diff changeset
4 {% from theme(form.meta_template) import basic_meta_editor %}
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
5 {% import theme("itemviews.html") as itemviews with context %}
2481
76098dbcb43c adds support for editing non-wiki binary items
sharky93 <rishabhr123@gmail.com>
parents: 2440
diff changeset
6 {% import theme(form['content_form'].template) as content_template %}
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
7 {% set extra_head = content_template.extra_head %}
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2794
diff changeset
8 {% if content_template.basic_data_editor is defined %}
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
9 {% set data_editor = content_template.basic_data_editor %}
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2794
diff changeset
10 {% else %}
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
11 {% set data_editor = content_template.data_editor %}
2851
5a49eeb1f307 add spaces to jinja2 expressions, add tests for missing spaces to coding_std.py
RogerHaase <haaserd@gmail.com>
parents: 2794
diff changeset
12 {% endif %}
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
13 {% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
14
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
15 {% block head %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
16 {{ super() }}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
17 {% if extra_head %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
18 {{ extra_head() }}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
19 {% endif %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
20 {% endblock %}
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
21
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
22 {% block views %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
23 {{ itemviews }}
2346
eb3c2da11ba1 separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents: 2345
diff changeset
24 {% endblock %}
2335
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
25
acddea75972b basic modify view
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
26 {% block content %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
27 <h1>{{ title }}</h1>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
28 <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
29 <a class="btn btn-success" style="float: right" href="{{ url_for('.download_item', item_name=item_name, mimetype='application/x.moin.download') }}">
86df79fae350 Add download link to modify view (fixes #205)
Aviral Dasgupta <me@aviraldg.com>
parents: 2879
diff changeset
30 <span class="fa fa-download"></span> {{ _('Download') }}
86df79fae350 Add download link to modify view (fixes #205)
Aviral Dasgupta <me@aviraldg.com>
parents: 2879
diff changeset
31 </a>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
32 {{ gen.form.open(form, method='post', enctype='multipart/form-data') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
33 {{ forms.render_errors(form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
34 {{ forms.render_errors(form['meta_form']['acl']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
35 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
36 Workaround:
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
37 For *Draw content, hide submit button and form['comment'], since *Draw
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
38 POSTs originate from their respective applets.
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
39 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
40 <ul class="moin-nav nav-tabs moin-shadow">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
41 <li class="active"><a href="#editor" data-toggle="tab">Edit Content</a></li>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
42 <li><a href="#meta" data-toggle="tab">Edit Meta</a></li>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
43 {% if user.may.admin(fqname) %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
44 <li><a href="#acl" data-toggle="tab">Edit ACL</a></li>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
45 {% endif %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
46 <li><a href="#help" data-toggle="tab">Help</a></li>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
47 </ul>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
48 <div class="tab-content">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
49 <div class="tab-pane active" id="editor">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
50 {{ data_editor(form['content_form'], item_name) }}
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
51 </div>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
52 <div class="tab-pane active" id="meta">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
53 <div class="row">
2794
1f7d8cc15805 change basic theme col-lg-* classes to col-md-* making smaller window before content wraps
RogerHaase <haaserd@gmail.com>
parents: 2788
diff changeset
54 <div class="col-md-6">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
55 {{ basic_meta_editor(form['meta_form']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
56 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
57 {% set field = form['extra_meta_text'] %}
2794
1f7d8cc15805 change basic theme col-lg-* classes to col-md-* making smaller window before content wraps
RogerHaase <haaserd@gmail.com>
parents: 2788
diff changeset
58 <div class="col-md-6">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
59 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
60 {{ gen.label(field) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
61 {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string, class='form-control') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
62 </div>
2665
73adb7dfd1bd Fixed issue #446
Ajitesh Gupta <ajgupta93@gmail.com>
parents: 2567
diff changeset
63 </div>
2495
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
64 </div>
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
65 </div>
2788
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
66
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
67 {% set field = form['meta_form']['acl'] %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
68 {% if user.may.admin(fqname) %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
69 <div class="tab-pane active" id="acl">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
70 <div class="row">
2794
1f7d8cc15805 change basic theme col-lg-* classes to col-md-* making smaller window before content wraps
RogerHaase <haaserd@gmail.com>
parents: 2788
diff changeset
71 <div class="col-md-6">
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
72 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
73 {{ gen.label(field) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
74 {{ gen.textarea(field, rows='1', class='form-control') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
75 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
76 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
77 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
78 </div>
2788
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
79 {% else %}
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
80 {{ gen.input(field, type='hidden', class='form-control') }}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
81 {% endif %}
2879
cfdec0c11e3d fix #88 add editor help based upon the content type of the target item
RogerHaase <haaserd@gmail.com>
parents: 2851
diff changeset
82
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
83 <div class="tab-pane active" id="help">
2879
cfdec0c11e3d fix #88 add editor help based upon the content type of the target item
RogerHaase <haaserd@gmail.com>
parents: 2851
diff changeset
84 {{ utils.help_on_editing(help) }}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
85 </div>
2495
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
86 </div>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
87 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
88 {{ 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: 2751
diff changeset
89 <br />
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
90 {{ forms.render_errors(form['meta_text']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
91 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
92 {% if not form['content_form'].is_draw %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
93 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
94 {{ forms.render_textcha(gen, form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
95 {{ gen.input(form['comment'], type="text", class="form-control") }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
96 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
97 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
98 {{ forms.render_submit(form, value='Save', class='btn btn-primary', id='moin-save-text-button') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
99 </div>
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
100 {% endif %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
101
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
102 {{ gen.form.close() }}
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
103 </div>
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
104 {% endblock %}
2922
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
105
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
106 {% block options_for_javascript %}
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
107 {%- if user.scroll_page_after_edit -%}
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
108 <br id="moin-scroll-page-after-edit" />
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
109 {%- endif %}
b99ff90c7fac fix scroll page after edit not working in basic theme, copy code from modernized
RogerHaase <haaserd@gmail.com>
parents: 2879
diff changeset
110 {% endblock %}