<h1>{{$lang.Boxes}}</h1>
<a href="?p=boxes-form" class="new_element">{{$lang.Add_boxes}}</a>
{{if count( $aBoxes ) > 0}}
<form action="?p={{$_GET.p}}" method="post">
<fieldset id="boxes-list">
	<table class="list">
		<thead>
			<tr>
				<th class="id">{{$lang.Id}}</th><th class="name">{{$lang.Name}}</th><th class="kind">{{$lang.Type}}</th><th class="position">{{$lang.Position}}</th><th class="enabled">{{$lang.Active}}</th><th class="actions">{{$lang.Actions}}</th>
			</tr>
		</thead>
		<tbody>
			{{foreach from=$aBoxes item=aBox}}
				<tr>
					<td>{{$aBox.iBox}}</td>
					<td class="name"><a href="?p={{$aActions.f}}-form&amp;iBox={{$aBox.iBox}}">{{$aBox.sName}}</a></td>
					<td><select name="aBox[{{$aBox.iBox}}][iType]">{{foreach from=$aBoxesDisplay item=sDisplay}}<option value="{{$sDisplay@key}}" {{if $sDisplay@key == $aBox.iType}}selected="selected"{{/if}}>{{$sDisplay}}</option>{{/foreach}}</select></td>
					<td><input type="text" class="input position" name="aBox[{{$aBox.iBox}}][iPosition]" value="{{$aBox.iPosition}}"/></td>
					<td><input type="hidden" name="aBox[{{$aBox.iBox}}][iStatus]" value="0" /><input type="checkbox" name="aBox[{{$aBox.iBox}}][iStatus]" value="1" {{if $aBox.iStatus}}checked="checked"{{/if}}/></td>
					<td class="actions">
						<a href="?p={{$aActions.f}}-form&amp;iBox={{$aBox.iBox}}"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
						<a href="?p={{$aActions.f}}-delete&amp;iBox={{$aBox.iBox}}" class="delete"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}" /></a>
					</td>
				</tr>
			{{/foreach}}
		</tbody>
	</table>

	<div class="save float"><div class="save floatcontainer">
	<input type="submit" class="submit" value="{{$lang.Save}} &raquo;" name="sOption" />
	</div></div>

</fieldset>
</form>
{{else}}
	<div class="msg" id="error">
		<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Data_not_found}}
	</div>
{{/if}}