407 lines
24 KiB
PHP
407 lines
24 KiB
PHP
<?php /* Smarty version Smarty-3.1.13, created on 2022-09-22 17:09:26
|
||
compiled from "tpl/tpl_rejtnpr_admin2.html" */ ?>
|
||
<?php /*%%SmartyHeaderCode:1955621170632c6c9631b190-64659165%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||
$_valid = $_smarty_tpl->decodeProperties(array (
|
||
'file_dependency' =>
|
||
array (
|
||
'ef03d63df119690c01766bfe114da6b73f81e57d' =>
|
||
array (
|
||
0 => 'tpl/tpl_rejtnpr_admin2.html',
|
||
1 => 1552932144,
|
||
2 => 'file',
|
||
),
|
||
),
|
||
'nocache_hash' => '1955621170632c6c9631b190-64659165',
|
||
'function' =>
|
||
array (
|
||
),
|
||
'variables' =>
|
||
array (
|
||
'des' => 0,
|
||
'item' => 0,
|
||
'useranketa_polya' => 0,
|
||
'up' => 0,
|
||
'up_razdel' => 0,
|
||
'up_razdel_ip' => 0,
|
||
'up_razdel_ipp' => 0,
|
||
'itemspolyas' => 0,
|
||
'it' => 0,
|
||
'razdels' => 0,
|
||
'ipis' => 0,
|
||
'polyas' => 0,
|
||
'it0' => 0,
|
||
'items' => 0,
|
||
),
|
||
'has_nocache_code' => false,
|
||
'version' => 'Smarty-3.1.13',
|
||
'unifunc' => 'content_632c6c963cd797_31612180',
|
||
),false); /*/%%SmartyHeaderCode%%*/?>
|
||
<?php if ($_valid && !is_callable('content_632c6c963cd797_31612180')) {function content_632c6c963cd797_31612180($_smarty_tpl) {?><div id="page-wrap">
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<?php if ($_smarty_tpl->tpl_vars['des']->value=="formula"){?>
|
||
<div class="widget purple">
|
||
<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">
|
||
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
||
<h2><?php echo $_smarty_tpl->tpl_vars['item']->value['name'];?>
|
||
</h2>
|
||
<div class="row-fluid">
|
||
<div class="span6">
|
||
<h3>Поля из анкет НПР</h3>
|
||
<select id="pol_npr_01" class=""><option value="0">выберите поле</option>
|
||
<?php $_smarty_tpl->tpl_vars['up'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['up']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['useranketa_polya']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['up']->key => $_smarty_tpl->tpl_vars['up']->value){
|
||
$_smarty_tpl->tpl_vars['up']->_loop = true;
|
||
?>
|
||
<option value="0" disabled><?php echo $_smarty_tpl->tpl_vars['up']->value['id'];?>
|
||
:<?php echo $_smarty_tpl->tpl_vars['up']->value['name'];?>
|
||
</option>
|
||
<?php $_smarty_tpl->tpl_vars['up_razdel'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['up_razdel']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['up']->value['razdel']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['up_razdel']->key => $_smarty_tpl->tpl_vars['up_razdel']->value){
|
||
$_smarty_tpl->tpl_vars['up_razdel']->_loop = true;
|
||
?>
|
||
<option value="0" disabled>__<?php echo $_smarty_tpl->tpl_vars['up_razdel']->value['id'];?>
|
||
:<?php echo mb_substr($_smarty_tpl->tpl_vars['up_razdel']->value['name'],0,80);?>
|
||
</option>
|
||
<?php $_smarty_tpl->tpl_vars['up_razdel_ip'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['up_razdel_ip']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['up_razdel']->value['itemspolyas']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['up_razdel_ip']->key => $_smarty_tpl->tpl_vars['up_razdel_ip']->value){
|
||
$_smarty_tpl->tpl_vars['up_razdel_ip']->_loop = true;
|
||
?>
|
||
<option value="ua_<?php echo $_smarty_tpl->tpl_vars['up']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['up_razdel']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['up_razdel_ip']->value['id'];?>
|
||
">____<?php echo $_smarty_tpl->tpl_vars['up_razdel_ip']->value['id'];?>
|
||
:<?php echo mb_substr($_smarty_tpl->tpl_vars['up_razdel_ip']->value['name'],0,80);?>
|
||
</option>
|
||
<?php if (count($_smarty_tpl->tpl_vars['up_razdel_ip']->value['polyas'])>1){?><?php $_smarty_tpl->tpl_vars['up_razdel_ipp'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['up_razdel_ipp']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['up_razdel_ip']->value['polyas']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['up_razdel_ipp']->key => $_smarty_tpl->tpl_vars['up_razdel_ipp']->value){
|
||
$_smarty_tpl->tpl_vars['up_razdel_ipp']->_loop = true;
|
||
?>
|
||
<option value="ua_<?php echo $_smarty_tpl->tpl_vars['up']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['up_razdel']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['up_razdel_ip']->value['id'];?>
|
||
_<?php echo $_smarty_tpl->tpl_vars['up_razdel_ipp']->value['id'];?>
|
||
">______<?php echo $_smarty_tpl->tpl_vars['up_razdel_ipp']->value['id'];?>
|
||
:<?php echo mb_substr($_smarty_tpl->tpl_vars['up_razdel_ipp']->value['name'],0,80);?>
|
||
</option>
|
||
<?php } ?><?php }?>
|
||
<?php } ?>
|
||
<?php } ?>
|
||
<?php } ?>
|
||
</select>
|
||
<a class="btn btn-success tooltips pol_npr_01_add" href="#" data-placement="top" data-original-title="добавить в формулу поле">добавить</a>
|
||
|
||
</div>
|
||
<div class="span6">
|
||
<h3>Заполняемые пользователем поля <span style="font-size:13px;color:gray;">могут участвовать в формуле</span></h3>
|
||
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['itemspolyas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
?>
|
||
<a class="btn btn-info tooltips fadd" id="ip_<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
" href="#" data-placement="top" data-original-title="ip_<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
<?php if ($_smarty_tpl->tpl_vars['it']->value['polyas']!=0){?>У поля есть значение БАЛЛ<?php }?>"><?php echo $_smarty_tpl->tpl_vars['it']->value['name'];?>
|
||
<?php if ($_smarty_tpl->tpl_vars['it']->value['polyas']!=0){?><span class="badge badge-important"><?php echo $_smarty_tpl->tpl_vars['it']->value['polyas'];?>
|
||
</span><?php }?></a>
|
||
<?php } ?>
|
||
</div>
|
||
</div>
|
||
<hr>
|
||
<div class="control-group">
|
||
<label class="control-label span2">ФОРМУЛА</label>
|
||
<div class="controls span6">
|
||
<input type="text" class="span12 tooltips formula" data-trigger="hover" data-original-title="Формула" name="formula" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['formuls'];?>
|
||
" /><br>
|
||
<a class="btn btn-warning tooltips fadd" id="ЕСЛИ[усл#истина#ложь]" href="#" data-placement="top" data-original-title="Вставка условия">ЕСЛИ</a>
|
||
<a class="btn btn-warning tooltips fadd" id="ИЛИ(усл1;усл2;усл3)" href="#" data-placement="top" data-original-title="Вставка в условие ИЛИ">ИЛИ</a>
|
||
<a class="btn btn-warning tooltips fadd" id="И(усл1;усл2;усл3)" href="#" data-placement="top" data-original-title="Вставка в условие И">И</a>
|
||
<a class="btn btn-warning tooltips fadd" id="=" href="#" data-placement="top" data-original-title="Равно">=</a>
|
||
<a class="btn btn-warning tooltips fadd" id="<>" href="#" data-placement="top" data-original-title="не равно"><></a>
|
||
<a class="btn btn-warning tooltips fadd" id="<" href="#" data-placement="top" data-original-title="меньше"><</a>
|
||
<a class="btn btn-warning tooltips fadd" id=">" href="#" data-placement="top" data-original-title="больше">></a>
|
||
<a class="btn btn-warning tooltips fadd" id=">=" href="#" data-placement="top" data-original-title="больше или равно">>=</a>
|
||
<a class="btn btn-warning tooltips fadd" id="<=" href="#" data-placement="top" data-original-title="меньше или равно"><=</a>
|
||
<a class="btn btn-warning tooltips fadd" id="+" href="#" data-placement="top" data-original-title="сложить">+</a>
|
||
<a class="btn btn-warning tooltips fadd" id="-" href="#" data-placement="top" data-original-title="вычесть">-</a>
|
||
<a class="btn btn-warning tooltips fadd" id="*" href="#" data-placement="top" data-original-title="умножить">*</a>
|
||
<a class="btn btn-warning tooltips fadd" id="/" href="#" data-placement="top" data-original-title="делить">/</a>
|
||
<a class="btn btn-info tooltips fadd" id="СУММ_КАФ_ПОЛЕ_ЗНАЧ()" href="#" data-placement="top" data-original-title="суммировать значения всех НПР с кафедры по полю в скобках">СУММ_КАФ_ПОЛЕ_ЗНАЧ</a>
|
||
<a class="btn btn-info tooltips fadd" id="СУММ_КАФ_ПОЛЕ_КОЛ()" href="#" data-placement="top" data-original-title="суммировать кол-во всех НПР с кафедры по полю в скобках">СУММ_КАФ_ПОЛЕ_КОЛ</a>
|
||
<br>если поле не должно заполняться пользователем - добавьте впереди <a class="btn btn-danger tooltips fadd" id="0|" href="#" data-placement="top" data-original-title="поле не заполняется пользователем">0|</a>
|
||
</div>
|
||
<label class="control-label span4">
|
||
<span style="color:gray;">[ip_1]</span><span style="color:blue;">*</span><span style="color:red;">ЕСЛИ</span><b>[</b><span style="color:red;">И</span><b>(</b><span style="color:gray;">[ip_2]</span><span style="color:blue;">=</span>оч<span style="color:red;">;</span><span style="color:gray;">[ip_3]</span><span style="color:blue;"><></span>50<b>)</b><span style="color:red;">#</span>2<span style="color:blue;">*</span><span style="color:gray;">[ip_4]</span><span style="color:red;">#</span>0<b>]</b><br><span style="color:gray;">[ip_1]</span>=5;<span style="color:gray;">[ip_2]</span>=оч;<span style="color:gray;">[ip_3]</span>=49;<span style="color:gray;">[ip_4]</span>=4; Результат: 40<br><span style="color:gray;">[ip_1]</span>=8;<span style="color:gray;">[ip_2]</span>=оч;<span style="color:gray;">[ip_3]</span>=50;<span style="color:gray;">[ip_4]</span>=2; Результат: 0
|
||
</label>
|
||
</div>
|
||
|
||
<div class="form-actions">
|
||
<button type="submit" name="admin2f_save" class="btn btn-success">Редактировать</button>
|
||
<input type="HIDDEN" name="id" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
|
||
">
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<script>$(document).ready(function(){
|
||
$(".fadd").click(function(){
|
||
var id=$(this).attr("id");
|
||
var $txt = $(".formula");
|
||
var caretPos = $txt[0].selectionStart;
|
||
var textAreaTxt = $txt.val();
|
||
$txt.val(textAreaTxt.substring(0, caretPos) + id + textAreaTxt.substring(caretPos) );
|
||
setCaretToPos ($txt[0], caretPos+id.length);
|
||
return false;
|
||
});
|
||
$(".pol_npr_01_add").click(function(){
|
||
var id = "[" + $("#pol_npr_01 option:selected").val() + "]";
|
||
var $txt = $(".formula");
|
||
var caretPos = $txt[0].selectionStart;
|
||
var textAreaTxt = $txt.val();
|
||
$txt.val(textAreaTxt.substring(0, caretPos) + id + textAreaTxt.substring(caretPos) );
|
||
setCaretToPos ($txt[0], caretPos+id.length);
|
||
return false;
|
||
});
|
||
function setSelectionRange(input, selectionStart, selectionEnd) {
|
||
if (input.setSelectionRange) {
|
||
input.focus();
|
||
input.setSelectionRange(selectionStart, selectionEnd);
|
||
}
|
||
else if (input.createTextRange) {
|
||
var range = input.createTextRange();
|
||
range.collapse(true);
|
||
range.moveEnd('character', selectionEnd);
|
||
range.moveStart('character', selectionStart);
|
||
range.select();
|
||
}
|
||
}
|
||
|
||
function setCaretToPos (input, pos) {
|
||
setSelectionRange(input, pos, pos);
|
||
}
|
||
});</script>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['des']->value=="edit"||$_smarty_tpl->tpl_vars['des']->value=="add"){?>
|
||
<div class="widget purple">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i><?php if ($_smarty_tpl->tpl_vars['des']->value=="edit"){?>Редактирование<?php }else{ ?>Добавление<?php }?></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_razdel">
|
||
<option value="0">Корневая-без родителя</option>
|
||
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['razdels']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
?>
|
||
<option value="<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
"<?php if ($_smarty_tpl->tpl_vars['it']->value['id']==$_smarty_tpl->tpl_vars['item']->value['id_razdel']){?> SELECTED<?php }?>><?php echo $_smarty_tpl->tpl_vars['it']->value['name'];?>
|
||
</option>
|
||
<?php } ?>
|
||
</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="<?php echo $_smarty_tpl->tpl_vars['item']->value['name'];?>
|
||
" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label span2">Описание раздела</label>
|
||
<div class="controls span10">
|
||
<textarea class="span12 tooltips" data-trigger="hover" data-original-title="Описание раздела" name="descr"><?php echo $_smarty_tpl->tpl_vars['item']->value['descr'];?>
|
||
</textarea>
|
||
</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="<?php echo $_smarty_tpl->tpl_vars['item']->value['pos'];?>
|
||
" />
|
||
</div>
|
||
<label class="control-label span2">Тип</label>
|
||
<div class="controls span2">
|
||
<select data-placeholder="Дублируемая позиция или нет" class="span12" tabindex="1" name="tip">
|
||
<option value="1"<?php if ($_smarty_tpl->tpl_vars['item']->value['tip']==1){?> SELECTED<?php }?>>Дублируется</option>
|
||
<option value="0"<?php if ($_smarty_tpl->tpl_vars['item']->value['tip']==0){?> SELECTED<?php }?>>Не дублируется</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<hr>
|
||
<h2>Добавление заполняемых полей в раздел <span style="font-size:13px;color:gray;">эти поля заполняет пользователь</span></h2>
|
||
<div class="control-group">
|
||
<label class="control-label span6">Название поля</label>
|
||
<label class="control-label span2">Позиция</label>
|
||
<label class="control-label span2">Значение<span style="font-size:13px;color:gray;">по умолч.</span></label>
|
||
<label class="control-label span2">Удалить</label>
|
||
</div>
|
||
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['itemspolyas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
?>
|
||
<div class="control-group">
|
||
<div class="controls span6">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Название поля" name="itemspolya[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][name]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['name'];?>
|
||
" />
|
||
</div>
|
||
<div class="controls span2">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Номер позиции в списке" name="itemspolya[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][pos]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['pos'];?>
|
||
" />
|
||
</div>
|
||
<div class="controls span2">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Значение" name="itemspolya[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][value]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['value'];?>
|
||
" />
|
||
</div>
|
||
<div class="controls span2">
|
||
<?php if ($_smarty_tpl->tpl_vars['it']->value['id']>0){?>
|
||
<input type="CHECKBOX" class="span12 tooltips" data-trigger="hover" data-original-title="Удалить" name="itemspolya[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][del]" value="1" />
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
<?php } ?>
|
||
|
||
<hr>
|
||
<h2>Добавление выбираемых полей в раздел <span style="font-size:13px;color:gray;">для одиночного поля укажите "название поля" равное "балл"</span></h2>
|
||
<?php if ($_smarty_tpl->tpl_vars['ipis']->value>0){?>
|
||
<table class="table table-bordered table-advance">
|
||
<thead>
|
||
<tr>
|
||
<th>Заполняемое поле</th>
|
||
<th>Название поля</th>
|
||
<th>Позиция</th>
|
||
<th>Значение</th>
|
||
<th>Удалить</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['polyas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
?>
|
||
<tr>
|
||
<td><select name="polyas[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][id_item]" class="span12"><?php $_smarty_tpl->tpl_vars['it0'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it0']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['itemspolyas']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it0']->key => $_smarty_tpl->tpl_vars['it0']->value){
|
||
$_smarty_tpl->tpl_vars['it0']->_loop = true;
|
||
?><option value="<?php echo $_smarty_tpl->tpl_vars['it0']->value['id'];?>
|
||
"<?php if ($_smarty_tpl->tpl_vars['it']->value['id_item']==$_smarty_tpl->tpl_vars['it0']->value['id']){?> SELECTED<?php }?>><?php echo $_smarty_tpl->tpl_vars['it0']->value['name'];?>
|
||
</option><?php } ?></select></td>
|
||
<td><input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Название поля" name="polyas[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][name]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['name'];?>
|
||
" /></td>
|
||
<td><input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Номер позиции в списке" name="polyas[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][pos]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['pos'];?>
|
||
" /></td>
|
||
<td><input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Значение" name="polyas[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][value]" value="<?php echo $_smarty_tpl->tpl_vars['it']->value['value'];?>
|
||
" /></td>
|
||
<td><?php if ($_smarty_tpl->tpl_vars['it']->value['id']>0){?>
|
||
<input type="CHECKBOX" class="span12 tooltips" data-trigger="hover" data-original-title="Удалить" name="polyas[<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
][del]" value="1" />
|
||
<?php }?></td>
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
<?php }else{ ?>
|
||
<p>Добавьте заполняемые поля в раздел!</p>
|
||
<?php }?>
|
||
<div class="form-actions">
|
||
<?php if ($_smarty_tpl->tpl_vars['des']->value=="add"){?>
|
||
<button type="submit" name="admin2_save" class="btn btn-warning">Добавить</button>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['des']->value=="edit"){?>
|
||
<button type="submit" name="admin2_edit" class="btn btn-success">Редактировать</button>
|
||
<input type="HIDDEN" name="id" value="<?php echo $_smarty_tpl->tpl_vars['item']->value['id'];?>
|
||
">
|
||
<?php }?>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
<?php if ($_smarty_tpl->tpl_vars['des']->value=="show"){?>
|
||
<div class="widget purple">
|
||
<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>Формула</th>
|
||
<th><a class="btn btn-warning tooltips" data-trigger="hover" data-original-title="Добавить позицию" href="/rejtnpr/admin2/add/"><i class="icon-plus"></i></a></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<?php $_smarty_tpl->tpl_vars['it'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['it']->_loop = false;
|
||
$_from = $_smarty_tpl->tpl_vars['items']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||
foreach ($_from as $_smarty_tpl->tpl_vars['it']->key => $_smarty_tpl->tpl_vars['it']->value){
|
||
$_smarty_tpl->tpl_vars['it']->_loop = true;
|
||
?>
|
||
<tr>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['it']->value['razdel'][0]['name'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['it']->value['name'];?>
|
||
</td>
|
||
<td><?php echo $_smarty_tpl->tpl_vars['it']->value['tip'];?>
|
||
</td>
|
||
<td>
|
||
<?php if ($_smarty_tpl->tpl_vars['it']->value['formuls']!=''){?>
|
||
<a class="btn btn-danger tooltips" data-trigger="hover" data-original-title="<?php echo $_smarty_tpl->tpl_vars['it']->value['formuls'];?>
|
||
" href="/rejtnpr/admin2/formula/<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
/"><i class="icon-superscript"></i></a>
|
||
<?php }else{ ?>
|
||
<a class="btn btn-default tooltips" data-trigger="hover" data-original-title="Редактировать формулу" href="/rejtnpr/admin2/formula/<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
/"><i class="icon-superscript"></i></a>
|
||
<?php }?>
|
||
</td>
|
||
<td nowrap>
|
||
|
||
<a class="btn btn-info tooltips" href="#" data-placement="top" data-original-title="Значений всего"><?php echo $_smarty_tpl->tpl_vars['it']->value['ipolej'];?>
|
||
</a>
|
||
<a class="btn btn-danger tooltips" data-trigger="hover" data-original-title="Удалить позицию" href="/rejtnpr/admin2/dele/<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
/"><i class="icon-trash"></i></a>
|
||
<a class="btn btn-success tooltips" data-trigger="hover" data-original-title="Редактировать позицию" href="/rejtnpr/admin2/edit/<?php echo $_smarty_tpl->tpl_vars['it']->value['id'];?>
|
||
/"><i class="icon-pencil"></i></a>
|
||
</td>
|
||
</tr>
|
||
<?php } ?>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
<?php }?>
|
||
</div>
|
||
</div>
|
||
</div><?php }} ?>
|