{% load staticfiles %}{% load i18n %}{% load bootstrap3 %}{% load compress %}<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		{% block whole_title %}<title>{% block title %}{{page_title}}{% endblock %} - djunin</title>{% endblock %}
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">

		<meta name="robots" content="noindex,nofollow,noarchive" />

		{% block head %}{% endblock %}

		{% compress css %}
		<link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
		<link href="{% static 'site.css' %}" rel="stylesheet">
		{% block styles %}{% endblock %}
		{% endcompress %}
	</head>
	<body>
		<nav class="navbar navbar-inverse navbar-fixed-top">
			<div class="container-fluid">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
					{% if brand_title and brand_url %}
						<a class="navbar-brand" href="{{brand_url}}" title="{{brand_title}}">{{brand_title}}</a>
					{% else %}
						{% if current_graph %}
							<a class="navbar-brand" href="{% url 'graphs' node.group node current_graph.graph_category %}" title="{{node}}">{{node}}</a>
						{% elif node %}
							<a class="navbar-brand" href="{% url 'group_nodes' node.group %}">{{node.group}}</a>
						{% else %}
							{% if nodes and selected_group %}
								<a class="navbar-brand" href="{% url 'nodes' %}">Nodes</a>
							{% else %}
								<a class="navbar-brand" href="{% url 'dashboard' %}">Djunin</a>
							{% endif %}
						{% endif %}
					{% endif %}
				</div>
				<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right visible-xs-inline">
						<!-- <li><a href="{% url 'dashboard' %}">Dashboard</a></li> -->
						<li><a href="{% url 'nodes' %}">Nodes</a></li>
					</ul>
						<ul class="nav navbar-nav navbar-right">
							{% if user.is_superuser %}
								<li><a href="{% url 'manage' %}">{% bootstrap_icon 'cog' %} {% trans 'Administration' %}</a></li>
							{% endif %}
							<li><a href="{% url 'logout' %}" title="{% trans 'Logout' %}">{% bootstrap_icon 'off' %} {% trans 'Logout' %}</a></li>
						</ul>
					<form class="navbar-form navbar-right" method="post" action="{% url 'jump' %}">
						{% csrf_token %}
						<input type="text" class="form-control" placeholder="Search..." accesskey="f" name="query" id="site-search" data-url="{% url 'search' %}" autocomplete="off" autocorrect="off" autocapitalize="off">
					</form>

				</div>
			</div>
		</nav>

		<div class="container-fluid">
			<div class="row">
				<div class="col-sm-3 col-md-2 sidebar">
					<ul class="nav nav-sidebar">
						{% block sidebar %}
							<li{% if sidebar_item == "nodes" %} class="active"{% endif %}>
								<a href="{% url 'nodes' %}" title="{% trans 'Nodes' %}">{% trans 'Nodes' %}</a>
								<ul class="nav" role="menu">
									{% for group in node_groups %}
										<li{% if selected_group == group %} class="active"{% endif %}>
											<a href="{% url 'group_nodes' group %}" title="{{group}}">{{group}}</a>
											{% if selected_group == group %}
												<ul class="nav" role="menu">
													{% for group_node in group_nodes %}
														<li{% if node == group_node %} class="active"{% endif %}>
															<a class="nav-group-node" href="{% url 'graphs' group group_node %}" title="{{group_node}}">{{group_node}}</a>
														</li>
													{% endfor %}
												</ul>
											{% endif %}
										</li>
									{% endfor %}
								</ul>
							</li>
						{% endblock %}
					</ul>
				</div>
				<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
					{% block page_title %}<h1 class="page-header">{{page_title}}</h1>{% endblock %}

					{% block content %}{% endblock %}
				</div>
			</div>
		</div>

		{% compress js %}
		<script type="text/javascript" src="{% static 'jquery.min.js' %}"></script>
		<script type="text/javascript" src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
		<script type="text/javascript" src="{% static 'jQuery-Autocomplete/jquery.autocomplete.min.js' %}"></script>
		<script type="text/javascript" src="{% static 'site.js' %}"></script>
		{% block scripts %}{% endblock %}
		{% endcompress %}
	</body>
</html>
