190 lines
8.6 KiB
HTML
190 lines
8.6 KiB
HTML
<!-- BEGIN PAGE HEADER-->
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<h3 class="page-title">Лекционный материал для студентов</h3>
|
||
<ul class="breadcrumb">
|
||
<li><a href="/">Главная</a><span class="divider">/</span></li>
|
||
<li class="active"><a href="/teach/lection/">Обучать - лекции</a></li>
|
||
<li><a class="btn btn-warning" href="/teach/lection/add/"><i class="icon-plus icon-white"></i> Добавить</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
{if $regim=='show'}
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
<div class="widget green">
|
||
<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">
|
||
{if count($form.err)}{foreach from=$form.err item=er}
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> {$er}
|
||
</div>
|
||
{/foreach}{/if}
|
||
{if isset($form.msg)}
|
||
<div class="alert alert-success">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Успешно!</strong> {$form.msg}
|
||
</div>
|
||
{/if}
|
||
{if count($lections)}
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th><i class="icon-bullhorn"></i> Даты</th>
|
||
<th class="hidden-phone"><i class="icon-question-sign"></i> Специальность<br>Курс/Семестр</th>
|
||
<th><i class="icon-bookmark"></i> Название</th>
|
||
<th><i class="icon-bookmark"></i> Описание</th>
|
||
<th><i class="icon-bookmark"></i> Файл</th>
|
||
<th><i class=" icon-edit"></i> </th>
|
||
<th></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$lections item=lc}
|
||
<tr>
|
||
<td>{$lc.data_c}<br>{$lc.data_u}</td>
|
||
<td class="hidden-phone">{$lc.specialnost}<br>{$lc.kurs} / {$lc.semestr}</td>
|
||
<td>{$lc.name}</td>
|
||
<td>{$lc.descrip}</td>
|
||
<td nowarp>{if $lc.file!=''}
|
||
<i class="icon-file"></i> <a href="/upload/lections/{$lc.file}">скачать файл</a>
|
||
{else}
|
||
<span class="label label-important label-mini">нет файла</span>
|
||
{/if}</td>
|
||
<td nowarp>
|
||
<a class="btn btn-primary" href="/teach/lection/edit/{$lc.id}/"><i class="icon-pencil"></i></a>
|
||
<a class="btn btn-danger" href="/teach/lection/del/{$lc.id}/"><i class="icon-trash "></i></a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
{/foreach}
|
||
</tbody>
|
||
</table>
|
||
{if isset($pagination)}
|
||
<div class="pagination pagination-large">
|
||
<ul>
|
||
{if $pagination.kol<=15}
|
||
{for $p=1 to $pagination.kol}
|
||
<li><a href="/teach/lection/p{$p}/"{if $pagination.page==$p} class=" label-warning"{/if}>{$p}</a></li>
|
||
{/for}
|
||
{else}
|
||
{if $pagination.page>4}
|
||
<li><a href="/teach/lection/p1/">1</a></li>
|
||
<li><a href="#">...</a></li>
|
||
{for $p=($pagination.page-3) to ($pagination.page+3)}
|
||
<li><a href="/teach/lection/p{$p}/"{if $pagination.page==$p} class=" label-warning"{/if}>{$p}</a></li>
|
||
{/for}
|
||
<li><a href="#">...</a></li>
|
||
<li><a href="/teach/lection/p{$pagination.kol}/">{$pagination.kol}</a></li>
|
||
{else}
|
||
{for $p=1 to 5}
|
||
<li><a href="/teach/lection/p{$p}/"{if $pagination.page==$p} class=" label-warning"{/if}>{$p}</a></li>
|
||
{/for}
|
||
<li><a href="#">...</a></li>
|
||
{for $p=($pagination.kol-5) to $pagination.kol}
|
||
<li><a href="/teach/lection/p{$p}/"{if $pagination.page==$p} class=" label-warning"{/if}>{$p}</a></li>
|
||
{/for}
|
||
{/if}
|
||
{/if}
|
||
</ul>
|
||
</div>
|
||
{/if}
|
||
{/if}
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
{if $regim=='aded'}
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> {$form.title} </h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
{if count($form.err)}{foreach from=$form.err item=er}
|
||
<div class="alert alert-error">
|
||
<button data-dismiss="alert" class="close">×</button>
|
||
<strong>Ошибка!</strong> {$er}
|
||
</div>
|
||
{/foreach}{/if}
|
||
<form action="" class="form-horizontal" method="POST" enctype="multipart/form-data">
|
||
<div class="control-group">
|
||
<label class="control-label">Специальность</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="наименование специальности (не более 255 символов)" name="specialnost" value="{$form.p.specialnost}" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Курс</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Курс 1-6 (только цифра)" name="kurs" value="{$form.p.kurs}" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Семестр</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Семестр 1-12 (только цифра)" name="semestr" value="{$form.p.semestr}" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Название материала</label>
|
||
<div class="controls">
|
||
<input type="text" class="span12 tooltips" data-trigger="hover" data-original-title="Полное название материала (не более 255 символов)" name="name" value="{$form.p.name}" />
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Описание материала</label>
|
||
<div class="controls">
|
||
<textarea class="span12 tooltips" rows="3" data-trigger="hover" data-original-title="Опишите в кратце о чем материал" name="descrip">{$form.p.descrip}</textarea>
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Файл материала</label>
|
||
<div class="controls">
|
||
<input type="file" class="span12 tooltips" data-trigger="hover" data-original-title="Загрузить файл материала (не более 8 Мб)" name="file" />
|
||
{if $form.p.file!=''}
|
||
скачать: <i class="icon-file"></i> <a href="/upload/lections/{$form.p.file}">{$form.p.file}</a>
|
||
{$form.p.ofile}
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
<div class="control-group">
|
||
<label class="control-label">Группы</label>
|
||
<div class="controls">
|
||
<select data-placeholder="Укажите для каких групп доступен материал" class="chzn-select span12" multiple="multiple" tabindex="6" name="l_g[]">
|
||
<option value=""></option>
|
||
{foreach from=$form.p.grupp item=gr}
|
||
<option{if $gr.sel==1} selected{/if} value="{$gr.id}">{$gr.sokr}-{$gr.kurs}</option>
|
||
{/foreach}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-actions">
|
||
{$form.id}
|
||
<button type="submit" name="{$form.btn_url}" class="btn btn-success">{$form.btn_name}</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|