{% extends "bootstrap/base.html" %}
{%block styles%}
{{super()}}
<link href="{{url_for('static', filename='jqueryui/jquery-ui.min.css')}}"
			rel="stylesheet" media="screen">
<style>
.event.row h3 { text-align: center; }
.event.row { border-top: 1px dotted black; }
</style>
{%endblock%}
{%block scripts%}
{{super()}}
<script src="{{url_for('static', filename='jqueryui/jquery-ui.min.js')}}"
				type="text/javascript"></script>
<script type="text/javascript">
$(function() {
	$('.button').button({});
});
</script>
{%endblock%}
{% block title %}Larigira{% endblock title %}
{% block navbar %}
<nav class="navbar navbar-default">
	<div class="container-fluid">

		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
												 data-toggle="collapse"
						 data-target="#bs-navbar-collapse-1">
				<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('db.home')}}">Larigira</a>
		</div>{# navbar-header #}

		<div class="collapse navbar-collapse" id="bs-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li><a href="{{url_for('db.events_list')}}">List</a></li>
				<li><a href="{{url_for('db.addtime')}}">Add time</a></li>
				<li><a href="{{url_for('db.addaudio')}}">Add audio</a></li>
				<li><a href="{{url_for('db.events_calendar')}}">Calendar</a></li>
				{% for link in config.EXTRA_MENU_LINKS %}
					<li><a href="{{link.href}}" title="{{link.title}}">{{link.text}}</a></li>
				{% endfor %}
			</ul>
		</div>{# collapse #}

	</div>{#container-fluid#}
</nav>
{% block messages %}
{% with messages = get_flashed_messages() %}
  {% if messages %}
	<div class="alert alert-info">
    <ul class=flashes>
    {% for message in messages %}
      <li>{{ message }}</li>
    {% endfor %}
    </ul>
	</div>
  {% endif %}
{% endwith %}
{% endblock messages %}
{% endblock %}

{% macro dict_table(obj, exclude_list=[]) %}
<table id="details-{{obj.kind}}-{{obj.eid}}" class="table table-condensed
	option-table collapse">
	<thead>
		<tr>
			<th>Option</th>
			<th>Value</th>
		</tr>
	</thead>
	<tbody>
		{% for key in obj if key not in exclude_list%}
		<tr>
			<td>{{key}}</td>
			<td>{{obj[key]}}</td>
		</tr>
		{% endfor %}
	</tbody>
</table>
{% endmacro %}

{# vim: set ts=2 sw=2 noet: #}
