152 lines
4.7 KiB
HTML
152 lines
4.7 KiB
HTML
<!-- BEGIN PAGE HEADER-->
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<h3 class="page-title">Стипендиальное обеспечение. Рейтинг</h3>
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
||
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
{if ($msg == 1)}
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Успешно сохранена!</strong>
|
||
</div>
|
||
{/if}
|
||
{if ($msg == 2)}
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Достижение в заявку добавлено</strong>
|
||
</div>
|
||
{/if}
|
||
|
||
<div class="row-fluid">
|
||
<div class="widget green">
|
||
<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 name="form_presentation" action="/grant/presentation/" method="post">
|
||
|
||
<input type="hidden" name="facultet" value="{$facultet}" />
|
||
|
||
{if isset($user.statuses[20])}
|
||
<p>У Вас есть права сотрудника УМУ. Можете просматривать все факультеты</p>
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Факультет</label>
|
||
<div class="controls">
|
||
<div class="input-prepend" style="width: 90%;">
|
||
<select name="facultet" class="form-control">
|
||
{foreach from=$all_facultets item=fac}
|
||
<option value="{$fac.name}">{$fac.name}</option>
|
||
{/foreach}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Учебный год</label>
|
||
<div class="controls">
|
||
<div class="input-prepend" style="width: 90%;">
|
||
<select name="year_start" class="form-control">
|
||
{foreach from=$years item=year}
|
||
<option value="{$year.year}" {if date('Y')==$year.year}SELECTED{/if}>{$year.name}</option>
|
||
{/foreach}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" style="min-width: 200px!important;">Семестр</label>
|
||
<div class="controls">
|
||
<div class="input-prepend" style="width: 90%;">
|
||
<select name="semestr" class="form-control">
|
||
<option value="1">1 семестр (зима)</option>
|
||
<option value="2">2 семестр (лето)</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<input type="submit" name="form_presentation" value="Сформировать представление стипендиальной комиссии" class="btn btn-success" />
|
||
|
||
|
||
</form>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
|
||
<table class="table table-bordered table_sort">
|
||
<thead>
|
||
<tr>
|
||
<th>№ заявки</th>
|
||
<th>ФИО</th>
|
||
<th>Группа</th>
|
||
<th>Дата</th>
|
||
<th>Учебная</th>
|
||
<th>Научно-исследовательская</th>
|
||
<th>Общественная</th>
|
||
<th>Культурно-творческая</th>
|
||
<th>Спортивная</th>
|
||
<th>ИТОГО</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$orders item=order key=k}
|
||
<tr>
|
||
<td>{($k+1)}</td>
|
||
<td><a href="/grant/commission/#{$order.id}">{$order.user.fio}<a></td>
|
||
<td>{$order.grupp}</td>
|
||
<td>{$order.date_create}</td>
|
||
<td>{$order.rating_up}</td>
|
||
<td>{$order.rating_ni}</td>
|
||
<td>{$order.rating_ob}</td>
|
||
<td>{$order.rating_kt}</td>
|
||
<td>{$order.rating_sp}</td>
|
||
<td>{$order.rating}</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script type="text/javascript">
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
|
||
const getSort = ({ target }) => {
|
||
const order = (target.dataset.order = -(target.dataset.order || -1));
|
||
const index = [...target.parentNode.cells].indexOf(target);
|
||
const collator = new Intl.Collator(['en', 'ru'], { numeric: true });
|
||
const comparator = (index, order) => (a, b) => order * collator.compare(
|
||
a.children[index].innerHTML,
|
||
b.children[index].innerHTML
|
||
);
|
||
|
||
for(const tBody of target.closest('table').tBodies)
|
||
tBody.append(...[...tBody.rows].sort(comparator(index, order)));
|
||
|
||
for(const cell of target.parentNode.cells)
|
||
cell.classList.toggle('sorted', cell === target);
|
||
};
|
||
|
||
document.querySelectorAll('.table_sort thead').forEach(tableTH => tableTH.addEventListener('click', () => getSort(event)));
|
||
|
||
});
|
||
</script>
|