annotate MoinMoin/themes/basic/templates/layout.html @ 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
rev   line source
2317
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
1 {% extends theme("base.html") %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
2
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
3 {% import theme("snippets.html") as snippets %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
4 {% set logo = snippets.logo() %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
5
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
6 {% block layout %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
7 <div class="container-fluid">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
8 <div class="navbar navbar-inverse">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
9 <div class="navbar-inner">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
10 <div class="container-fluid">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
11
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
12 {% if logo %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
13 <a class="brand" href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
14 <img class="logo" src="{{ '/static/logos/moinmoin-small.png' }}"/>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
15 </a>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
16 {% endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
17
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
18 <form class="navbar-search pull-right" action="{{ url_for('frontend.search') }}" method="get">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
19 <input name='q' type="text" class="search-query" placeholder="Search ...">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
20 </form>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
21
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
22 <ul class="nav pull-right">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
23
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
24 {% if user.valid -%}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
25 {% set avatar = user.avatar(20) %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
26 {% if avatar %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
27 <li><img id="moin-avatar" src="{{ avatar }}" /></li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
28 {%- endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
29 {% if user.name -%}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
30 {% set wiki_href, aliasname, title, exists = theme_supp.userhome() %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
31 <li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
32 <a href="{{ wiki_href }}" {% if not exists %}class="moin-nonexistent"{% endif %} rel="nofollow" title="{{ title }}">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
33 <i class="icon-user icon-white"> </i>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
34 {{ aliasname }}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
35 </a>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
36 </li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
37 {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
38 <li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
39 <a href="{{ url_for('frontend.usersettings') }}" class="moin-usersettings" rel="nofollow">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
40 <i class="icon-cog icon-white"> </i>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
41 {{ _('Settings') }}</a>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
42 </li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
43 {%- endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
44 {%- endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
45 {% if user.auth_method in cfg.auth_can_logout %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
46 <li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
47 <a href="{{ url_for('frontend.logout', logout_submit=1) }}" class="moin-logout" rel="nofollow">
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
48 <i class="icon-off icon-white"></i>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
49 {{ _('Logout') }}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
50 </a>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
51 </li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
52 {% endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
53 {% else %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
54 {% set login_url = theme_supp.login_url() %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
55 {% if login_url %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
56 <li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
57 <a href="{{ login_url }}" class="moin-login" rel="nofollow">{{ _('Login') }}</a>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
58 </li>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
59 {% endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
60 {%- endif %}
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
61
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
62 </ul>
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
63 </div> <!-- nav-bar-fluid-container -->
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
64 </div> <!-- navbar-container-->
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
65 </div> <!-- navbar-inverse-->
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
66
2318
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
67 <div class="row-fluid">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
68 <div class="span2">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
69 <div class="well sidebar-nav left-sidebar">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
70 <ul class="nav nav-list">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
71 {% set navibar_items = theme_supp.navibar(item_name) %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
72 {% set quicklinks = 'false' %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
73 {% if navibar_items %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
74
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
75 <li class="nav-header">Site Navigation</li>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
76 {% for cls, url, text, title in navibar_items %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
77 {% if class == 'userlink' %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
78 {% set quicklinks = 'true' %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
79 {% endif %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
80 <li class="{{ cls }}">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
81 <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
82 </li>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
83 {% endfor %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
84
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
85 {% endif %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
86
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
87 <li class="nav-header">Quick Links</li>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
88 {% if quicklinks == 'true' %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
89 {% for cls, url, text, title in navibar_items %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
90 {% if cls == 'userlink' %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
91 <li class="{{ cls }}">
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
92 <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
93 </li>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
94 {% endif %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
95 {% endfor %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
96
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
97 {% else %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
98 <li> Empty </li>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
99 {% endif %}
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
100
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
101 </ul>
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
102 </div><!--/.well -->
48e56f1ebd91 adds global nav, quick links, common css
sharky93 <rishabhr123@gmail.com>
parents: 2317
diff changeset
103 </div><!--/span-->
2319
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
104
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
105 <div class="span10">
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
106 <ul class="breadcrumb">
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
107 {% set trail_items = theme_supp.path_breadcrumbs() %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
108 {% if trail_items %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
109 {% for wiki_name, item_name, item_href, exists, err in trail_items %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
110 <li>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
111 {%- if wiki_name -%}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
112 <a href="{{ item_href }}"{{ " " }}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
113 title="{{ wiki_name }}"
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
114 class="{% if err %}moin-badinterwiki{% else %}moin-interwiki{% endif %}">
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
115 {{ item_name|shorten_item_name }}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
116 </a>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
117 {%- else -%}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
118 <a href="{{ url_for('frontend.show_item', item_name=item_name) }}"{{ " " }}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
119 {% if not exists -%}class="moin-nonexistent"{%- endif -%}>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
120 {{ item_name|shorten_item_name }}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
121 </a>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
122 {%- endif %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
123 <span class="divider">/</span>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
124 </li>
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
125 {% endfor %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
126 {% endif %}
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
127 </ul>
2320
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
128
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
129 {% block views %}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
130
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
131 {% endblock %}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
132
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
133 <div class="row-fluid">
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
134 <div class="span10">
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
135 {% set content_id = self.local_panel and 'moin-content' or 'moin-content-no-panel' %}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
136 <div id="{{ content_id }}" lang="{{ theme_supp.content_lang }}" dir="{{ theme_supp.content_dir }}">
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
137 {% block content %}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
138 {# All content templates should implement this block. #}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
139 {% endblock %}
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
140 </div>
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
141 </div><!--/span-->
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
142 </div><!--/row-->
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
143
2319
61c9d0f302ea adds breadcrumbs
sharky93 <rishabhr123@gmail.com>
parents: 2318
diff changeset
144 </div><!--/span-->
2320
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
145 </div> <!--/row-fluid-->
35c88bb5613a adds tabs for itemviews, content display
sharky93 <rishabhr123@gmail.com>
parents: 2319
diff changeset
146 </div><!--/container-fluid-->
2317
e657c7ca7ef5 adds topnav
sharky93 <rishabhr123@gmail.com>
parents:
diff changeset
147 {% endblock %}