
{include file="../head.tpl"}

<form action="navigation.php?area={$smarty.request.area}" method="post">
<table  width="100%"  border="0" cellspacing="1" cellpadding="5" class="tableborder">
	<tr>
	  <td colspan="5" class="header">{$langadmin.menue_navigation}</td>
    </tr>
	<tr>
		<td class="firstrow">{$langadmin.title}</td>
		<td class="firstrow">{$langadmin.document}</td>
		<td class="firstrow">{$langadmin.position}</td>
		<td class="firstrow">{$langadmin.target}</td>
		<td class="firstrow">&nbsp;</td>
	</tr>
	<tr>
		
		<td class="theader">{$area->area_name}</td>
	  <td class="theader" colspan="4">
		{if permission("navinew")}
		<input onclick="location.href='navigation.php?action=new&amp;area={$smarty.request.area}&amp;area_id={$area->area_id}'" type="button" class="button" value="{$langadmin.editnavitextnew}" />
		{/if}
		<input type="submit" class="button" value="{$langadmin.position_save}">
	  </td>
		
	</tr>
	{foreach from=$navis item=navi}
	
	<tr class="secondrow" >
		<td class="secondrow"><strong>{$navi->title}</strong></td>
		<td class="secondrow"><strong>{$navi->document}</strong></td>
		<td class="secondrow"><strong>
	      <input name="posi[{$navi->id}]" type="text" id="posi[{$navi->id}]" size="5" value="{$navi->posi}">
      </strong></td>
		<td><input name="target[{$navi->id}]" type="text" size="5" maxlength="20" value="{$navi->target|default:'_self'}"></td>
		<td>
		{if permission("naviedit")}
		<input class="button" onclick="location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$navi->id}';" type="button" value="{$langadmin.menue_navigation_edit}">
		<input class="button" onclick="if(confirm('{$langadmin.confirm_del_navipoint}')) location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$navi->id}&amp;del=1';" type="button" value="{$langadmin.menue_navigation_delete}">
		{/if}
	  </td>
	</tr >
	
	
		{if count($navi->sub_navi)}
		{foreach from=$navi->sub_navi item=sub_navi}
		<tr class="firstrow">
			<td>- {$sub_navi->title}</td>
			<td class="tdspacer">{$sub_navi->document}</td>
			<td class="tdspacer">
			&rarr; <input name="posi[{$sub_navi->id}]" type="text" id="posi[{$sub_navi->id}]" size="3" value="{$sub_navi->posi}">
		  </td>
			<td class="secondrow"><input name="target[{$sub_navi->id}]" type="text" size="5" maxlength="20" value="{$sub_navi->target|default:'_self'}"></td>
			<td class="secondrow">
		{if permission("naviedit")}
		<input class="button" onclick="location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$sub_navi->id}';" type="button" value="{$langadmin.menue_navigation_edit}">
		<input class="button" onclick="if(confirm('{$langadmin.confirm_del_navipoint}')) location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$sub_navi->id}&amp;del=1';" type="button" value="{$langadmin.menue_navigation_delete}">
		
		{/if}
		  </td>
		</tr>
		
			{if count($sub_navi->sub_navi)}
			{foreach from=$sub_navi->sub_navi item=sub_sub_navi}
			
			<tr class="firstrow">
				<td class="tdspacer">- - {$sub_sub_navi->title}</td>
				<td class="tdspacer">{$sub_sub_navi->document}</td>
				<td class="tdspacer">
				&rarr;&rarr;  <input name="posi[{$sub_sub_navi->id}]" type="text" id="posi[{$sub_sub_navi->id}]" size="3" value="{$sub_sub_navi->posi}">
				</td>
				<td><input name="target[{$sub_sub_navi->id}]" type="text" size="5" maxlength="20" value="{$sub_sub_navi->target|default:'_self'}"></td>
				<td>
		{if permission("naviedit")}
		<input class="button" onclick="location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$sub_sub_navi->id}';" type="button" value="{$langadmin.menue_navigation_edit}">
		<input class="button" onclick="if(confirm('{$langadmin.confirm_del_navipoint}')) location.href='navigation.php?action=edit&amp;area={$smarty.request.area}&amp;id={$sub_sub_navi->id}&amp;del=1';" type="button" value="{$langadmin.menue_navigation_delete}">
		{/if}
				</td>
			</tr>
			
			
			{/foreach}
			{/if}
			
		{/foreach}
		
		{/if}
	{/foreach}
	<tr>
	<td colspan="5" class="firstrow"><input type="submit" class="button" value="{$langadmin.position_save}">
	  <input name="area" type="hidden" id="area" value="{$smarty.request.area}">
	  <input name="action" type="hidden" id="action" value="saveposi"></td>
	</tr>
</table>
</form>