changeset 1478:392407f46538

Foobar theme index page filters moved to local panel
author Jaiditya Mathur <jaiditya.mathur@gmail.com>
date Fri, 22 Jun 2012 09:40:44 +0530
parents f01afc21ac53
children 7b1644663fc0
files MoinMoin/themes/foobar/templates/index.html MoinMoin/themes/foobar/templates/local.html
diffstat 2 files changed, 67 insertions(+), 65 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/foobar/templates/index.html	Fri Jun 22 09:27:43 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/index.html	Fri Jun 22 09:40:44 2012 +0530
@@ -1,4 +1,4 @@
-{% extends theme("global.html") %}
+{% extends theme("local.html") %}
 {% import "forms.html" as forms %}
 {% block head_scripts %}
 {{ super() }}
@@ -6,64 +6,65 @@
     <script src="{{ url_for('static', filename='js/index_action.js') }}"></script>
 {% endblock %}
 
+{% block local %}
+    <ul>
+        {% if index %}
+        <li class="action-bar"> 
+        <div class="moin-select-all">
+            <span class="moin-select-allitem allitem-toselect" title="{{ _("Select All") }}">{{ _("Select All") }}</span>
+        </div>
+        </li>
+        {% endif %}
+        <li class="action-bar">
+        <div class="moin-select-actions">
+            <div>
+                <span class="show-action">Actions</span> 
+            </div>
+            <ul>
+                <li id="moin-create-newitem">{{ _("New item") }}</li>
+                <li id="moin-download-trigger">{{ _("Download") }}</li>
+                <li class="moin-action-tab" 
+                    id="moin-delete-trigger" 
+                    actionurl="{{ url_for('frontend.ajaxdelete', item_name=item_name) }}">
+                    {{ _("Delete") }}
+                </li>
+                <li class="moin-action-tab" 
+                    id="moin-destroy-trigger" 
+                    actionurl="{{ url_for('frontend.ajaxdestroy', item_name=item_name) }}">
+                    {{ _("Destroy") }}
+                </li>
+            </ul>
+        </div>
+        </li>
+        {% if index %}
+        <li class="action-bar">
+        <div class="moin-contenttypes-wrapper">
+            <div class="ct-hide">{{ _("Filter by content type") }}</div>
+            {% set unknown_items_label = _("items having unknown mime types") %}
+            {{ gen.form.open(form, method="post", action=url_for('frontend.index', item_name=item_name)) }}
+            <ul>
+                <li>
+                    <a href="#" class="filter-toggle">&raquo; {{ _("Toggle") }}</a>
+                    <a href="#" class="filter-more">&raquo; {{ _("More") }}</a>
+                </li>
+                {{ forms.render_filter_field(gen, form['markup_text_items'], 'checkbox', contenttype_groups['markup text items']) }}
+                {{ forms.render_filter_field(gen, form['other_text_items'], 'checkbox', contenttype_groups['other text items']) }}
+                {{ forms.render_filter_field(gen, form['image_items'], 'checkbox', contenttype_groups['image items']) }}
+                {{ forms.render_filter_field(gen, form['audio_items'], 'checkbox', contenttype_groups['audio items']) }}
+                {{ forms.render_filter_field(gen, form['video_items'], 'checkbox', contenttype_groups['video items']) }}
+                {{ forms.render_filter_field(gen, form['other_items'], 'checkbox', contenttype_groups['other items']) }}
+                {{ forms.render_filter_field(gen, form['unknown_items'], 'checkbox', unknown_items_label) }}
+                {{ gen.input(form['submit'], type='submit') }}
+            </ul>
+            {{ gen.form.close() }}
+        </div>
+        </li>
+        {% endif %}
+    </ul>
+{% endblock %}
+
 {% block content %}
     <div class="moin-index-message"><span></span></div>
-    <div class="moin-align-right">
-        <ul>
-            {% if index %}
-            <li class="action-bar">
-            <div class="moin-select-all">
-                <span class="moin-select-allitem allitem-toselect" title="{{ _("Select All") }}">{{ _("Select All") }}</span>
-            </div>
-            </li>
-            {% endif %}
-            <li class="action-bar">
-            <div class="moin-select-actions">
-                <div>
-                    <span class="show-action">Actions</span>
-                </div>
-                <ul>
-                    <li id="moin-create-newitem">{{ _("New item") }}</li>
-                    <li id="moin-download-trigger">{{ _("Download") }}</li>
-                    <li class="moin-action-tab"
-                        id="moin-delete-trigger"
-                        data-actionurl="{{ url_for('frontend.ajaxdelete', item_name=item_name) }}">
-                        {{ _("Delete") }}
-                    </li>
-                    <li class="moin-action-tab"
-                        id="moin-destroy-trigger"
-                        data-actionurl="{{ url_for('frontend.ajaxdestroy', item_name=item_name) }}">
-                        {{ _("Destroy") }}
-                    </li>
-                </ul>
-            </div>
-            </li>
-            {% if index %}
-            <li class="action-bar">
-            <div class="moin-contenttypes-wrapper">
-                <div class="ct-hide">{{ _("Filter by content type") }}</div>
-                {% set unknown_items_label = _("items having unknown mime types") %}
-                {{ gen.form.open(form, method="post", action=url_for('frontend.index', item_name=item_name)) }}
-                <ul>
-                    <li>
-                        <a href="#" class="filter-toggle">&raquo; {{ _("Toggle") }}</a>
-                        <a href="#" class="filter-more">&raquo; {{ _("More") }}</a>
-                    </li>
-                    {{ forms.render_filter_field(gen, form['markup_text_items'], 'checkbox', contenttype_groups['markup text items']) }}
-                    {{ forms.render_filter_field(gen, form['other_text_items'], 'checkbox', contenttype_groups['other text items']) }}
-                    {{ forms.render_filter_field(gen, form['image_items'], 'checkbox', contenttype_groups['image items']) }}
-                    {{ forms.render_filter_field(gen, form['audio_items'], 'checkbox', contenttype_groups['audio items']) }}
-                    {{ forms.render_filter_field(gen, form['video_items'], 'checkbox', contenttype_groups['video items']) }}
-                    {{ forms.render_filter_field(gen, form['other_items'], 'checkbox', contenttype_groups['other items']) }}
-                    {{ forms.render_filter_field(gen, form['unknown_items'], 'checkbox', unknown_items_label) }}
-                </ul>
-                {{ gen.input(form['submit'], type='submit') }}
-                {{ gen.form.close() }}
-            </div>
-            </li>
-            {% endif %}
-        </ul>
-    </div>
     <div>
     {% if item_name: %}
         <h1>{{ _("Index of subitems of '%(item_name)s'", item_name=item_name) }}</h1>
@@ -113,13 +114,13 @@
                 <a href="about:blank" title="{{ url_for('.download_item', item_name=fullname, mimetype=mimetype) }}"
                    class="moin-download-link">
                 </a>
-                <a href="{{ url_for('.show_item', item_name=fullname) }}"
+                <a href="{{ url_for('.show_item', item_name=fullname) }}" 
                    class="{{ contenttype|contenttype_to_class }} moin-item"
                    title="{{ relname }}">
                    {{ relname|truncate(maxchars, true, '..') }}
                 </a>
                 {% if hassubitem %}
-                    <a href="{{ url_for('frontend.index', item_name=fullname) }}"
+                    <a href="{{ url_for('frontend.index', item_name=fullname) }}" 
                        title="{{ _("More") }}"
                        class="moin-more-index">&nbsp;
                 </a>
@@ -132,7 +133,7 @@
     <div id="popup">
         <div id="popup-for-action" class="popup-container">
             <div class="popup-header">
-                <div class="popup-closer popup-cancel" title="{{ _("Close") }}">x</div>
+                <input type="button" class="popup-closer popup-cancel" value="{{ _("X") }}" title="{{ _("Close") }}"/>
                 <span>{{ _("Please provide comment for this action") }}</span>
             </div>
             <div class="popup-body">
@@ -145,16 +146,16 @@
         </div>
         <div id="popup-for-newitem" class="popup-container">
             <div class="popup-header">
-                <div class="popup-closer popup-cancel" title="{{ _("Close") }}">x</div>
+                <input type="button" class="popup-closer popup-cancel" value="{{ _("X") }}" title="{{ _("Close") }}"/>
                 <span>{{ _("Create new item") }}</span>
             </div>
             <div class="popup-body">
                 <form action={{ url_for('.ajaxmodify') }} method="post">
-                    <label for="moin-newitem">{{ _("Item name") }}</label>
+                    <label for="newitem">{{ _("Item name") }}</label>
                     {% if item_name %}
-                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="required"/>
+                        <input type="text" name="newitem" placeholder="{{ _("Enter item name here") }}" value="{{ item_name }}/" required="true"/>
                     {% else %}
-                        <input type="text" id="moin-newitem" name="newitem" placeholder="{{ _("Enter item name here") }}" required="required"/>
+                        <input type="text" name="newitem" placeholder="{{ _("Enter item name here") }}" required="true"/>
                     {% endif %}
                     <br/>
                     <input type="submit" value="{{ _("Create") }}"/>
@@ -172,4 +173,3 @@
     <script src="{{ url_for('static', filename='js/jfu.js') }}"></script>
     <div id="lightbox">&nbsp;</div>
 {% endblock %}
-
--- a/MoinMoin/themes/foobar/templates/local.html	Fri Jun 22 09:27:43 2012 +0530
+++ b/MoinMoin/themes/foobar/templates/local.html	Fri Jun 22 09:40:44 2012 +0530
@@ -12,6 +12,7 @@
 </div>
 
 <div id="moin-local-panel">
+{% block local %}
 <ul>
     <li>Views
         {% set exists = storage.has_item(item_name) %}
@@ -128,6 +129,7 @@
         {{ utils.render_subitem_navigation(item_name, False) }}
     </li>
 </ul>
+{% endblock %}
 </div>
 {% endblock %}