302 lines
15 KiB
HTML
302 lines
15 KiB
HTML
|
{if $view=='edit'}
|
|||
|
<h4>Редактирование дисциплины <a href="/rabprog/upload/LIB_edit.pdf" style="font-size:12px;" class="btn btn-secondary" target="_blank">Помощь</a></h4>
|
|||
|
<h2>
|
|||
|
<span style="font-size: 16px;">{$item.index1}</span> "{$item.name}" <span style="font-size: 16px;">{$item.fio}</span>
|
|||
|
<a href="/rabprog/lib_check/sign/{$rpd_id}" class="btn btn-danger">ПОДПИСАТЬ</a>
|
|||
|
<a href="/rabprog/lib_check/" class="btn btn-info">назад</a>
|
|||
|
<a href="#" class="btn btn-warning btn_backrpd">ВЕРНУТЬ РПД НАЗАД</a>
|
|||
|
</h2>
|
|||
|
<div class="row" style="display: none;" id="btn_backrpd_div">
|
|||
|
<div class="col-md-8">
|
|||
|
<input type="text" class="form-control" id="btn_backrpd_text" placeholder="Напишите причину возврата" value="Не заполнены разделы 6.1. и 6.2.">
|
|||
|
</div>
|
|||
|
<div class="col-md-4">
|
|||
|
<input type="hidden" id="btn_backrpd_id" value="{$rpd_id}">
|
|||
|
<input type="submit" class="btn btn-danger" id="btn_backrpd_send" value="!Вернуть!">
|
|||
|
</div>
|
|||
|
<div class="col-md-12">
|
|||
|
<hr>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<p>Программа: <span class="badge bg-info text-dark">{$item.program}</span> Шифр: <span class="badge bg-info text-dark">{$item.shifr}</span> Направление: <span class="badge bg-info text-dark">{$item.naprav}</span> Профиль: <span class="badge bg-info text-dark">{$item.profil}</span><br>Кафедра: <span class="badge bg-info text-dark">{$item.kafedra}</span> Факультет: <span class="badge bg-info text-dark">{$item.fakultet}</span> Квалификация: <span class="badge bg-info text-dark">{$item.kvalif}</span> Форма обучения: <span class="badge bg-info text-dark">{$item.fo}</span></p>
|
|||
|
{*<p><pre>{print_r($item)}</pre></p>*}
|
|||
|
<h3>Раздел 6.1 <!--a href="#" class="btn btn-success add_tr_61">добавить</a--></h3>
|
|||
|
<table class="table">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th class="col-1">№</th>
|
|||
|
<th class="col-10">Книга/Ссылка</th>
|
|||
|
<th class="col-1"></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody id="fbody1">
|
|||
|
{foreach from=$item.razdel6_1[1] item=books key=k}
|
|||
|
<tr id="tr_611_{$k}" style="border-bottom: 1px solid #fff;">
|
|||
|
<td rowspan="2" style="border-bottom: 1px solid #dee2e6;">
|
|||
|
{$k+1}<br>
|
|||
|
<a href="{$books.url}" target="_blank">ссылка</a>
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
<input type="text" class="form-control" id="name_61_{$k}" value="{$books.name}">
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
<a href="#" class="btn btn-danger btn-sm btn_del" data-razd="61" data-id="{$item.id}" data-cid="{$k}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Удаление книги"><i class="bi bi-trash"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr id="tr_612_{$k}">
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<input type="text" class="form-control" id="url_61_{$k}" value="{$books.url}">
|
|||
|
</td>
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<a href="#" class="btn btn-warning btn-sm btn_save" data-razd="61" data-id="{$item.id}" data-cid="{$k}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Сохранение книги"><i class="bi bi-check2-square"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
{for $i=1 to 5}
|
|||
|
<tr id="tr_611_A{$i}" style="border-bottom: 1px solid #fff;">
|
|||
|
<td rowspan="2" style="border-bottom: 1px solid #dee2e6;">
|
|||
|
Если надо новый пункт, заполните
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
<input type="text" class="form-control" id="name_61_A{$i}" value="">
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr id="tr_612_A{$i}">
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<input type="text" class="form-control" id="url_61_A{$i}" value="">
|
|||
|
</td>
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<a href="#" class="btn btn-warning btn-sm btn_saveA" data-razd="61" data-id="{$item.id}" data-cid="{$i}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Сохранение книги"><i class="bi bi-check2-square"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/for}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h3>Раздел 6.2 <!--a href="#" class="btn btn-success add_tr_62">добавить</a--></h3>
|
|||
|
<table class="table">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th class="col-1">№</th>
|
|||
|
<th class="col-10">Книга/Ссылка</th>
|
|||
|
<th class="col-1"></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody id="fbody2">
|
|||
|
{foreach from=$item.razdel6_2[1] item=books key=k}
|
|||
|
<tr id="tr_621_{$k}" style="border-bottom: 1px solid #fff;">
|
|||
|
<td rowspan="2" style="border-bottom: 1px solid #dee2e6;">
|
|||
|
{$k+1}<br>
|
|||
|
<a href="{$books.url}" target="_blank">ссылка</a>
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<input type="text" class="form-control" id="name_62_{$k}" value="{$books.name}">
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="#" class="btn btn-danger btn-sm btn_del" data-razd="62" data-id="{$item.id}" data-cid="{$k}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Удаление книги"><i class="bi bi-trash"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr id="tr_622_{$k}">
|
|||
|
<td>
|
|||
|
<input type="text" class="form-control" id="url_62_{$k}" value="{$books.url}">
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
<a href="#" class="btn btn-warning btn-sm btn_save" data-razd="62" data-id="{$item.id}" data-cid="{$k}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Сохранение книги"><i class="bi bi-check2-square"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/foreach}
|
|||
|
{for $i=1 to 5}
|
|||
|
<tr id="tr_621_A{$i}" style="border-bottom: 1px solid #fff;">
|
|||
|
<td rowspan="2" style="border-bottom: 1px solid #dee2e6;">
|
|||
|
Если надо новый пункт, заполните
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
<input type="text" class="form-control" id="name_62_A{$i}" value="">
|
|||
|
</td>
|
|||
|
<td style="padding-bottom: 0px;">
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
<tr id="tr_622_A{$i}">
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<input type="text" class="form-control" id="url_62_A{$i}" value="">
|
|||
|
</td>
|
|||
|
<td style="padding-top: 0px;">
|
|||
|
<a href="#" class="btn btn-warning btn-sm btn_saveA" data-razd="62" data-id="{$item.id}" data-cid="{$i}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Сохранение книги"><i class="bi bi-check2-square"></i></a>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{/for}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<a href="/rabprog/lib_check/sign/{$rpd_id}" class="btn btn-danger">ПОДПИСАТЬ</a>
|
|||
|
<a href="/rabprog/lib_check/" class="btn btn-info">назад</a>
|
|||
|
{literal}
|
|||
|
<script>$(document).ready(function(){
|
|||
|
$('#btn_backrpd_send').click(function(){
|
|||
|
let text = $("#btn_backrpd_text").val();
|
|||
|
let id = $("#btn_backrpd_id").val();
|
|||
|
$.ajax({
|
|||
|
url: '/rabprog/lib_check/', cache: false, datatype: 'json', method: 'post',
|
|||
|
data: 'ajdes=RPDLibbackrpd&id=' + id + '&text=' + text,
|
|||
|
success: function (data) {
|
|||
|
window.ToastShow1("Возврат РПД", data.msg, data.err);
|
|||
|
location.href='/rabprog/lib_check/';
|
|||
|
}
|
|||
|
});
|
|||
|
return false;
|
|||
|
});
|
|||
|
$('.btn_backrpd').click(function(){
|
|||
|
$("#btn_backrpd_div").show();
|
|||
|
return false;
|
|||
|
});
|
|||
|
$('.btn_del').click(function(){
|
|||
|
if(confirm("Точно удалить?")) {
|
|||
|
let id = $(this).data('id');
|
|||
|
let cid = $(this).data('cid');
|
|||
|
let razd = $(this).data('razd');
|
|||
|
$.ajax({
|
|||
|
url: '/rabprog/lib_check/', cache: false, datatype: 'json', method: 'post',
|
|||
|
data: 'ajdes=RPDLibDel&id=' + id + '&cid=' + cid + '&razd=' + razd,
|
|||
|
success: function (data) {
|
|||
|
if(data.err==0) {
|
|||
|
$("#tr_" + razd + "1_" + cid).remove();
|
|||
|
$("#tr_" + razd + "2_" + cid).remove();
|
|||
|
}
|
|||
|
window.ToastShow1("Книгу удаляем", data.msg, data.err);
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
return false;
|
|||
|
});
|
|||
|
$('.btn_save').click(function(){
|
|||
|
let id = $(this).data('id');
|
|||
|
let cid = $(this).data('cid');
|
|||
|
let razd = $(this).data('razd');
|
|||
|
let name = encodeURIComponent($("#name_"+razd+"_"+cid).val());
|
|||
|
let url = encodeURIComponent($("#url_"+razd+"_"+cid).val());
|
|||
|
$.ajax({
|
|||
|
url: '/rabprog/lib_check/', cache: false, datatype: 'json', method: 'post',
|
|||
|
data: 'ajdes=RPDLibSave&id=' + id + '&cid=' + cid + '&razd=' + razd + '&name=' + name + '&url=' + url,
|
|||
|
success: function (data) {
|
|||
|
window.ToastShow1("Книгу сохраняем", data.msg, data.err);
|
|||
|
}
|
|||
|
});
|
|||
|
return false;
|
|||
|
});
|
|||
|
$('.btn_saveA').click(function(){
|
|||
|
let id = $(this).data('id');
|
|||
|
let cid = $(this).data('cid');
|
|||
|
let razd = $(this).data('razd');
|
|||
|
let name = encodeURIComponent($("#name_"+razd+"_A"+cid).val());
|
|||
|
let url = encodeURIComponent($("#url_"+razd+"_A"+cid).val());
|
|||
|
$.ajax({
|
|||
|
url: '/rabprog/lib_check/', cache: false, datatype: 'json', method: 'post',
|
|||
|
data: 'ajdes=RPDLibSaveA&id=' + id + '&cid=' + cid + '&razd=' + razd + '&name=' + name + '&url=' + url,
|
|||
|
success: function (data) {
|
|||
|
window.ToastShow1("Книгу сохраняем", data.msg, data.err);
|
|||
|
}
|
|||
|
});
|
|||
|
return false;
|
|||
|
});
|
|||
|
})</script>{/literal}
|
|||
|
{*<pre>{print_r($item)}</pre>*}
|
|||
|
{/if}
|
|||
|
|
|||
|
{if $view=='all'}
|
|||
|
<h3 class="text-center">Список РПД созданных преподавателями <a href="/rabprog/upload/LIB_edit.pdf" style="font-size:12px;" class="btn btn-secondary" target="_blank">Помощь</a></h3>
|
|||
|
<div class="row">
|
|||
|
<div class="col-md-5">
|
|||
|
<div class="btn-group" role="group" aria-label="Режим отображения">
|
|||
|
<a href="/rabprog/lib_check/fi_notCheck/" class="btn {if $libfil=="notCheck"}btn-success active{else}btn-primary{/if}">Не проверенные</a>
|
|||
|
<a href="/rabprog/lib_check/fi_yesCheck/" class="btn {if $libfil=="yesCheck"}btn-success active{else}btn-primary{/if}">Проверенные</a>
|
|||
|
<a href="/rabprog/lib_check/fi_all/" class="btn {if $libfil=="all"}btn-success active{else}btn-primary{/if}">Все</a>
|
|||
|
|
|||
|
<div class="btn-group" role="group">
|
|||
|
<button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">Дисциплины</button>
|
|||
|
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
|||
|
<li><a class="dropdown-item" href="/rabprog/lib_check/dd_all/">Все</a></li>
|
|||
|
{foreach from=$libfil_discip item=discip}<li><a class="dropdown-item" href="/rabprog/lib_check/dd_{$discip}/">{$discip}</a></li>{/foreach}
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<br><span class="badge bg-light text-dark">{if $libfil_discip_sel!=''}Отображаем только "{$libfil_discip_sel}"{else}Отображаем все дисциплины{/if}</span>
|
|||
|
</div>
|
|||
|
<div class="col-md-7">{include file="mod_navpages.html" nav=$navpages url="/rabprog/lib_check/"}</div>
|
|||
|
</div>
|
|||
|
|
|||
|
{if isset($sign_result)}<p>Результат подписи: {if $sign_result.err==1}<span class="badge bg-danger">Ошибка</span>{else}<span class="badge bg-success">Успех</span>{/if} {$sign_result.msg}</p>{/if}
|
|||
|
{if count($items)}
|
|||
|
<table class="table">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th class="col-1">Дата</th>
|
|||
|
<th class="col-5">Дисциплина</th>
|
|||
|
<th class="col-3">
|
|||
|
Преподаватель
|
|||
|
<form method="post">
|
|||
|
<div class="row">
|
|||
|
<div class="col-8"><input type="text" class="form-control" name="search_fio" value="{$search_fio}" placeholder="Часть ФИО"></div>
|
|||
|
<div class="col-4"><input type="submit" class="btn btn-info" name="search_fio_btn" value="Искать"></div>
|
|||
|
</div>
|
|||
|
</form>
|
|||
|
</th>
|
|||
|
<th class="col-2">6.1 и 6.2</th>
|
|||
|
<th class="col-1"></th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody id="fbody">
|
|||
|
{foreach from=$items item=item}
|
|||
|
{*if $item.signs.sign=="Проректор"&&$item.signs.status==1}{else*}
|
|||
|
<tr class="trtd">
|
|||
|
<td><span style="font-size:10px;">{date('H:i',$item.data_c)}</span> {date('d.m.Y',$item.data_c)}</td>
|
|||
|
<td>
|
|||
|
<span class="badge bg-light text-dark">{$item.index1}</span><br>{$item.name}
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
{$item.fio}<br>
|
|||
|
{if $item.signs.sign=="Проректор"&&$item.signs.status==1}
|
|||
|
Подписано: {$item.signs.sign}
|
|||
|
{else}
|
|||
|
{if $item.signs.status==1}
|
|||
|
<span class="badge {if $item.signs.sign=="Библиотека"}bg-success{else}bg-light text-dark{/if}">Подписано: {$item.signs.sign}</span>
|
|||
|
{else}
|
|||
|
<span class="badge bg-warning text-dark">Не подписано: {$item.signs.sign}</span>
|
|||
|
{/if}
|
|||
|
{/if}
|
|||
|
{*<pre>{print_r($item.signs)}</pre>*}
|
|||
|
{*( [sign] => Проректор [descrip] => /rabprog/upload/pdfs/47307_Нормальная физиология.pdf|#|https://mkgtu.ru/vikon/sveden/files/47307_Normalynaya_fiziologiya.pdf [status] => 1 )*}
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
{if $item.signs.sign=="Проректор"&&$item.signs.status==1}
|
|||
|
<span class="badge bg-danger">{$item.id_discip} Подписано проректором</span>
|
|||
|
{else}
|
|||
|
<span class="badge bg-light text-dark">6.1: <b>{count($item.razdel6_1[1])}</b></span>
|
|||
|
<span class="badge bg-light text-dark">6.2: <b>{count($item.razdel6_2[1])}</b></span>
|
|||
|
<br>
|
|||
|
<span class="badge {if $item.edited==0}bg-secondary{else}bg-success{/if}" data-bs-toggle="tooltip" data-bs-placement="top" title="Список редактировали столько раз"><b>{$item.edited}</b></span>
|
|||
|
{/if}
|
|||
|
</td>
|
|||
|
<td>
|
|||
|
{*if $item.signs.sign=="Проректор"&&$item.signs.status==1}
|
|||
|
{else*}
|
|||
|
{if ($item.signs.sign=="Зав.вып.каф."&&$item.signs.status==1)||($item.signs.sign=="Библиотека")}
|
|||
|
<a href="/rabprog/lib_check/edit/{$item.id}/" class="btn btn-sm btn-warning" data-bs-toggle="tooltip" data-bs-placement="top" title="Редактирование дисциплины"><i class="bi bi-pencil-square"></i></a>
|
|||
|
{/if}
|
|||
|
<br><span class="badge bg-light text-dark" data-bs-toggle="tooltip" data-bs-placement="top" title="Номер РПД">{$item.id}</span>
|
|||
|
<span class="badge bg-light text-dark" data-bs-toggle="tooltip" data-bs-placement="top" title="Номер Дисциплины">{$item.pid}</span>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
{*/if*}
|
|||
|
{/foreach}
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
{include file="mod_navpages.html" nav=$navpages url="/rabprog/lib_check/"}
|
|||
|
{else}
|
|||
|
<p>нет рпд</p>
|
|||
|
{/if}
|
|||
|
{/if}
|
|||
|
{*
|
|||
|
<pre>{print_r($items)}</pre>
|
|||
|
<pre>{print_r($sqls)}</pre>
|
|||
|
*}
|