2024-12-24 13:45:08 +03:00
< 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 >
2024-12-02 15:00:31 +03:00
< div class = "row-fluid" >
2024-12-03 16:29:23 +03:00
< 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 >
2024-12-03 16:29:23 +03:00
< / 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 >
2024-12-10 12:29:59 +03:00
{if $currentUserInfo.role != 'student'}< li > < a href = "/modul/attendancelog/headman/" > Старосты< / a > < / li > {/if}
2024-12-03 16:29:23 +03:00
< / 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 >
2024-12-03 16:29:23 +03:00
< / div >
2024-11-12 13:08:43 +03:00
{if $des == 'show'}
2024-12-03 16:29:23 +03:00
{if $currentUserInfo.role != 'student'}
2024-12-24 13:45:08 +03:00
< a href = "/modul/attendancelog/" role = "button" class = "btn" style = "margin-bottom: 1em;" > Вернуться < / a >
2024-12-03 16:29:23 +03:00
{/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" >
2024-11-25 14:26:54 +03:00
< 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 >
2024-12-10 12:29:59 +03:00
{if !isset($mainPageActionResult.day_info)}
2024-12-02 15:00:31 +03:00
< h3 > У группы нет пар в этот день!< / h3 >
{else}
2024-11-25 14:26:54 +03:00
< div class = "accordion" id = "accordion{$key}" >
< h3 style = "width: 100%; text-align: center" >
2024-12-10 12:29:59 +03:00
({$mainPageActionResult.day_name})
2024-11-25 14:26:54 +03:00
{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}
2024-11-25 14:26:54 +03:00
{else}
{$currentTime.date}
< span class = "label label-success" > Сегодня!< / span >
{/if}
2024-11-14 17:02:12 +03:00
2024-11-25 14:26:54 +03:00
< / h3 >
2024-12-10 12:29:59 +03:00
{foreach from=$mainPageActionResult.day_info key=key item=class}
2024-11-25 14:26:54 +03:00
{if $key != 0}
< table class = "table" >
< tbody >
< tr >
2024-12-09 09:10:19 +03:00
< 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 >
2024-12-17 14:03:46 +03:00
< td > < div class = "accordion-group" >
2024-11-25 14:26:54 +03:00
< div class = "accordion-heading" >
2025-01-17 14:14:08 +03:00
{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}
2024-11-25 14:26:54 +03:00
< / div >
2025-01-17 13:16:30 +03:00
< div id = "collapse_{$class.day1}-{$class.time1}" class = "accordion-body collapse {if $key == $currentTime.time1 AND $class.approval != 1 } in {/if}" >
2024-11-25 14:26:54 +03:00
< div class = "accordion-inner" >
< form action = "" method = "post" >
< table class = "table table-striped" >
< thead >
< tr >
< th > ФИО< / th >
< th > Присутствие< / th >
< / tr >
< / thead >
< tbody >
2024-12-09 08:55:29 +03:00
{foreach from=$class.students key=student_id item=att}
2024-11-25 14:26:54 +03:00
< tr >
2024-12-10 12:29:59 +03:00
< td > {$mainPageActionResult.students_all[$student_id]}< / td >
2024-11-25 14:26:54 +03:00
< td >
2024-12-09 08:55:29 +03:00
< input type = "hidden" name = "attendance_add_edit[attendance][{$student_id}]" value = "0" >
2024-12-03 13:51:43 +03:00
2024-12-02 15:00:31 +03:00
< label for = "{$student|replace:' ':''}{$key}" > < / label >
2025-01-17 14:14:08 +03:00
< 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 } >
2024-12-02 15:00:31 +03:00
2024-11-25 14:26:54 +03:00
< / td >
< / tr >
{/foreach}
2024-11-14 17:02:12 +03:00
< / tbody >
< / table >
2024-12-03 13:51:43 +03:00
< input type = "hidden" name = "attendance_add_edit[info][time1]" value = "{$class.time1}" >
2024-12-09 11:15:21 +03:00
< 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}" >
2025-01-17 13:16:30 +03:00
< input type = "hidden" name = "attendance_add_edit[info][approval]" value = "0" >
< div class = "row-fluid" >
< div class = "span2" >
2025-01-17 14:14:08 +03:00
< button type = "submit" class = "btn btn-success" { if $ class . approval = = 1 OR $ smarty . post . date_request ! = $ currentTime . date } disabled { / if } > Сохранить< / button >
2025-01-17 13:16:30 +03:00
< / div >
{if $currentUserInfo.role != 'student'}
< div class = "span2" >
2025-01-17 14:14:08 +03:00
< 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 >
2025-01-17 13:16:30 +03:00
< label for = "final_button" style = "color:#730707; pointer-events: none;" > Проставить посещаемость и закрыть возможность для редактирования. Действие необратимо!< / label >
< / div >
{/if}
< / div >
2024-11-25 14:26:54 +03:00
< / form >
2024-11-13 16:27:28 +03:00
< / div >
2024-11-25 14:26:54 +03:00
< / div >
< / div > < / td >
< / tr >
< / tbody >
< / table >
{/if}
{/foreach}
2024-11-12 14:57:17 +03:00
< / div >
2024-12-02 15:00:31 +03:00
{/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}
2024-12-03 16:29:23 +03:00
< div class = "row-fluid" >
2024-12-24 13:45:08 +03:00
< div class = "span6" >
2024-12-03 16:29:23 +03:00
< 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 >
2024-12-24 13:45:08 +03:00
< 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}
2024-12-03 16:29:23 +03:00
< / div >
2024-11-12 14:57:17 +03:00
< / div >
2024-12-03 16:29:23 +03:00
< / div >
2024-12-24 13:45:08 +03:00
< div class = "span6" >
2024-12-03 16:29:23 +03:00
< 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;" >
2024-12-17 14:03:46 +03:00
< 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 >
2024-12-03 16:29:23 +03:00
< table class = "table table-striped table-bordered" >
< thead >
2024-11-12 13:08:43 +03:00
< tr >
< th > Название< / th >
< th > Форма обучения< / th >
< th > К у р с < / th >
< / tr >
2024-12-03 16:29:23 +03:00
< / thead >
< tbody >
2024-11-12 13:08:43 +03:00
{foreach from=$groups key=key item=group}
2024-12-03 16:29:23 +03:00
< 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}
2024-12-03 16:29:23 +03:00
< / tbody >
< / table >
< / div >
2024-11-12 13:08:43 +03:00
< / div >
< / div >
2024-11-12 14:57:17 +03:00
2024-12-03 16:29:23 +03:00
< / div >
2024-11-12 13:08:43 +03:00
{/if}