{% autoescape false %}
{% set url = 'http://baikal-server.com' %}
<style>
	.label-intext { vertical-align: top;}
</style>
<header class="jumbotron subhead" id="overview">
	<h1><i class="glyph2x-circle-info"></i>Dashboard</h1>
</header>

<section id="about">
	<div class="page-header">
		<h1>About this system</h1>
	</div>
	<div class="row">
		<div class="span3">
			<h2>Version</h2>
			<p>This systems runs<br />
				Baïkal <span class="label label-info label-intext">{{ BAIKAL_VERSION }}</span>, <em>{{ PROJECT_PACKAGE }}</em> package<br />
				<small><a href="{{ url }}">{{ url }}</a></small>
			</p>
		</div>
		<div class="span3">
			<h2>Services</h2>
			{% if BAIKAL_CAL_ENABLED %}
				{% set caldavclass = 'label-success' %}
				{% set caldavtext = 'On' %}
			{% else %}
				{% set caldavclass = 'label-important' %}
				{% set caldavtext = 'Off' %}
			{% endif %}
			
			{% if BAIKAL_CARD_ENABLED %}
				{% set carddavclass = 'label-success' %}
				{% set carddavtext = 'On' %}
			{% else %}
				{% set carddavclass = 'label-important' %}
				{% set carddavtext = 'Off' %}
			{% endif %}
			
			<table class="table">
				<tbody>
					<tr>
						<td>Web admin</td>
						<td><span class="label label-success label-intext">On</span></p></td>
					</tr>
					<tr>
						<td>CalDAV</td>
						<td><span class="label {{ caldavclass }} label-intext">{{ caldavtext }}</span></td>
					</tr>
					<tr>
						<td>CardDAV</td>
						<td><span class="label {{ carddavclass }} label-intext">{{ carddavtext }}</span></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="span6">
			<h2>License and credits</h2>
			<p>Baïkal is open source software licensed under the terms of the GNU GPL v3.</p>
			<p>Baïkal is based upon other open source projects.<br />Read the <a href="https://github.com/jeromeschneider/Baikal/blob/master/README.md" target="_blank">README.md</a> file to learn about that.</p>
			<p>Baïkal is developed by <a href="https://github.com/jeromeschneider" target="_blank">Jérôme Schneider</a>.
		</div>
	</div>
</section>

<section id="statistics">
	<div class="page-header">
		<h1>Statistics</h1>
	</div>
	<div class="row">
		<div class="span4">
			<h2>Users</h2>
			<table class="table">
				<tbody>
					<tr>
						<td>Registered users</td>
						<td><span class="badge">{{ nbusers }}</span></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="span4">
			<h2>CalDAV</h2>
			<table class="table">
				<tbody>
					<tr>
						<td>Number of calendars</td>
						<td><span class="badge">{{ nbcalendars }}</span></td>
					</tr>
					<tr>
						<td>Number of events</td>
						<td><span class="badge">{{ nbevents }}</span></td>
					</tr>
				</tbody>
			</table>
		</div>
		<div class="span4">
			<h2>CardDAV</h2>
			<table class="table">
				<tbody>
					<tr>
						<td>Number of address books</td>
						<td><span class="badge">{{ nbbooks }}</span></td>
					</tr>
					<tr>
						<td>Number of contacts</td>
						<td><span class="badge">{{ nbcontacts }}</span></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</section>
{% endautoescape %}