232 lines
14 KiB
HTML
232 lines
14 KiB
HTML
<style>
|
||
.group_tab{
|
||
border: 1px solid #ddd;
|
||
border-radius: 3px!important;
|
||
background-color: #f9f9f9;
|
||
text-align: center;
|
||
margin: 0.5em;
|
||
text-decoration: none!important;
|
||
font-size: 16px;
|
||
}
|
||
.group_tab:hover {
|
||
transition: 0.3s ease-in-out;
|
||
transform: scale(1.2) ;
|
||
}
|
||
|
||
</style>
|
||
<div class="row-fluid">
|
||
<div class="span">
|
||
<h3 class="page-title"> Посещаемость </h3>
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
||
<li class="active"><a href="/modul/attendancelog/">Посещаемость</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
<div class="row-fluid">
|
||
<div class="span">
|
||
<div class="navbar">
|
||
<div class="navbar-inner">
|
||
<div class="container">
|
||
<ul class="nav ">
|
||
<li class="active" ><a href="/modul/attendancelog/">Главная</a></li>
|
||
{if $currentUserInfo.role != 'student'}<li><a href="/modul/attendancelog/headman/">Старосты</a></li>{/if}
|
||
</ul>
|
||
<ul class="nav pull-right">
|
||
<li><a href="#">{$name}</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{if $des == 'show'}
|
||
{if $currentUserInfo.role != 'student'}
|
||
<a href="/modul/attendancelog/" role="button" class="btn" style="margin-bottom: 1em;"> Вернуться </a>
|
||
{/if}
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="widget blue">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> Посещение группы {$groupName} </h4>
|
||
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<form action="" method="post">
|
||
<label for="date_request">Выберите дату</label>
|
||
<input
|
||
type="date"
|
||
name="date_request"
|
||
id="date_request"
|
||
max="{$currentTime['date']}"
|
||
{if isset($smarty.post.date_request)}
|
||
value="{$smarty.post.date_request}"
|
||
{else}
|
||
value="{$currentTime.date}"
|
||
{/if}
|
||
>
|
||
<button type="submit" class="btn btn-success"> Найти</button>
|
||
</form>
|
||
{if !isset($mainPageActionResult.day_info)}
|
||
<h3> У группы нет пар в этот день!</h3>
|
||
{else}
|
||
<div class="accordion" id="accordion{$key}">
|
||
<h3 style="width: 100%; text-align: center">
|
||
({$mainPageActionResult.day_name})
|
||
{if isset($smarty.post.date_request)}
|
||
{$smarty.post.date_request}
|
||
{if $smarty.post.date_request == $currentTime.date }
|
||
<span class="label label-success"> Сегодня!</span>
|
||
{/if}
|
||
{else}
|
||
{$currentTime.date}
|
||
<span class="label label-success"> Сегодня!</span>
|
||
{/if}
|
||
|
||
</h3>
|
||
{foreach from=$mainPageActionResult.day_info key=key item=class}
|
||
{if $key != 0}
|
||
<table class="table">
|
||
<tbody>
|
||
<tr>
|
||
<td style="vertical-align: middle; text-align: center; width: 5%"><h3 class="text-warning">{$class.time1}</h3></td>
|
||
<td style="vertical-align: middle; text-align: center; width: 10%"> <h5>{$class.time_name.0} - {$class.time_name.1}</h5></td>
|
||
<td><div class="accordion-group">
|
||
<div class="accordion-heading">
|
||
{if $key > $currentTime.time1 AND ! isset($smarty.post.date_request) } <!-- Если эта пара еще не наступила и реквест даты не задан -->
|
||
<div class="accordion-toggle" style="pointer-events: none;"> {$class.predmet} <span style="color:#730707">- еще не наступил!</span> </div>
|
||
{else if $key > $currentTime.time1 AND $smarty.post.date_request == $currentTime.date}
|
||
<a class="accordion-toggle {if $key != $currentTime.time1 || $class.approval == 1 } collapsed {/if}" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}">
|
||
{$class.predmet} {if $class.approval == 1} <span style="text-decoration: unset; color:#730707" >- отмечено!</span> {/if}
|
||
</a>
|
||
{else}
|
||
<a class="accordion-toggle {if $key != $currentTime.time1 || $class.approval == 1 } collapsed {/if}" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}">
|
||
{$class.predmet} {if $class.approval == 1} <span style="text-decoration: unset; color:#730707" >- отмечено!</span> {/if}
|
||
</a>
|
||
{/if}
|
||
|
||
</div>
|
||
<div id="collapse_{$class.day1}-{$class.time1}" class="accordion-body collapse {if $key == $currentTime.time1 AND $class.approval != 1 } in {/if}">
|
||
<div class="accordion-inner">
|
||
<form action="" method="post">
|
||
<table class="table table-striped">
|
||
<thead>
|
||
<tr>
|
||
<th>ФИО</th>
|
||
<th>Присутствие</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$class.students key=student_id item=att}
|
||
<tr>
|
||
<td>{$mainPageActionResult.students_all[$student_id]}</td>
|
||
<td>
|
||
<input type="hidden" name="attendance_add_edit[attendance][{$student_id}]" value="0">
|
||
|
||
<label for="{$student|replace:' ':''}{$key}"></label>
|
||
<input class="custom-checkbox" type="checkbox" name="attendance_add_edit[attendance][{$student_id}]" id="{$student|replace:' ':''}{$key}" value="1" {if $att == '1'} checked {/if} {if $class.approval == 1 OR $smarty.post.date_request != $currentTime.date } disabled {/if}>
|
||
|
||
</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
<input type="hidden" name="attendance_add_edit[info][time1]" value="{$class.time1}">
|
||
<input type="hidden" name="attendance_add_edit[info][predmet_id]" value="{$class.predmet_id}">
|
||
<input type="hidden" name="attendance_add_edit[info][gruppa]" value="{$groupName}">
|
||
{if isset($smarty.post.date_request)}
|
||
<input type="hidden" name="attendance_add_edit[info][date]" value="{$smarty.post.date_request}">
|
||
{else}
|
||
<input type="hidden" name="attendance_add_edit[info][date]" value="{$currentTime.date}">
|
||
{/if}
|
||
<input type="hidden" name="date_request" value="{$smarty.post.date_request}">
|
||
<input type="hidden" name="attendance_add_edit[info][approval]" value="0">
|
||
<div class="row-fluid">
|
||
<div class="span2">
|
||
<button type="submit" class="btn btn-success" {if $class.approval == 1 OR $smarty.post.date_request != $currentTime.date} disabled {/if}>Сохранить</button>
|
||
</div>
|
||
{if $currentUserInfo.role != 'student'}
|
||
<div class="span2">
|
||
<button type="submit" class="btn btn-danger" id="final_button" name="attendance_add_edit[info][approval]" value="1" {if $class.approval == 1 OR $smarty.post.date_request != $currentTime.date} disabled {/if}> Закрыть </button>
|
||
<label for="final_button" style="color:#730707; pointer-events: none;"> Проставить посещаемость и закрыть возможность для редактирования. Действие необратимо!</label>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
|
||
|
||
</form>
|
||
</div>
|
||
</div>
|
||
|
||
</div></td>
|
||
</tr>
|
||
</tbody>
|
||
|
||
</table>
|
||
{/if}
|
||
{/foreach}
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
{else}
|
||
<div class="row-fluid">
|
||
<div class="span6">
|
||
<div class="widget yellow">
|
||
<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" style="height: 40em; overflow-y:auto;">
|
||
<div class="" style="width:100%; text-align: center"> <h4>{$currentUserInfo.facult.facult_name}</h4> </div>
|
||
|
||
{foreach from=$facult_groups key=key item=group}
|
||
<a class="span2 group_tab " href="/modul/attendancelog/main/show/{$group['id']}/">{$group.sokr}</a>
|
||
{/foreach}
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div class="span6">
|
||
<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" style="height: 40em; overflow:scroll; overflow-x:hidden;">
|
||
<div class="search-wrap">
|
||
<form method="POST" class="hidden-phone">
|
||
<div class="input-append search-input-area">
|
||
<label for="appendedInputButton"> <small>поиск по названию и форме обучения</small> </label>
|
||
<input class="" id="appendedInputButton" name="all_grupps_search" value="{$smarty.post.all_grupps_search}" type="text">
|
||
<button class="btn" type="submit" ><i class="icon-search"></i> </button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
<table class="table table-striped table-bordered">
|
||
<thead>
|
||
<tr>
|
||
<th>Название</th>
|
||
<th>Форма обучения</th>
|
||
<th>Курс</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$groups key=key item=group}
|
||
<tr>
|
||
<td><a href="/modul/attendancelog/main/show/{$group['id']}/">{$group.sokr}</a></td>
|
||
<td>{$group['fo']}</td>
|
||
<td>{$group['kurs']}</td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
{/if} |