Page MenuHomec4science

header_base.html
No OneTemporary

File Metadata

Created
Thu, May 9, 00:07

header_base.html

{#
## This file is part of Invenio.
## Copyright (C) 2012 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Invenio is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Invenio; if not, write to the Free Software Foundation, Inc.,
## 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
#}
{#
## This file contains header part of main page template.
##
## Usage:
## {% include 'header.html' %}
#}
<nav class="navbar navbar-fixed-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">{{ _('Toggle navigation') }}</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="{{ url_for('search.index') }}">
<img src="{{ url_for('static', filename='img/logo_white.png') }}" alt="{{ config.CFG_SITE_NAME_INTL[g.ln] }}" />
</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{%- for item in current_menu.submenu('main').children if item.visible recursive %}
{%- if item.children -%}
<li class="dropdown">
<a href="{{ item.url }}" style="display: inline-block; padding-right: 5px;">{{ item.text|safe }}</a>
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="display: inline-block; padding-left: 5px;">
<b class="caret"></b>
</a>
<ul class="dropdown-menu pull-right">
{{ loop(item.children) }}
</ul>
</li>
{%- else -%}
<li><a href="{{ item.url }}">{{ item.text|safe }}</a></li>
{%- endif %}
{%- endfor %}
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
{% if current_user.is_guest %}
<a href="{{ url_for('webaccount.login', referer=request.url) }}" style="display: inline-block; padding-right: 5px;">
<i class="glyphicon glyphicon-user"></i> {{ _("guest") }}
</a>
{% else %}
<a href="{{ url_for('webaccount.index') }}" style="display: inline-block; padding-right: 5px;">
<i class="glyphicon glyphicon-user"></i> {{ current_user.nickname|default(current_user.email) }}
</a>
{% endif %}
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style="display: inline-block; padding-left: 5px;">
<span class="caret"></span>&nbsp;</a>
<ul class="dropdown-menu">
{%- for item in current_menu.submenu('personalize').children if item.visible %}
<li><a href="{{ item.url }}">{{ item.text|safe }}</a></li>
{% endfor %}
<li class="divider"></li>
{% if current_user.is_guest %}
<li><a href="{{ url_for('webaccount.login', referer=request.url) }}">
<i class="glyphicon glyphicon-lock"></i> {{ _("Login") }}
</a></li>
{% else %}
<li><a href="{{ url_for('webaccount.logout') }}">
<i class="glyphicon glyphicon-off"></i> {{ _("Logout") }}
</a></li>
{% endif %}
</ul>
</li>
</ul>
</div>
</div>
</nav>

Event Timeline