attendancelog/tpl/main_page.html

211 lines
11 KiB
HTML
Raw 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.

<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">
<a class="accordion-toggle {if $key != $currentTime.time1 } collapsed {/if}" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}">
{$class.predmet}
</a>
</div>
<div id="collapse_{$class.day1}-{$class.time1}" class="accordion-body collapse {if $key == $currentTime.time1 } 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}>
</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}">
<button type="submit" class="btn btn-success">Сохранить</button>
</form>
</div>
</div>
</div></td>
<!-- <td style="width: 20%"> <h5> - {$class.fio}</h5></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}