2015-01-07 22:47:34 +01:00
|
|
|
{extends 'admin/admin_page.tpl'}
|
|
|
|
|
|
|
|
{block 'admin_main'}
|
|
|
|
<form action="" method="POST">
|
2015-01-10 16:35:21 +01: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-01-11 14:59:25 +01:00
|
|
|
<h3>{_("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"
|
|
|
|
name="annullesuppression">{_('Keep this poll!')}</button>
|
2015-01-11 14:59:25 +01:00
|
|
|
<button type="submit" name="delete_confirm" value="{$poll_to_delete->id|html}"
|
2015-01-07 22:47:34 +01:00
|
|
|
class="btn btn-danger">{_('Remove this poll!')}</button>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
2015-01-18 16:46:54 +01:00
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
2015-02-26 22:29:24 +01:00
|
|
|
{$polls|count} / {$count} {_('polls in the database at this time')}
|
2015-01-18 16:46:54 +01:00
|
|
|
</div>
|
|
|
|
|
2015-01-07 22:47:34 +01:00
|
|
|
|
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-01-18 16:46:54 +01:00
|
|
|
<th scope="col">{_('Title')}</th>
|
|
|
|
<th scope="col">{_('Author')}</th>
|
|
|
|
<th scope="col">{_('Email')}</th>
|
|
|
|
<th scope="col">{_('Expiration\'s date')}</th>
|
|
|
|
<th scope="col">{_('Users')}</th>
|
|
|
|
<th scope="col">{_('Poll ID')}</th>
|
|
|
|
<th scope="col" colspan="3">{_('Actions')}</th>
|
|
|
|
</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'}
|
|
|
|
<span class="glyphicon glyphicon-calendar" aria-hidden="true" title="{_('Date')}"></span><span class="sr-only">{_('Date')}</span>
|
|
|
|
{else}
|
|
|
|
<span class="glyphicon glyphicon-list-alt" aria-hidden="true" title="{_('Classic')}"></span><span class="sr-only">{_('Classic')}</span>
|
|
|
|
{/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()}
|
|
|
|
<td>{date('d/m/y', strtotime($poll->end_date))}</td>
|
2015-01-07 22:47:34 +01:00
|
|
|
{else}
|
2015-01-18 16:46:54 +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>
|
|
|
|
<td><a href="{$poll->id|poll_url|html}" class="btn btn-link" title="{_('See the poll')}"><span class="glyphicon glyphicon-eye-open"></span><span class="sr-only">{_('See the poll')}</span></a></td>
|
|
|
|
<td><a href="{$poll->admin_id|poll_url:true|html}" class="btn btn-link" title="{_('Change the poll')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{_('Change the poll')}</span></a></td>
|
|
|
|
<td><button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link" title="{_('Remove the poll')}"><span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">{_('Remove the poll')}</span></td>
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</table>
|
2015-01-07 22:47:34 +01:00
|
|
|
|
2015-01-18 16:46:54 +01:00
|
|
|
<div class="panel-heading">
|
|
|
|
{_('Pages:')}
|
|
|
|
{for $p=1 to $pages}
|
|
|
|
{if $p===$page}
|
|
|
|
<a href="{$SERVER_URL}{$SCRIPT_NAME}?page={$p}" class="btn btn-danger" disabled="disabled">{$p}</a>
|
2015-01-07 22:47:34 +01:00
|
|
|
{else}
|
2015-01-18 16:46:54 +01:00
|
|
|
<a href="{$SERVER_URL}{$SCRIPT_NAME}?page={$p}" 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>
|
|
|
|
{/block}
|