changeset 2345:7dd810dc82e1

combines basic and extra meta into one tabbable, submit button below editor and renamed 'Save'
author sharky93 <rishabhr123@gmail.com>
date Wed, 24 Jul 2013 21:08:35 +0530
parents d1656cdee689
children eb3c2da11ba1
files MoinMoin/templates/basic.js MoinMoin/themes/basic/templates/modify.html MoinMoin/themes/basic/templates/modify_meta.html
diffstat 3 files changed, 25 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/basic.js	Wed Jul 24 20:01:30 2013 +0530
+++ b/MoinMoin/templates/basic.js	Wed Jul 24 21:08:35 2013 +0530
@@ -1,3 +1,4 @@
 $(document).ready(function (){
-    $('#gmeta, #emeta, #help').removeClass('active');
+    // this depends on the id's used for different tab-panes in modify.html (Basic Theme)
+    $('#meta, #help').removeClass('active');
 });
--- a/MoinMoin/themes/basic/templates/modify.html	Wed Jul 24 20:01:30 2013 +0530
+++ b/MoinMoin/themes/basic/templates/modify.html	Wed Jul 24 21:08:35 2013 +0530
@@ -12,30 +12,22 @@
        For *Draw content, hide submit button and form['comment'], since *Draw
        POSTs originate from their respective applets.
     #}
-    {% if not form['content_form'].is_draw %}
-        {{ forms.render_submit(form, class='btn btn-primary', id='moin-save-text-button') }}
-        <dl>
-            {{ forms.render_textcha(gen, form) }}
-            {{ gen.input(form['comment'], type="text", class="input-block-level") }}
-        </dl>
-    {% endif %}
     <br/>
     <div class="tabbable tabs-right">
         <ul class="nav nav-tabs">
-            <li class="active"><a href="#editor" data-toggle="tab">Edit</a></li>
-            <li><a href="#gmeta" data-toggle="tab">General Meta</a></li>
-            <li><a href="#emeta" data-toggle="tab">Extra Meta</a></li>
+            <li class="active"><a href="#editor" data-toggle="tab">Edit Content</a></li>
+            <li><a href="#meta" data-toggle="tab">Edit Meta</a></li>
             <li><a href="#help" data-toggle="tab">Help</a></li>
         </ul>    
         <div class="tab-content">
             <div class="tab-pane active" id="editor">
                 {{ basic_data_editor(form['content_form'], item_name, class='input-block-level') }}
             </div>
-            <div class="tab-pane active" id="gmeta">
+            <div class="tab-pane active" id="meta">
                 {{ basic_meta_editor(form['meta_form']) }}
-            </div>
-            <div class="tab-pane active" id="emeta">
-                {{ forms.render(form['extra_meta_text'], class='span6') }}
+                {% set field = form['extra_meta_text'] %}
+                {{ gen.label(field) }}
+                {{ gen.textarea(field, rows=field.properties.rows|string, cols=field.properties.cols|string, class='span6') }}
             </div>
             <div class="tab-pane active" id="help">
                 {% if form['content_form'].help %}
@@ -49,6 +41,12 @@
     <br />
     {{ forms.render_errors(form['meta_text']) }}
     #}
+    {% if not form['content_form'].is_draw %}
+        {{ forms.render_textcha(gen, form) }}
+        {{ gen.input(form['comment'], type="text", class="input-block-level") }}
+        {{ forms.render_submit(form, value='Save', class='btn btn-primary', id='moin-save-text-button') }}
+    {% endif %}
+
     {{ gen.form.close() }}
 </div>
 {% endblock %}
\ No newline at end of file
--- a/MoinMoin/themes/basic/templates/modify_meta.html	Wed Jul 24 20:01:30 2013 +0530
+++ b/MoinMoin/themes/basic/templates/modify_meta.html	Wed Jul 24 21:08:35 2013 +0530
@@ -1,14 +1,15 @@
 {% import "forms.html" as forms %}
 
 {% macro basic_meta_editor(form) %}
-    <dl>
-        {% for e in [
-            'itemtype',
-            'contenttype',
-            'summary',
-            'tags',
-            ] %}
-            {{ forms.render(form[e]) }}
-        {% endfor %}
-    </dl>
+    {% for e in [
+        'itemtype',
+        'contenttype',
+        'summary',
+        'tags',
+        ] %}
+        <div class="control-group">
+            {{ gen.label(form[e]) }}
+            {{ gen.input(form[e], type="text") }}
+        </div>
+    {% endfor %}
 {% endmacro %}