2015-01-07 22:47:34 +01:00
|
|
|
{extends 'admin/admin_page.tpl'}
|
|
|
|
|
2015-03-27 12:55:32 +01:00
|
|
|
{block name="header"}
|
|
|
|
<script src="{"js/app/admin/polls.js"|resource}" type="text/javascript"></script>
|
|
|
|
{/block}
|
|
|
|
|
2015-01-07 22:47:34 +01:00
|
|
|
{block 'admin_main'}
|
2015-03-27 12:55:32 +01:00
|
|
|
<div class="panel panel-default" id="poll_search">
|
2015-03-30 15:19:56 +02:00
|
|
|
<div class="panel-heading">{__('Generic', 'Search')}</div>
|
2015-03-27 12:55:32 +01:00
|
|
|
<div class="panel-body" style="display: none;">
|
|
|
|
<form action="" method="GET">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group">
|
2015-03-30 15:19:56 +02:00
|
|
|
<label for="poll" class="control-label">{__('Admin', 'Poll ID')}</label>
|
2015-03-27 12:55:32 +01:00
|
|
|
<input type="text" name="poll" id="poll" class="form-control"
|
|
|
|
value="{$search['poll']|html}"/>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2015-03-30 15:19:56 +02:00
|
|
|
<label for="name" class="control-label">{__('Admin', 'Author')}</label>
|
2015-03-27 12:55:32 +01:00
|
|
|
<input type="text" name="name" id="name" class="form-control"
|
|
|
|
value="{$search['name']|html}"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
|
|
<div class="form-group">
|
2015-03-30 15:19:56 +02:00
|
|
|
<label for="title" class="control-label">{__('Admin', 'Title')}</label>
|
2015-03-27 12:55:32 +01:00
|
|
|
<input type="text" name="title" id="title" class="form-control"
|
|
|
|
value="{$search['title']|html}"/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-03-30 15:19:56 +02:00
|
|
|
<input type="submit" value="{__('Generic', 'Search')}" class="btn btn-default"/>
|
2015-03-27 12:55:32 +01:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2015-01-07 22:47:34 +01:00
|
|
|
<form action="" method="POST">
|
2015-03-29 13:18:00 +02:00
|
|
|
<input type="hidden" name="csrf" value="{$crsf}"/>
|
2015-01-07 22:47:34 +01:00
|
|
|
{if $poll_to_delete}
|
|
|
|
<div class="alert alert-warning text-center">
|
2015-03-30 15:19:56 +02:00
|
|
|
<h3>{__('adminstuds', 'Confirm removal of the poll')} "{$poll_to_delete->id|html}"</h3>
|
2015-01-07 22:47:34 +01:00
|
|
|
|
|
|
|
<p>
|
|
|
|
<button class="btn btn-default" type="submit" value="1"
|
2015-03-30 15:19:56 +02:00
|
|
|
name="annullesuppression">{__('adminstuds', 'Keep the poll')}</button>
|
2015-01-11 14:59:25 +01:00
|
|
|
<button type="submit" name="delete_confirm" value="{$poll_to_delete->id|html}"
|
2015-03-30 15:19:56 +02:00
|
|
|
class="btn btn-danger">{__('adminstuds', 'Delete the poll')}</button>
|
2015-01-07 22:47:34 +01:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{/if}
|
2015-03-27 12:55:32 +01:00
|
|
|
<input type="hidden" name="csrf" value="{$crsf}"/>
|
2015-01-07 22:47:34 +01:00
|
|
|
|
2015-01-18 16:46:54 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-03-30 15:19:56 +02:00
|
|
|
{$count} / {$total} {__('Admin', 'polls in the database at this time')}
|
2015-01-18 16:46:54 +01:00
|
|
|
</div>
|
|
|
|
|
2015-02-26 22:50:14 +01:00
|
|
|
<table class="table table-bordered table-polls">
|
2015-01-07 22:47:34 +01:00
|
|
|
<tr align="center">
|
2015-02-26 22:50:14 +01:00
|
|
|
<th scope="col"></th>
|
2015-03-30 15:19:56 +02:00
|
|
|
<th scope="col">{__('Admin', 'Title')}</th>
|
|
|
|
<th scope="col">{__('Admin', 'Author')}</th>
|
|
|
|
<th scope="col">{__('Admin', 'Email')}</th>
|
|
|
|
<th scope="col">{__('Admin', 'Expiration date')}</th>
|
|
|
|
<th scope="col">{__('Admin', 'Votes')}</th>
|
|
|
|
<th scope="col">{__('Admin', 'Poll ID')}</th>
|
|
|
|
<th scope="col" colspan="3">{__('Admin', 'Actions')}</th>
|
2015-01-18 16:46:54 +01:00
|
|
|
</tr>
|
|
|
|
{foreach $polls as $poll}
|
|
|
|
<tr align="center">
|
2015-02-26 22:50:14 +01:00
|
|
|
<td class="cell-format">
|
2015-01-18 16:46:54 +01:00
|
|
|
{if $poll->format === 'D'}
|
2015-03-27 12:55:32 +01:00
|
|
|
<span class="glyphicon glyphicon-calendar" aria-hidden="true"
|
2015-03-30 15:19:56 +02:00
|
|
|
title="{__('Generic', 'Date')}"></span>
|
|
|
|
<span class="sr-only">{__('Generic', 'Date')}</span>
|
2015-01-18 16:46:54 +01:00
|
|
|
{else}
|
2015-03-27 12:55:32 +01:00
|
|
|
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"
|
2015-03-30 15:19:56 +02:00
|
|
|
title="{__('Generic', 'Classic')}"></span>
|
|
|
|
<span class="sr-only">{__('Generic', 'Classic')}</span>
|
2015-01-18 16:46:54 +01:00
|
|
|
{/if}
|
|
|
|
</td>
|
2015-02-26 22:50:14 +01:00
|
|
|
<td>{$poll->title|html}</td>
|
2015-01-18 16:46:54 +01:00
|
|
|
<td>{$poll->admin_name|html}</td>
|
|
|
|
<td>{$poll->admin_mail|html}</td>
|
|
|
|
|
|
|
|
{if strtotime($poll->end_date) > time()}
|
2015-03-27 12:55:32 +01:00
|
|
|
<td>{date('d/m/y', strtotime($poll->end_date))}</td>
|
2015-01-07 22:47:34 +01:00
|
|
|
{else}
|
2015-03-27 12:55:32 +01:00
|
|
|
<td><span class="text-danger">{strtotime($poll->end_date)|date_format:'d/m/Y'}</span></td>
|
2015-01-07 22:47:34 +01:00
|
|
|
{/if}
|
2015-01-18 16:46:54 +01:00
|
|
|
<td>{$poll->votes|html}</td>
|
|
|
|
<td>{$poll->id|html}</td>
|
2015-04-02 16:52:46 +02:00
|
|
|
<td><a href="{poll_url id=$poll->id}" class="btn btn-link"
|
2015-03-30 15:19:56 +02:00
|
|
|
title="{__('Admin', 'See the poll')}"><span
|
2015-03-27 12:55:32 +01:00
|
|
|
class="glyphicon glyphicon-eye-open"></span><span
|
2015-03-30 15:19:56 +02:00
|
|
|
class="sr-only">{__('Admin', 'See the poll')}</span></a></td>
|
2015-04-02 16:52:46 +02:00
|
|
|
<td><a href="{poll_url id=$poll->admin_id admin=true}" class="btn btn-link"
|
2015-03-30 15:19:56 +02:00
|
|
|
title="{__('Admin', 'Change the poll')}"><span
|
2015-03-27 12:55:32 +01:00
|
|
|
class="glyphicon glyphicon-pencil"></span><span
|
2015-03-30 15:19:56 +02:00
|
|
|
class="sr-only">{__('Admin', 'Change the poll')}</span></a></td>
|
2015-03-27 12:55:32 +01:00
|
|
|
<td>
|
|
|
|
<button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link"
|
2015-03-30 15:19:56 +02:00
|
|
|
title="{__('Admin', 'Deleted the poll')}"><span
|
2015-03-27 12:55:32 +01:00
|
|
|
class="glyphicon glyphicon-trash text-danger"></span><span
|
2015-03-30 15:19:56 +02:00
|
|
|
class="sr-only">{__('Admin', 'Deleted the poll')}</span>
|
2015-03-27 12:55:32 +01:00
|
|
|
</td>
|
2015-01-18 16:46:54 +01:00
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</table>
|
2015-01-07 22:47:34 +01:00
|
|
|
|
2015-01-18 16:46:54 +01:00
|
|
|
<div class="panel-heading">
|
2015-03-30 15:19:56 +02:00
|
|
|
{__('Admin', 'Pages:')}
|
2015-01-18 16:46:54 +01:00
|
|
|
{for $p=1 to $pages}
|
|
|
|
{if $p===$page}
|
2015-03-27 12:55:32 +01:00
|
|
|
<a href="{$SERVER_URL}admin/polls.php?page={$p}&{$search_query}" class="btn btn-danger"
|
|
|
|
disabled="disabled">{$p}</a>
|
2015-01-07 22:47:34 +01:00
|
|
|
{else}
|
2015-03-27 12:55:32 +01:00
|
|
|
<a href="{$SERVER_URL}admin/polls.php?page={$p}&{$search_query}" class="btn btn-info">{$p}</a>
|
2015-01-07 22:47:34 +01:00
|
|
|
{/if}
|
2015-01-18 16:46:54 +01:00
|
|
|
{/for}
|
|
|
|
</div>
|
2015-01-18 16:14:45 +01:00
|
|
|
</div>
|
2015-01-07 22:47:34 +01:00
|
|
|
</form>
|
2015-03-30 15:19:56 +02:00
|
|
|
{/block}
|