EIOS/integration/tpl/templates_c/8d4d281a68b51f73be4a659fa80...

340 lines
18 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
/* Smarty version 4.0.0-rc.0, created on 2023-09-19 11:25:55
from '/home/admin/web/eios.mkgtu.ru/public_html/rabprog/tpl/page_rpds_signs.html' */
/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
'version' => '4.0.0-rc.0',
'unifunc' => 'content_65095b1311c179_71709628',
'has_nocache_code' => false,
'file_dependency' =>
array (
'8d4d281a68b51f73be4a659fa80d2b249857b54b' =>
array (
0 => '/home/admin/web/eios.mkgtu.ru/public_html/rabprog/tpl/page_rpds_signs.html',
1 => 1694785785,
2 => 'file',
),
),
'includes' =>
array (
'file:mod_navpages.html' => 1,
),
),false)) {
function content_65095b1311c179_71709628 (Smarty_Internal_Template $_smarty_tpl) {
?><h3 class="text-center">Список созданных рабочих программ на подпись!</h3>
<?php if ((isset($_smarty_tpl->tpl_vars['aUSER']->value['statuses'][79]))) {?>
<div class="btn-group">
<a href="/rabprog/rpdsign/rs1/" class="btn btn-primary <?php if ($_smarty_tpl->tpl_vars['show']->value == "rs1") {?>active btn-success<?php }?>" aria-current="page">РПД на подпись</a>
<a href="/rabprog/rpdsign/rs3/" class="btn btn-primary <?php if ($_smarty_tpl->tpl_vars['show']->value == "rs3") {?>active btn-success<?php }?>">РПД на подпись ЗАВ.КАФ.</a>
<a href="/rabprog/rpdsign/rs2/" class="btn btn-primary <?php if ($_smarty_tpl->tpl_vars['show']->value == "rs2") {?>active btn-success<?php }?>">РПД подписанные</a>
<a href="/rabprog/rpdsign/rs4/" class="btn btn-primary <?php if ($_smarty_tpl->tpl_vars['show']->value == "rs4") {?>active btn-success<?php }?>">РПД подписанные УП(каф)</a>
<form method="post" action="/rabprog/rpdsign/<?php echo $_smarty_tpl->tpl_vars['show']->value;?>
/">
<input type="text" class="form-control" placeholder="поиск" name="search" value="" style="float: left;width: 64%;">
<input class="btn btn-sm btn-success" type="submit" name="search_btn" value="Поиск" style="margin-top: 3px;">
</form>
</div>
<?php } else { ?>
<div class="btn-group">
<form method="post" action="/rabprog/rpdsign/<?php echo $_smarty_tpl->tpl_vars['show']->value;?>
/">
<input type="text" class="form-control" placeholder="поиск" name="search" value="" style="float: left;width: 64%;">
<input class="btn btn-sm btn-success" type="submit" name="search_btn" value="Поиск" style="margin-top: 3px;">
</form>
</div>
<?php }
if (count($_smarty_tpl->tpl_vars['DISCIPS']->value)) {?>
<!--<pre><?php echo print_r($_smarty_tpl->tpl_vars['debug_sql']->value);?>
</pre>-->
<?php if ((isset($_smarty_tpl->tpl_vars['debug_sql']->value)) && count($_smarty_tpl->tpl_vars['debug_sql']->value)) {
$_smarty_tpl->_assignInScope('time', 0);
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['debug_sql']->value, 'debsql');
$_smarty_tpl->tpl_vars['debsql']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['debsql']->value) {
$_smarty_tpl->tpl_vars['debsql']->do_else = false;
$_smarty_tpl->_assignInScope('time', $_smarty_tpl->tpl_vars['time']->value+$_smarty_tpl->tpl_vars['debsql']->value['time']);
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
<p>всего запросов на <?php echo round($_smarty_tpl->tpl_vars['time']->value,2);?>
сек</p>
<?php }?>
<table class="table">
<thead>
<tr>
<td colspan="5"><?php $_smarty_tpl->_subTemplateRender("file:mod_navpages.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('nav'=>$_smarty_tpl->tpl_vars['navpages']->value,'url'=>"/rabprog/rpdsign/".((string)$_smarty_tpl->tpl_vars['show']->value)."/"), 0, false);
?></td>
</tr>
<tr>
<th class="col-1" rowspan="2">Индекс</th>
<th class="col-3" rowspan="2">Название</th>
<th class="col-3">Кафедра выпускающая / Кафедра</th>
<th class="col-1">Год</th>
<th class="col-2" rowspan="2">
<input type="text" class="form-control filter" placeholder="фильтр" value="">
</th>
</tr>
</thead>
<tbody id="fbody">
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['DISCIPS']->value, 'disc');
$_smarty_tpl->tpl_vars['disc']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['disc']->value) {
$_smarty_tpl->tpl_vars['disc']->do_else = false;
?>
<tr class="trtd">
<td><?php echo $_smarty_tpl->tpl_vars['disc']->value['index1'];?>
<br><span style="font-size: 10px;color:gray;">№ <?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
</span></td>
<td>
<span data-bs-toggle="tooltip" data-bs-placement="bottom" title="<?php echo $_smarty_tpl->tpl_vars['disc']->value['program'];?>
<?php echo $_smarty_tpl->tpl_vars['disc']->value['srok_poluch_obr'];?>
<?php echo $_smarty_tpl->tpl_vars['disc']->value['shifr'];?>
"><?php echo $_smarty_tpl->tpl_vars['disc']->value['name'];?>
</span><br>
<span style="font-size: 10px;color:gray;"><?php echo $_smarty_tpl->tpl_vars['disc']->value['naprav'];?>
</span>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['disc']->value['kaf_name_vyp'];?>
<br><?php echo $_smarty_tpl->tpl_vars['disc']->value['kaf_name'];?>
</td>
<td><?php echo $_smarty_tpl->tpl_vars['disc']->value['god_nach_podgot'];?>
</td>
<td id="td_uprav_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
">
<?php if ($_smarty_tpl->tpl_vars['disc']->value['file_pdf'] != '') {?>
<?php if ($_smarty_tpl->tpl_vars['disc']->value['edit'] == 1) {?>
<a class="btn btn-sm btn-warning" href="<?php echo $_smarty_tpl->tpl_vars['disc']->value['url_pdf'];?>
" target="_blank">дбНИКА</a>
<?php } else { ?>
<table class="table table-sm">
<tr>
<td>
<a class="btn btn-sm btn-warning" href="<?php echo $_smarty_tpl->tpl_vars['disc']->value['file_pdf'];?>
" target="_blank">РПД</a>
<a class="btn btn-sm btn-info" href="/rabprog/rpd/anotac/<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
/" target="_blank">Аннот.</a>
<a class="btn btn-sm btn-info" href="/rabprog/rpd/fos/<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
/" target="_blank">ФОС</a>
<?php if ($_smarty_tpl->tpl_vars['show']->value == "rs2" && ((isset($_smarty_tpl->tpl_vars['aUSER']->value['statuses'][79])))) {?>
<a href="#" class="btn btn-sm btn-danger rpd_sign" id="btnRPDSign0_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-sign="0" data-kafvyp="<?php echo $_smarty_tpl->tpl_vars['disc']->value['kafvyp'];?>
" data-bs-toggle="tooltip" data-bs-placement="top" title="Удалить подпись проректора!" ><i class="bi bi-backspace-fill"></i></a>
<?php }?>
</td>
<td>
<?php if ($_smarty_tpl->tpl_vars['disc']->value['url_pdf'] != '') {?><a class="btn btn-sm btn-danger" href="<?php echo $_smarty_tpl->tpl_vars['disc']->value['url_pdf'];?>
" target="_blank">дбНИКА</a><?php }?>
</td>
</tr>
<tr>
<td class="col-10"><input type="TEXT" class="form-control-sm" placeholder="ссылка на PDF" value="<?php echo $_smarty_tpl->tpl_vars['disc']->value['url_pdf'];?>
" id="btnRPDSignURL_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
"></td>
<td class="col-2"><a href="#" class="btn btn-sm btn-info btnRPDSignURL_save" data-id="<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-hr="<?php echo $_smarty_tpl->tpl_vars['disc']->value['file_pdf'];?>
" data-bs-toggle="tooltip" data-bs-placement="top" title="Сохранить внешнюю ссылку, которую получили после загрузки скачанного, отсюда, файла PDF"><i class="bi bi-save"></i></a></td>
</tr>
</table>
<?php }?>
<?php } else { ?>
<?php if ($_smarty_tpl->tpl_vars['disc']->value['edit'] == 1) {?>
<!--a href="/rabprog/rpdsign/pdf/<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
/" class="btn btn-sm btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="Получение PDF" target="_blank"><i class="bi bi-file-earmark-pdf"></i></a-->
<a href="/rabprog/rpdsign/pdf/<?php echo $_smarty_tpl->tpl_vars['disc']->value['saveinfo']['save_id'];?>
/" class="btn btn-sm btn-primary" data-bs-toggle="tooltip" data-bs-placement="top" title="Получение PDF" target="_blank"><i class="bi bi-file-earmark-pdf"></i></a>
<a href="#" class="btn btn-sm btn-danger rpd_sign" id="btnRPDSign0_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-sign="0" data-kafvyp="<?php echo $_smarty_tpl->tpl_vars['disc']->value['kafvyp'];?>
" data-bs-toggle="tooltip" data-bs-placement="top" title="Вернуть <?php if ($_smarty_tpl->tpl_vars['disc']->value['pur'] == 1) {?>зав.выпускающей кафедры<?php } else {
if ($_smarty_tpl->tpl_vars['disc']->value['kafvyp'] == 1) {?>зав.кафедры<?php } else { ?>разработчику<?php }
}?> на доработку!" ><i class="bi bi-backspace-fill"></i></a> |
<a href="#" class="btn btn-sm btn-success rpd_sign" id="btnRPDSign1_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-id="<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-sign="1" data-kafvyp="<?php echo $_smarty_tpl->tpl_vars['disc']->value['kafvyp'];?>
" data-bs-toggle="tooltip" data-bs-placement="top" title="Подписать РПД <?php if ($_smarty_tpl->tpl_vars['disc']->value['pur'] == 1) {?>как проректор по УР<?php } else {
if ($_smarty_tpl->tpl_vars['disc']->value['kafvyp'] == 1) {?>как зав.выпускающей кафедры<?php } else { ?>как зав.каф.<?php }
}?> и отправить далее!"><i class="bi bi-check-circle"></i></a>
<?php }?>
<?php }?>
<pre style="display: none;"><?php echo print_r($_smarty_tpl->tpl_vars['disc']->value);?>
</pre>
</td>
</tr>
<?php if ((isset($_smarty_tpl->tpl_vars['disc']->value['rpdsigns'])) && count($_smarty_tpl->tpl_vars['disc']->value['rpdsigns'])) {?>
<tr class="trtd">
<td colspan="5" style="text-align: right;">
<div id="sign_descrip_<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" style="display: inline;"></div>
<?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['disc']->value['rpdsigns'], 'rs', false, 'k');
$_smarty_tpl->tpl_vars['rs']->do_else = true;
if ($_from !== null) foreach ($_from as $_smarty_tpl->tpl_vars['k']->value => $_smarty_tpl->tpl_vars['rs']->value) {
$_smarty_tpl->tpl_vars['rs']->do_else = false;
?>
<span data-bs-toggle="tooltip" data-bs-placement="top" title="<?php if ($_smarty_tpl->tpl_vars['rs']->value['status'] == 1) {?>подписано<?php } else { ?>не подписано<?php }?> <?php echo date('H:i d.m.Y',$_smarty_tpl->tpl_vars['rs']->value['data_c']);?>
" class="badge <?php if ($_smarty_tpl->tpl_vars['rs']->value['status'] == 1) {
if ($_smarty_tpl->tpl_vars['rs']->value['sign'] == "Библиотека") {?>bg-warning<?php } else { ?>bg-success<?php }
} else { ?>bg-danger<?php }?> sign_descrip" style="cursor: pointer;" data-id="<?php echo $_smarty_tpl->tpl_vars['disc']->value['id'];?>
" data-descr="<?php echo $_smarty_tpl->tpl_vars['rs']->value['descrip'];?>
">
<?php echo $_smarty_tpl->tpl_vars['rs']->value['sign'];?>
</span>
<?php if ($_smarty_tpl->tpl_vars['k']->value == 0 && $_smarty_tpl->tpl_vars['rs']->value['id_user'] == $_smarty_tpl->tpl_vars['aUSER']->value['id']) {?><a href="/rabprog/rpdsign/delsign/<?php echo $_smarty_tpl->tpl_vars['rs']->value['id'];?>
/" class="btn btn-sm btn-danger confirmation" style="line-height: 0.7;">x</a><?php }?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</td>
</tr>
<?php }?>
<?php
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
</tbody>
</table>
<?php echo '<script'; ?>
>$(document).ready(function(){
$('.confirmation').on('click', function () {
return confirm('Удалить элемент?');
});
$(".btnRPDSignURL_save").click(function(){
let id = $(this).data('id');
let hr = $(this).data('hr');
let url = $("#btnRPDSignURL_"+id).val();
$.ajax({url: '/rabprog/rpdsign/',cache:false,datatype:'json',method:'post',
data: 'ajdes=RPDSignURL&id_disc='+id+'&url='+url+'&hr='+hr,
success:function(data){
window.ToastShow1("Сохраняем внешнюю ссылку!",data.msg,data.err);
}
});
return false;
});
//просмотр описания
$(".sign_descrip").click(function(){
let id = $(this).data('id');
let descr = $(this).data('descr');
$("#sign_descrip_"+id).html(descr);
return false;
});
/*//Подписываем РПД
$(".rpd_sign").click(function(){
$(".tooltip").hide();
let id_disc = $(this).data("id");
let sign = $(this).data("sign");
let th = $(this);
$.ajax({url: '/rabprog/rpdsign/',cache:false,datatype:'json',method:'post',
data: 'ajdes=RPDSign&id_disc='+id_disc+'&sign='+sign,
success:function(data){
if(sign==1) $("#td_uprav_"+id_disc).html("отправили далее на подпись");
else $("#td_uprav_"+id_disc).html("вернули на доработку");
window.ToastShow1("РПД подписали и отправили далее",data.msg,data.err);
}
});
return false;
});*/
//Подписываем РПД через модальное окно
var inputEl = null;
var inputModalEl = null;
var id_disc = 0;
var sign = 0;
var kafvyp = 0;
var th = null;
$(".rpd_sign").click(function(){
$(this).hide();
$(".tooltip").hide();
id_disc = $(this).data("id");
sign = $(this).data("sign");
kafvyp = $(this).data("kafvyp");
if(sign==1){
let conf = confirm('Вы уверены? После подписания РПД попадет на проверку далее!');
if(conf) send_sign(id_disc,sign,kafvyp,"");
}else {
th = $(this);
inputEl = $(this);
let options = {keyboard: false};
inputModalEl = new bootstrap.Modal(document.getElementById('InputModal'), options);
inputModalEl.toggle();
}
return false;
});
function send_sign(id_disc,sign,kafvyp,descr){
$.ajax({url: '/rabprog/rpdsign/',cache:false,datatype:'json',method:'post',
data: 'ajdes=RPDSign&id_disc='+id_disc+'&sign='+sign+'&descr='+descr+'&kafvyp='+kafvyp,
success:function(data){
if(sign==1) {
if(data.file_pdf !=''){
$("#td_uprav_" + id_disc).html("<a href='"+data.file_pdf+"' target='_blank'>ссылка на РПД</a>");
}else {
$("#td_uprav_" + id_disc).html("отправили далее на подпись");
}
}
else $("#td_uprav_"+id_disc).html("вернули на доработку");
window.ToastShow1("РПД подписали и отправили далее",data.msg,data.err);
}
});
}
$("#inputmodal_save").click(function(){
//inputEl.val($("#inputval").val());
let descr = $("#inputval").val();
send_sign(id_disc,sign,kafvyp,descr)
inputModalEl.hide();
});
//фильтр таблицы
$(".filter").keyup(function () {
var data = this.value.split(" ");
var jo = $("#fbody").find("tr");
if (this.value == "") {
jo.show();
return;
}
jo.hide();
//Recusively filter the jquery object to get results.
jo.filter(function (i, v) {
var $t = $(this);
for (var d = 0; d < data.length; ++d) {
if ($t.is(":contains('" + data[d] + "')")) {
return true;
}
}
return false;
}).show();
}).focus(function () {
this.value = "";
$(this).css({"color": "black"});
$(this).unbind('focus');
}).css({"color": "#C0C0C0"});
//http://jsfiddle.net/ukW2C/3/ фильтр для всей таблицы
})<?php echo '</script'; ?>
>
<?php } else { ?>
<p>нет дисциплин, на подпись</p>
<?php }?>
<div class="modal fade" id="InputModal" tabindex="-1" aria-labelledby="InputModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="InputModalLabel">Причина отказа подписи</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="mb-3">
<textarea class="form-control" id="inputval" style="height:200px;"></textarea>
</div>
<div class="mb-3" id="modal_variants">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Закрыть</button>
<button type="button" class="btn btn-primary" id="inputmodal_save">Отказать</button>
</div>
</div>
</div>
</div><?php }
}