{% extends "base.html" %}
{% load gravatar %}
{% load i18n %}
{% block "global_content" %}
<nav class="navbar navbar-default" role="navigation">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
				<span class="sr-only">{% trans "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 'dashboard' %}">{% trans "TeamVault" %}</a>
		</div>

		<div class="collapse navbar-collapse" id="navbar-collapse">
			<ul class="nav navbar-nav">
				<li class="{% block "nav_search" %}{% endblock %}">
					<a href="{% url 'dashboard' %}"><i class="fa fa-search"></i>&nbsp; {% trans "Search" %}</a>
				</li>
				<li class="{% block "nav_browse" %}{% endblock %}">
					<a href="{% url 'secrets.secret-list' %}"><i class="fa fa-folder-o"></i>&nbsp; {% trans "Browse" %}</a>
				</li>
			</ul>
			<div class="btn-group">
				<a href="{% url 'secrets.secret-add' content_type='password' %}" class="btn btn-nav"><i class="fa fa-plus-circle"></i>&nbsp; {% trans "Add Password" %}</a>
				<button type="button" class="btn btn-nav dropdown-toggle" data-toggle="dropdown">
					<span class="caret"></span>
					<span class="sr-only">Toggle Dropdown</span>
				</button>
				<ul class="dropdown-menu" role="menu">
					<li><a href="{% url 'secrets.secret-add' content_type='cc' %}"><i class="fa fa-credit-card"></i>&nbsp; {% trans "Add Credit Card" %}</a></li>
					<li><a href="{% url 'secrets.secret-add' content_type='file' %}"><i class="fa fa-upload"></i>&nbsp; {% trans "Upload File" %}</a></li>
				</ul>
			</div>
			<ul class="nav navbar-nav navbar-right">
				{% if request.user.is_superuser %}
				<!--<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-cog"></i>&nbsp; {% trans "Administration" %} <span class="caret"></span></a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="#"><i class="fa fa-users"></i> &nbsp; {% trans "Users and groups" %}</a></li>
						<li><a href="#"><i class="fa fa-sitemap"></i> &nbsp; {% trans "Audit" %}</a></li>
						<li><a href="#"><i class="fa fa-cogs"></i> &nbsp; {% trans "Settings" %}</a></li>
					</ul>
				</li>-->
				{% endif %}
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
						<img class="avatar" src="{% gravatar_url request.user.email 64 %}">
						&nbsp; {{ request.user.username }}
						{% if access_request_count > 0 %} &nbsp; <span class="badge badge-danger">{{ access_request_count }}</span>{% endif %}
						<span class="caret"></span>
					</a>
					<ul class="dropdown-menu" role="menu">
						<li><a href="{% url 'secrets.access_request-list' %}"><i class="fa fa-check-square-o"></i>&nbsp; {% trans "Access Requests" %} &nbsp; <span class="badge">{{ access_request_count }}</span></a></li>
						<li class="divider"></li>
						<li><a href="{% url 'accounts.logout' %}"><i class="fa fa-sign-out"></i>&nbsp; {% trans "Logout" %}</a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
</nav>
{% block "content" %}{% endblock %}
<div class="container ">
	<div class="row">
		<div class="col-md-12">
			<footer>
				TeamVault {{ version }} &nbsp; &middot; &nbsp; &copy; 2014, 2015 Torsten Rehn
			</footer>
		</div>
	</div>
</div>
{% endblock %}
