changeset 2549:b0cce905e94d

Fixed the traceback which comes while creating/modifying of HTML wiki While creating HTML wiki a traceback comes specifying basic_data_editor is not defined but it is defined for all other types of wiki.So added an if statement in the themes/basic/templates/modify.html that is the basic_data_editor is defined then use it else use data_editor. basic_data_editor was not working because it is defined only for the basic wiki but in html wiki some special widgets are required which are taken from the data_editor.
author Saurabh Kathpalia <saurabh.kathpalia95@gmail.com>
date Sun, 16 Feb 2014 23:35:24 +0530
parents 07f3ccfdea45
children c97528d53f1f
files MoinMoin/themes/basic/templates/modify.html
diffstat 1 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/modify.html	Sun Feb 09 23:48:41 2014 +0530
+++ b/MoinMoin/themes/basic/templates/modify.html	Sun Feb 16 23:35:24 2014 +0530
@@ -4,9 +4,20 @@
 {% from theme("modify_meta.html") import basic_meta_editor %}
 {% import theme("itemviews.html") as itemviews with context %}
 {% import theme(form['content_form'].template) as content_template %}
-{% set basic_data_editor = content_template.basic_data_editor %}
+{% set extra_head = content_template.extra_head %}
+{%if content_template.basic_data_editor is defined%}
+    {% set data_editor = content_template.basic_data_editor %}
+{%else%}
+    {% set data_editor = content_template.data_editor %}
+{%endif%}
+{% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}
 
-{% set title = _("Modifying '%(item_name)s'", item_name=item_name) %}
+{% block head %}
+    {{ super() }}
+    {% if extra_head %}
+        {{ extra_head() }}
+    {% endif %}
+{% endblock %}
 
 {% block views %}
 {{ itemviews }}
@@ -32,7 +43,7 @@
     </ul>    
     <div class="tab-content">
         <div class="tab-pane active" id="editor">
-            {{ basic_data_editor(form['content_form'], item_name, class='form-control') }}
+            {{ data_editor(form['content_form'], item_name) }}
         </div>
         <div class="tab-pane active" id="meta">
             <div class="row">
@@ -82,4 +93,4 @@
 
     {{ gen.form.close() }}
 </div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}