<?php
/*
 * Copyright (c) 2013, webvariants GbR, http://www.webvariants.de
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

$classes = array('index' => null, 'initdb' => null, 'profit' => null);

foreach ($classes as $link => $class) {
	$classes[$link] = in_array($link, $enabled) ? ($active === $link ? 'active' : '') : 'disabled';
}

?>
<div class="clearfix navigation">
	<div class="btn-group pull-right">
		<button class="btn btn-mini dropdown-toggle" data-toggle="dropdown"><?php print ht('lang') ?> <span class="caret"></span></button>
		<ul class="dropdown-menu">
			<li><a href="<?php print $_router->getUrl($active, array('locale' => 'de_de')) ?>"><i class="icon-flag"></i> Deutsch</a></li>
			<li><a href="<?php print $_router->getUrl($active, array('locale' => 'en_gb')) ?>"><i class="icon-flag"></i> English</a></li>
		</ul>
	</div>

	<?php if (!empty($active)): ?>
	<ul class="nav nav-pills">
		<li class="<?php print $classes['index'] ?>"><a href="<?php print $_router->getUrl('index') ?>"><i class="icon-edit"></i> <?php print ht('configure') ?></a></li>
		<li class="disabled separator">&raquo;</li>
		<li class="<?php print $classes['initdb'] ?>"><a href="<?php print $_router->getUrl('initdb') ?>"><i class="icon-wrench"></i> <?php print ht('setup') ?></a></li>
		<li class="disabled separator">&raquo;</li>
		<li class="<?php print $classes['profit'] ?>"><a href="<?php print $_router->getUrl('profit') ?>"><i class="icon-heart"></i> <?php print ht('profit') ?></a></li>
	</ul>
	<?php endif ?>
</div>
