changeset 2320:35c88bb5613a

adds tabs for itemviews, content display
author sharky93 <rishabhr123@gmail.com>
date Sat, 13 Jul 2013 02:06:59 +0530
parents 61c9d0f302ea
children aeda8cc88447
files MoinMoin/themes/basic/templates/layout.html MoinMoin/themes/basic/templates/show.html
diffstat 2 files changed, 114 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/themes/basic/templates/layout.html	Fri Jul 12 21:51:21 2013 +0530
+++ b/MoinMoin/themes/basic/templates/layout.html	Sat Jul 13 02:06:59 2013 +0530
@@ -125,8 +125,23 @@
                         {% endfor %}
                     {% endif %}
                 </ul>
+
+                {% block views %}
+
+                {% endblock %}
+
+            <div class="row-fluid">
+                <div class="span10">
+                    {% set content_id = self.local_panel and 'moin-content' or 'moin-content-no-panel' %}
+                    <div id="{{ content_id }}" lang="{{ theme_supp.content_lang }}" dir="{{ theme_supp.content_dir }}">
+                        {% block content %}
+                            {# All content templates should implement this block. #}
+                        {% endblock %}
+                    </div>
+                </div><!--/span-->
+            </div><!--/row-->
+
             </div><!--/span-->
-        </div> <!--/row-->
-
-	</div>
+        </div> <!--/row-fluid-->
+	</div><!--/container-fluid-->
 {% endblock %}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/themes/basic/templates/show.html	Sat Jul 13 02:06:59 2013 +0530
@@ -0,0 +1,96 @@
+{% extends theme("layout.html") %}
+
+{% block views %}
+{% set exists = storage.has_item(item_name) %}
+
+    <ul class="nav nav-tabs">
+        {%- for endpoint, label, title, check_exists in cfg.item_views if not endpoint in cfg.endpoints_excluded %}
+            {%- if not check_exists or check_exists and exists %}
+
+                {%- if endpoint == 'frontend.show_item' %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                        <span class="icon-eye-open"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'frontend.modify_item' and user.may.write(item_name) %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                         <span class="icon-pencil"></span>   {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'frontend.history' %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                        <span class="icon-time"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'frontend.show_item_meta' %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                        <span class="icon-wrench"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'frontend.highlight_item' %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                        <span class="icon-picture"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'frontend.backrefs' %}
+                    <li>
+                        <a href="{{ url_for(endpoint, item_name=item_name) }}" title="{{ title }}" rel="nofollow">
+                        <span class="icon-share"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {%- if endpoint == 'special.comments' %}
+                    <li class="moin-toggle-comments-button">
+                        <a href="#" title="{{ title }}">
+                        <span class="icon-comment"></span>
+                            {{ label }}
+                        </a>
+                    </li>
+                {%- endif %}
+
+                {% if endpoint == 'special.transclusions' -%}
+                    <li class="moin-transclusions-button">
+                        <a href="#" title="{{ title }}">
+                        <span class="icon-edit"></span>
+                            {{ label }}</a>
+                    </li>
+                {%- endif %}
+
+            {%- endif %}
+        {% endfor %}
+
+    </ul>
+{% endblock %}
+
+{% block content %}
+
+    {% block content_data %}
+        {% if data_rendered %}
+        <div id="moin-content-data">
+            {{ data_rendered }}
+        </div>
+        {% endif %}
+    {% endblock %}
+
+{% endblock %}
\ No newline at end of file