annotate MoinMoin/themes/basic/templates/modify.html @ 2788:dde7055f4361

fix #446 ACL Admin Rights Given to Users with Write Authority
author RogerHaase <haaserd@gmail.com>
date Wed, 17 Sep 2014 11:53:01 -0700
parents 31628ac3ec21
children 1f7d8cc15805
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 %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
8 {%if content_template.basic_data_editor is defined%}
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 %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
10 {%else%}
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 %}
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
12 {%endif%}
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">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
29 {{ 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
30 {{ forms.render_errors(form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
31 {{ forms.render_errors(form['meta_form']['acl']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
32 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
33 Workaround:
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
34 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
35 POSTs originate from their respective applets.
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
36 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
37 <ul class="moin-nav nav-tabs moin-shadow">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
38 <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
39 <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
40 {% if user.may.admin(fqname) %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
41 <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
42 {% endif %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
43 <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
44 </ul>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
45 <div class="tab-content">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
46 <div class="tab-pane active" id="editor">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
47 {{ data_editor(form['content_form'], item_name) }}
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
48 </div>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
49 <div class="tab-pane active" id="meta">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
50 <div class="row">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
51 <div class="col-lg-6">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
52 {{ basic_meta_editor(form['meta_form']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
53 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
54 {% set field = form['extra_meta_text'] %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
55 <div class="col-lg-6">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
56 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
57 {{ gen.label(field) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
58 {{ 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
59 </div>
2665
73adb7dfd1bd Fixed issue #446
Ajitesh Gupta <ajgupta93@gmail.com>
parents: 2567
diff changeset
60 </div>
2495
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
61 </div>
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
62 </div>
2788
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
63
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
64 {% set field = form['meta_form']['acl'] %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
65 {% if user.may.admin(fqname) %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
66 <div class="tab-pane active" id="acl">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
67 <div class="row">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
68 <div class="col-lg-6">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
69 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
70 {{ gen.label(field) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
71 {{ gen.textarea(field, rows='1', class='form-control') }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
72 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
73 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
74 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
75 </div>
2788
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
76 {% else %}
dde7055f4361 fix #446 ACL Admin Rights Given to Users with Write Authority
RogerHaase <haaserd@gmail.com>
parents: 2761
diff changeset
77 {{ 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
78 {% endif %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
79 <div class="tab-pane active" id="help">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
80 {% if form['content_form'].help %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
81 <pre id="moin-editor-help">{{ form['content_form'].help }}</pre>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
82 {% endif %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
83 </div>
2495
b0e5881e515e adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents: 2481
diff changeset
84 </div>
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
85 {#
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
86 {{ 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
87 <br />
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
88 {{ forms.render_errors(form['meta_text']) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
89 #}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
90 {% if not form['content_form'].is_draw %}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
91 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
92 {{ forms.render_textcha(gen, form) }}
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
93 {{ 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
94 </div>
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
95 <div class="form-group">
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
96 {{ 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
97 </div>
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
98 {% endif %}
2761
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
99
31628ac3ec21 mass correction of indentation on many templates
RogerHaase <haaserd@gmail.com>
parents: 2751
diff changeset
100 {{ gen.form.close() }}
2366
15501d0c9254 Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents: 2356
diff changeset
101 </div>
2549
b0cce905e94d Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents: 2504
diff changeset
102 {% endblock %}