64 lines
2.5 KiB
Plaintext
64 lines
2.5 KiB
Plaintext
|
{block content}
|
||
|
<h1>Ankety</h1>
|
||
|
|
||
|
<div class="suveys">
|
||
|
{control filteringForm}
|
||
|
{if count($surveys) == 0}
|
||
|
<div class="alert alert-danger">{_('survey.data_not_found')}</div>
|
||
|
{else}
|
||
|
<table class="table">
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>
|
||
|
<a n:href="default, 1, order => 'survey_id', direction => $direction === 'ASC' && $order === 'survey_id' ? 'DESC' : 'ASC'">
|
||
|
{_('survey.id')} {$order === 'survey_id' ? ($direction === 'ASC' ? '▲' : '▼') : ''}
|
||
|
</a>
|
||
|
</th>
|
||
|
<th>
|
||
|
<a n:href="default, 1, order => 'survey_name', direction => $direction === 'ASC' && $order === 'survey_name' ? 'DESC' : 'ASC'">
|
||
|
{_('survey.name')} {$order === 'survey_name' ? ($direction === 'ASC' ? '▲' : '▼') : ''}
|
||
|
</a>
|
||
|
</th>
|
||
|
<th>
|
||
|
<a n:href="default, 1, order => 'comments', direction => $direction === 'ASC' && $order === 'comments' ? 'DESC' : 'ASC'">
|
||
|
{_('survey.comments')} {$order === 'comments' ? ($direction === 'ASC' ? '▲' : '▼') : ''}
|
||
|
</a>
|
||
|
</th>
|
||
|
<th>{_('survey.interests')}</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
{foreach $surveys as $survey}
|
||
|
<tr >
|
||
|
<td>{$survey->survey_id}</td>
|
||
|
<td>{$survey->survey_name}</td>
|
||
|
<td>{$survey->comments}</td>
|
||
|
<td>{interests($survey->interests)}</td>
|
||
|
</tr>
|
||
|
{/foreach}
|
||
|
</tbody>
|
||
|
</table>
|
||
|
{/if}
|
||
|
</div>
|
||
|
|
||
|
{if count($surveys) > 0}
|
||
|
<div class="pagination">
|
||
|
{if !$paginator->isFirst()}
|
||
|
<a n:href="default, 1">{_('pagination.first')}</a>
|
||
|
|
|
||
|
<a n:href="default, $paginator->page-1">{_('pagination.prev')}</a>
|
||
|
|
|
||
|
{/if}
|
||
|
|
||
|
Stránka {$paginator->getPage()} z {$paginator->getPageCount()}
|
||
|
|
||
|
{if !$paginator->isLast()}
|
||
|
|
|
||
|
<a n:href="default, $paginator->getPage() + 1">{_('pagination.next')}</a>
|
||
|
|
|
||
|
<a n:href="default, $paginator->getPageCount()">{_('pagination.last')}</a>
|
||
|
{/if}
|
||
|
</div>
|
||
|
{/if}
|
||
|
{/block}
|