view 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
line wrap: on
line source
{% extends theme("base.html") %}

{% import theme("snippets.html") as snippets %}
{% set logo = snippets.logo() %}

{% block layout %}
	<div class="container-fluid">
        <div class="navbar navbar-inverse">
            <div class="navbar-inner">
                <div class="container-fluid">

                    {% if logo %}
                    <a class="brand" href="{{ url_for('frontend.show_item', item_name=cfg.item_root) }}">
                        <img class="logo" src="{{ '/static/logos/moinmoin-small.png' }}"/>
                    </a>
                    {% endif %}

					<form class="navbar-search pull-right" action="{{ url_for('frontend.search') }}" method="get">
                       	<input name='q' type="text" class="search-query" placeholder="Search ...">
                    </form>

                    <ul class="nav pull-right">

                        {% if user.valid -%}
                        {% set avatar = user.avatar(20) %}
                            {% if avatar %}
                                <li><img id="moin-avatar" src="{{ avatar }}" /></li>
                            {%- endif %}
                            {% if user.name -%}
                                {% set wiki_href, aliasname, title, exists = theme_supp.userhome() %}
                                <li>
                                <a href="{{ wiki_href }}" {% if not exists %}class="moin-nonexistent"{% endif %} rel="nofollow" title="{{ title }}">
                                    <i class="icon-user icon-white"> </i>
                                    {{ aliasname }}
                                </a>
                                </li>
                                {% if 'frontend.usersettings' not in cfg.endpoints_excluded -%}
                                    <li>
                                    <a href="{{ url_for('frontend.usersettings') }}" class="moin-usersettings" rel="nofollow">
                                        <i class="icon-cog icon-white"> </i>
                                            {{ _('Settings') }}</a>
                                    </li>
                                {%- endif %}
                            {%- endif %}
                            {% if user.auth_method in cfg.auth_can_logout %}
                                <li>
                                <a href="{{ url_for('frontend.logout', logout_submit=1) }}" class="moin-logout" rel="nofollow">
                                    <i class="icon-off icon-white"></i>
                                    {{ _('Logout') }}
                                </a>
                                </li>
                            {% endif %}
                        {% else %}
                            {% set login_url = theme_supp.login_url() %}
                            {% if login_url %}
                                <li>
                                <a href="{{ login_url }}" class="moin-login" rel="nofollow">{{ _('Login') }}</a>
                                </li>
                            {% endif %}
                        {%- endif %}

                    </ul>
                </div> <!-- nav-bar-fluid-container -->
            </div> <!-- navbar-container-->
    	</div> <!-- navbar-inverse-->

        <div class="row-fluid">
            <div class="span2">
                <div class="well sidebar-nav left-sidebar">
                    <ul class="nav nav-list">
                        {% set navibar_items = theme_supp.navibar(item_name) %}
                        {% set quicklinks = 'false' %}
                        {% if navibar_items %}

                        <li class="nav-header">Site Navigation</li>
                        {% for cls, url, text, title in navibar_items %}
                            {% if class == 'userlink' %}
                                {% set quicklinks = 'true' %}
                            {% endif %}
                            <li class="{{ cls }}">
                                <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
                            </li>
                        {% endfor %}

                        {% endif %}
                        
                        <li class="nav-header">Quick Links</li>
                            {% if quicklinks == 'true' %}
                                {% for cls, url, text, title in navibar_items %}
                                {% if cls == 'userlink' %}
                                    <li class="{{ cls }}">
                                        <a href="{{ url }}" {% if title %}title="{{ title }}"{% endif %}>{{ text }}</a>
                                    </li>
                                {% endif %}
                                {% endfor %}

                            {% else %}
                                <li> Empty </li>
                            {% endif %}

                    </ul>
                </div><!--/.well -->
            </div><!--/span-->

            <div class="span10">
                <ul class="breadcrumb">
                    {% set trail_items = theme_supp.path_breadcrumbs() %}
                    {% if trail_items %}
                        {% for wiki_name, item_name, item_href, exists, err in trail_items %}
                          <li>
                            {%- if wiki_name -%}
                                <a href="{{ item_href }}"{{ " " }}
                                   title="{{ wiki_name }}"
                                   class="{% if err %}moin-badinterwiki{% else %}moin-interwiki{% endif %}">
                                   {{ item_name|shorten_item_name }}
                                </a>
                            {%- else -%}
                                <a href="{{ url_for('frontend.show_item', item_name=item_name) }}"{{ " " }}
                                   {% if not exists -%}class="moin-nonexistent"{%- endif -%}>
                                   {{ item_name|shorten_item_name }}
                                </a>
                            {%- endif %}
                            <span class="divider">/</span>
                          </li>
                        {% 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-fluid-->
	</div><!--/container-fluid-->
{% endblock %}