Изменена логика отображения, добавлен воод даты в виде календаря

This commit is contained in:
RomanGolienko 2024-11-25 14:26:54 +03:00
parent 9395a7222b
commit 10d53cb144
1 changed files with 84 additions and 67 deletions

View File

@ -29,86 +29,103 @@
{if $des == 'show'} {if $des == 'show'}
<a href="/modul/attendancelog/" role="button" class="btn"> Вернуться </a> <a href="/modul/attendancelog/" role="button" class="btn"> Вернуться </a>
<div class="row-fluid"> <div class="row-fluid">
<div class="span12"> <div class="span8">
<div class="widget blue"> <div class="widget blue">
<div class="widget-title"> <div class="widget-title">
<h4><i class="icon-reorder"></i> Посещение группы {$groupName} </h4> <h4><i class="icon-reorder"></i> Посещение группы {$groupName} </h4>
<span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span> <span class="tools"><a href="javascript:;" class="icon-chevron-down"></a></span>
</div> </div>
<div class="widget-body"> <div class="widget-body">
<div class="tabbable custom-tab"> <div class="accordion" id="accordion{$key}">
<ul class="nav nav-tabs"> <h3 style="width: 100%; text-align: center">
{foreach from=$actionResult.info key=key item=day} ({$actionResult.day_name})
<li {if $key == $currentTime.day1} class="active" {/if}><a href="#tab_1_{$key}" data-toggle="tab">{$day['day_name']}</a></li> {if isset($smarty.post.date_request)}
{/foreach} {$smarty.post.date_request}
</ul> {else}
<div class="tab-content" style="overflow-x: scroll"> {$currentTime.date}
{foreach from=$actionResult.info key=key item=day} <span class="label label-success"> Сегодня!</span>
<div class="tab-pane {if $key == $currentTime.day1} active {/if}" id="tab_1_{$key}"> {/if}
<div class="accordion" id="accordion{$key}">
{foreach from=$day key=key item=class} </h3>
{if $key != 0} {foreach from=$actionResult.day_info key=key item=class}
<table class="table"> {if $key != 0}
<table class="table">
<tbody>
<tr>
<td style="vertical-align: middle; text-align: center;"><h3 class="text-warning">{$class.time1}</h3></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>
<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>No</th>
<th>ФИО</th>
<th>Присутствие</th>
<th>Примечание</th>
</tr>
</thead>
<tbody> <tbody>
<tr> {foreach from=$actionResult.students.students key=key item=student}
<td style="vertical-align: middle; text-align: center;"><h3 class="text-warning">{$class.time1}</h3></td> <tr>
<td style="vertical-align: middle; "><div class="accordion-group"> <td>{$key}</td>
<div class="accordion-heading"> <td>{$student}</td>
<a class="accordion-toggle {if $key != $currentTime.time1 } collapsed {/if}" data-toggle="collapse" data-parent="#accordion{$day.day1}" href="#collapse_{$class.day1}-{$class.time1}"> <td>
{$class.predmet} <input type="hidden" name="attendance_add_edit[attendance][{$student}]" value="off">
</a> <input type="hidden" name="attendance_add_edit[info]['week1']" value="{$class.week1}">
</div> <input type="hidden" name="attendance_add_edit[info]['day1']" value="{$class.day1}">
<div id="collapse_{$class.day1}-{$class.time1}" class="accordion-body collapse {if $key == $currentTime.time1 } in {/if}"> <input type="hidden" name="attendance_add_edit[info]['time1']" value="{$class.time1}">
<div class="accordion-inner"> <input type="hidden" name="attendance_add_edit[info]['predmet']" value="{$class.predmet}">
<form action="" method="post"> <input type="hidden" name="attendance_add_edit[info]['gruppa']" value="{$groupName}">
<table class="table table-striped"> <input type="checkbox" name="attendance_add_edit[attendance][{$student}]" id="{$key}">
<thead> </td>
<tr> <td><input type="text" name="" id="" value=""></td>
<th>No</th> </tr>
<th>ФИО</th> {/foreach}
<th>Присутствие</th>
<th>Примечание</th>
</tr>
</thead>
<tbody>
{foreach from=$actionResult.students.students key=key item=student}
<tr>
<td>{$key}</td>
<td>{$student}</td>
<td>
<input type="hidden" name="attendance_add_edit[attendance][{$student}]" value="off">
<input type="hidden" name="attendance_add_edit[info]['week1']" value="{$class.week1}">
<input type="hidden" name="attendance_add_edit[info]['day1']" value="{$class.day1}">
<input type="hidden" name="attendance_add_edit[info]['time1']" value="{$class.time1}">
<input type="hidden" name="attendance_add_edit[info]['predmet']" value="{$class.predmet}">
<input type="hidden" name="attendance_add_edit[info]['gruppa']" value="{$groupName}">
<input type="checkbox" name="attendance_add_edit[attendance][{$student}]" id="{$key}">
</td>
<td><input type="text" name="" id="" value=""></td>
</tr>
{/foreach}
</tbody>
</table>
<button type="submit" class="btn btn-success">Сохранить</button>
</form>
</div>
</div>
</div></td>
</tr>
</tbody> </tbody>
</table> </table>
{/if} <button type="submit" class="btn btn-success">Сохранить</button>
{/foreach} </form>
</div>
</div> </div>
{/foreach} </div>
</div>
</div></td>
</tr>
</tbody>
</table>
{/if}
{/foreach}
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="span4">
<div class="widget yellow">
<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']}"
>
<button type="submit" class="btn btn-success"> Найти</button>
</form>
</div>
</div>
</div>
</div> </div>
{else} {else}
<div class="row-fluid"> <div class="row-fluid">