89 lines
3.7 KiB
HTML
89 lines
3.7 KiB
HTML
<div id="page-wrap">
|
|
<div class="row-fluid">
|
|
<div class="span12">
|
|
{if $des=="edit"||$des=="add"}
|
|
<div class="widget red">
|
|
<div class="widget-title">
|
|
<h4><i class="icon-reorder"></i>{if $des=="edit"}Редактирование{else}Добавление{/if}</h4>
|
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|
</div>
|
|
<div class="widget-body">
|
|
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
|
<div class="control-group">
|
|
<label class="control-label span2">Родительский раздел</label>
|
|
<div class="controls span10">
|
|
<select data-placeholder="Родительский раздел" class="span12" tabindex="1" name="id_item">
|
|
{foreach from=$razdels item=it}
|
|
<option value="{$it.id}"{if $it.id==$item.id_item} SELECTED{/if}>{$it.name}</option>
|
|
{/foreach}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label span2">Название поля</label>
|
|
<div class="controls span10">
|
|
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Название поля" name="name" value="{$item.name}" />
|
|
</div>
|
|
</div>
|
|
<div class="control-group">
|
|
<label class="control-label span2">Позиция</label>
|
|
<div class="controls span2">
|
|
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Номер позиции в списке" name="pos" value="{$item.pos}" />
|
|
</div>
|
|
<label class="control-label span2">Значение</label>
|
|
<div class="controls span2">
|
|
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Значение" name="value" value="{$item.value}" />
|
|
</div>
|
|
</div>
|
|
|
|
<div class="form-actions">
|
|
{if $des=="add"}
|
|
<button type="submit" name="admin3_save" class="btn btn-warning">Добавить</button>
|
|
{/if}
|
|
{if $des=="edit"}
|
|
<button type="submit" name="admin3_edit" class="btn btn-success">Редактировать</button>
|
|
<input type="HIDDEN" name="id" value="{$item.id}">
|
|
{/if}
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
{if $des=="show"}
|
|
<div class="widget red">
|
|
<div class="widget-title">
|
|
<h4><i class="icon-reorder"></i>Админ поля</h4>
|
|
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
|
</div>
|
|
<div class="widget-body">
|
|
<table class="table table-striped table-bordered table-advance table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th>№</th>
|
|
<th>Раздел</th>
|
|
<th>Название</th>
|
|
<th>Значение</th>
|
|
<th><a class="btn btn-warning tooltips" data-trigger="hover" data-original-title="Добавить позицию" href="/rejtdek/admin3/add/"><i class="icon-plus"></i></a></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{foreach from=$items item=it}
|
|
<tr>
|
|
<td>{$it.id}</td>
|
|
<td><u>{$it.razdel[0].item.razdel.name}</u>-{$it.razdel[0].item.name}<br><b>{$it.razdel[0].name}</b></td>
|
|
<td>{$it.name}</td>
|
|
<td>{$it.value}</td>
|
|
<td nowrap>
|
|
<a class="btn btn-danger tooltips" data-trigger="hover" data-original-title="Удалить позицию" href="/rejtdek/admin3/dele/{$it.id}/"><i class="icon-trash"></i></a>
|
|
<a class="btn btn-success tooltips" data-trigger="hover" data-original-title="Редактировать позицию" href="/rejtdek/admin3/edit/{$it.id}/"><i class="icon-pencil"></i></a>
|
|
</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
</div>
|
|
</div> |