Mercurial > moin > 2.0
annotate MoinMoin/themes/basic/templates/modify.html @ 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
author  Saurabh Kathpalia <saurabh.kathpalia95@gmail.com> 

date  Thu, 17 Jul 2014 09:54:45 +0530 
parents  81373904efeb 
children  c040fb080073 
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 nonwiki 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 %} 
eb3c2da11ba1
separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents:
2345
diff
changeset

23 {{ itemviews }} 
eb3c2da11ba1
separate item views as the itemviews template (basic theme)
sharky93 <rishabhr123@gmail.com>
parents:
2345
diff
changeset

24 {% endblock %} 
2335  25 
26 {% block content %}  
27 <h2>{{ title }}</h2>  
28 <div id="moinmodify" class="moinform">  
2440
3000fd5b0e29
adds div to modify view to check if modify view, instead of checking the URL
sharky93 <rishabhr123@gmail.com>
parents:
2371
diff
changeset

29 <div id="checkmodifyview"> </div> 
2335  30 {{ gen.form.open(form, method='post', enctype='multipart/formdata') }} 
31 {{ forms.render_errors(form) }}  
2504  32 {{ forms.render_errors(form['meta_form']['acl']) }} 
2335  33 {# 
34 Workaround:  
35 For *Draw content, hide submit button and form['comment'], since *Draw  
36 POSTs originate from their respective applets.  
37 #}  
2371
1422a4849787
Fixing outline for tabs in modify view
sharky93 <rishabhr123@gmail.com>
parents:
2366
diff
changeset

38 <ul class="moinnav navtabs moinshadow"> 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

39 <li class="active"><a href="#editor" datatoggle="tab">Edit Content</a></li> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

40 <li><a href="#meta" datatoggle="tab">Edit Meta</a></li> 
2495
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

41 <li><a href="#acl" datatoggle="tab">Edit ACL</a></li> 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

42 <li><a href="#help" datatoggle="tab">Help</a></li> 
2567
81373904efeb
whitespace changes only, based on coding_std.py plus a few manual edits
RogerHaase <haaserd@gmail.com>
parents:
2549
diff
changeset

43 </ul> 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

44 <div class="tabcontent"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

45 <div class="tabpane active" id="editor"> 
2549
b0cce905e94d
Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
2504
diff
changeset

46 {{ data_editor(form['content_form'], item_name) }} 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

47 </div> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

48 <div class="tabpane active" id="meta"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

49 <div class="row"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

50 <div class="collg6"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

51 {{ basic_meta_editor(form['meta_form']) }} 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

52 </div> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

53 {% set field = form['extra_meta_text'] %} 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

54 <div class="collg6"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

55 <div class="formgroup"> 
2356
92fb82ba5906
Basic meta forms and the extra metadata(JSON) now sidebyside, all textareas
sharky93 <rishabhr123@gmail.com>
parents:
2352
diff
changeset

56 {{ gen.label(field) }} 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

57 {{ gen.textarea(field, rows=field.properties.rowsstring, cols=field.properties.colsstring, class='formcontrol') }} 
2356
92fb82ba5906
Basic meta forms and the extra metadata(JSON) now sidebyside, all textareas
sharky93 <rishabhr123@gmail.com>
parents:
2352
diff
changeset

58 </div> 
92fb82ba5906
Basic meta forms and the extra metadata(JSON) now sidebyside, all textareas
sharky93 <rishabhr123@gmail.com>
parents:
2352
diff
changeset

59 </div> 
2336
f844f7307aa6
tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents:
2335
diff
changeset

60 </div> 
f844f7307aa6
tabbable grouping of meta in editor
sharky93 <rishabhr123@gmail.com>
parents:
2335
diff
changeset

61 </div> 
2495
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

62 <div class="tabpane active" id="acl"> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

63 <div class="row"> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

64 {% set field = form['meta_form']['acl'] %} 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

65 <div class="collg6"> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

66 <div class="formgroup"> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

67 {{ gen.label(field) }} 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

68 {{ gen.textarea(field, rows='1', class='formcontrol') }} 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

69 </div> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

70 </div> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

71 </div> 
b0e5881e515e
adds basic ui for acl setting
sharky93 <rishabhr123@gmail.com>
parents:
2481
diff
changeset

72 </div> 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

73 <div class="tabpane active" id="help"> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

74 {% if form['content_form'].help %} 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

75 <pre id="moineditorhelp">{{ form['content_form'].help }}</pre> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

76 {% endif %} 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

77 </div> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

78 </div> 
2335  79 {# 
80 {{ gen.textarea(form['meta_text'], lang='en', dir='ltr', rows=rows_meta, cols=cols) }}  
81 <br />  
82 {{ forms.render_errors(form['meta_text']) }}  
83 #}  
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

84 {% if not form['content_form'].is_draw %} 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

85 <div class="formgroup"> 
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

86 {{ forms.render_textcha(gen, form) }} 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

87 {{ gen.input(form['comment'], type="text", class="formcontrol") }} 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

88 </div> 
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

89 <div class="formgroup"> 
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

90 {{ forms.render_submit(form, value='Save', class='btn btnprimary', id='moinsavetextbutton') }} 
2366
15501d0c9254
Fixes modify view for boostrap v3
sharky93 <rishabhr123@gmail.com>
parents:
2356
diff
changeset

91 </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

92 {% 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

93 
2335  94 {{ gen.form.close() }} 
95 </div>  
2549
b0cce905e94d
Fixed the traceback which comes while creating/modifying of HTML wiki
Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
parents:
2504
diff
changeset

96 {% endblock %} 