<?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
 */

$pages     = WV8_Settings::getPages();
$pagenames = $pages;
$pages     = WV8_Settings::translateList($pages);

?>
<div class="sly-area">
	<h2><?php echo ht('wv8_overview') ?></h2>

	<div class="sly-area-content">
		<p><?php echo ht('wv8_overview_intro') ?></p>
		<ul class="overview">
		<?php

		foreach ($pages as $idx => $pagename) {
			$origPage = $pagenames[$idx];
			$hash     = WV8_Settings::hash($origPage);

			print '<li><a href="index.php?page=globalsettings_settings&amp;wv8page='.$hash.'" class="wv8-page">'.sly_html($pagename).'</a>';

			$groups = WV8_Settings::getGroups($origPage);

			if (count($groups) > 1) {
				print '<ul>';

				$groups = WV8_Settings::translateList($groups);

				foreach ($groups as $group) {
					print '<li>'.sly_html($group).'</li>';
				}

				print '</ul>';
			}

			print '</li>';
		}

		?>
		</ul>
	</div>
</div>
