attendancelog/tpl/main_page.html

200 lines
11 KiB
HTML
Raw Normal View History

<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>
2024-11-12 13:08:43 +03:00
</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>
<li><a href="/modul/attendancelog/headman/">Старосты</a></li>
</ul>
<ul class="nav pull-right">
<li><a href="#">{$name}</a></li>
</ul>
2024-11-12 13:08:43 +03:00
</div>
</div>
</div>
</div>
</div>
2024-11-12 13:08:43 +03:00
{if $des == 'show'}
{if $currentUserInfo.role != 'student'}
<a href="/modul/attendancelog/" role="button" class="btn"> Вернуться </a>
{/if}
2024-11-12 13:08:43 +03:00
<div class="row-fluid">
2024-12-03 13:51:43 +03:00
<div class="span12">
2024-11-12 13:08:43 +03:00
<div class="widget blue">
<div class="widget-title">
<h4><i class="icon-reorder"></i> Посещение группы {$groupName} </h4>
2024-11-12 13:08:43 +03:00
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
</div>
<div class="widget-body">
2024-12-03 13:51:43 +03:00
<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($actionResult.day_info)}
<h3> У группы нет пар в этот день!</h3>
{else}
<div class="accordion" id="accordion{$key}">
<h3 style="width: 100%; text-align: center">
({$actionResult.day_name})
{if isset($smarty.post.date_request)}
{$smarty.post.date_request}
2024-12-03 13:51:43 +03:00
{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=$actionResult.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 style="vertical-align: middle; "><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>
2024-12-03 13:51:43 +03:00
<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>{$actionResult.students_all[$student_id]}</td>
<td>
<input type="hidden" name="attendance_add_edit[attendance][{$student_id}]" value="0">
2024-12-03 13:51:43 +03:00
<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>
2024-12-03 13:51:43 +03:00
<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}">
2024-12-03 13:51:43 +03:00
<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>
</tr>
</tbody>
</table>
{/if}
{/foreach}
2024-11-12 14:57:17 +03:00
</div>
{/if}
2024-11-12 13:08:43 +03:00
</div>
</div>
</div>
2024-12-03 13:51:43 +03:00
2024-11-12 13:08:43 +03:00
</div>
{else}
<div class="row-fluid">
<div class="span7">
<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:scroll; overflow-x:hidden;">
<table class="table table-striped table-bordered">
<caption><h4>{$currentUserInfo.facult.facult_name}</h4> </caption>
<thead>
<tr>
<th>Название</th>
<th>Форма обучения</th>
<th>Курс</th>
</tr>
</thead>
<tbody>
{foreach from=$facult_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>
2024-11-12 14:57:17 +03:00
</div>
</div>
<div class="span5">
<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;">
<table class="table table-striped table-bordered">
<caption><h4>Выберите группу для просмотра</h4> </caption>
<thead>
2024-11-12 13:08:43 +03:00
<tr>
<th>Название</th>
<th>Форма обучения</th>
<th>Курс</th>
</tr>
</thead>
<tbody>
2024-11-12 13:08:43 +03:00
{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>
2024-11-12 13:08:43 +03:00
{/foreach}
</tbody>
</table>
</div>
2024-11-12 13:08:43 +03:00
</div>
</div>
2024-11-12 14:57:17 +03:00
</div>
2024-11-12 13:08:43 +03:00
{/if}