{layout '@layout.latte'}
{var $active = 'overview'}

{block title}{$config->title ?: 'Overview'}{/block}

{block content}

{include title}

	{var $group = false}

	<table class="summary" id="namespaces" n:if="$namespaces">
		<caption>Namespaces summary</caption>
		{foreach $namespaces as $namespace}
			{continueIf $config->main && 0 !== strpos($namespace, $config->main)}
			<tr>
				{var $group = true}
				<td class="name"><a href="{$namespace|namespaceUrl}">{$namespace}</a></td>
			</tr>
		{/foreach}
	</table>

	<table class="summary" id="packages" n:if="count($packages)">
		<caption>Packages summary</caption>
		{foreach $packages as $package}
			{continueIf $config->main && 0 !== strpos($package, $config->main)}
			<tr>
				{var $group = true}
				<td class="name">
					<a href="{$package|packageUrl}">{$package}</a>
				</td>
			</tr>
		{/foreach}
	</table>

	{if ! $group}
		{include '@elementlist.latte'}
	{/if}

{/block}
