162 lines
8.7 KiB
HTML
162 lines
8.7 KiB
HTML
<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="/notes/">Заметки</a></li>
|
||
<li><a class="btn btn-warning" href="/notes/add/"><i class="icon-plus icon-white"></i> Добавить</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
{literal}
|
||
<style>notefly_trhide
|
||
.trhide{display: none;}
|
||
</style>
|
||
<script>$(document).ready(function(){
|
||
$(".trtoggle").click(function(){
|
||
let id = $(this).data("id");
|
||
$("#tr_"+id).toggle();
|
||
});
|
||
});</script>
|
||
{/literal}
|
||
<div class="row-fluid">
|
||
<div class="span12">
|
||
<div class="row-fluid">
|
||
{if count($msg)}
|
||
<div class="span12">
|
||
<div class="widget {if $msg.err==1}red{/if} {if $msg.err==0}green{/if}">
|
||
<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">{$msg.msg}</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
{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($items.items)}
|
||
<table class="table table-striped table-bordered table-advance table-hover">
|
||
<thead>
|
||
<tr>
|
||
<th style="width: 20%;"><i class="icon-bullhorn"></i> Дата</th>
|
||
<th style="width: 70%;"><i class="icon-question-sign"></i> Заголовок</th>
|
||
<th style="width: 10%;"><i class=" icon-edit"></i> </th>
|
||
<th></th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{foreach from=$items.items item=it}
|
||
<tr class="trtoggle" style="cursor:pointer;" data-id="{$it.id}">
|
||
<td>{date('H:i d.m.Y',$it.data_c)}</td>
|
||
<td>{$it.title}</td>
|
||
<td nowarp>
|
||
<a class="btn btn-primary" href="/notes/edit/{$it.id}/"><i class="icon-pencil"></i></a>
|
||
<a class="btn btn-danger" href="/notes/del/{$it.id}/"><i class="icon-trash "></i></a>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr class="trhide" id="tr_{$it.id}"><td colspan="4">{$it.notes}</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=='add'||$regim=='edit'}
|
||
<div class="span12">
|
||
<div class="widget red">
|
||
<div class="widget-title">
|
||
<h4><i class="icon-reorder"></i> {if $regim=='add'}Добавление{/if} {if $regim=='edit'}Редактирование{/if} </h4>
|
||
<span class="tools">
|
||
<a href="javascript:;" class="icon-chevron-down"></a>
|
||
</span>
|
||
</div>
|
||
<div class="widget-body">
|
||
<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="Краткое название заметки" name="title" value="{$item.title}" />
|
||
</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="notes">{$item.notes}</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="form-actions">
|
||
{if $regim=='edit'}
|
||
<input type="hidden" name="id" value="{$item.id}" />
|
||
<a href="/notes/" class="btn btn-info">назад</a>
|
||
<button type="submit" name="edit" class="btn btn-success">Редактировать</button>
|
||
{/if}
|
||
{if $regim=='add'}
|
||
<input type="hidden" name="id" value="{$item.id}" />
|
||
<button type="submit" name="add" class="btn btn-success">Добавить</button>
|
||
{/if}
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</div>
|