date.chapril.org-framadate/tpl/admin/polls.tpl

75 lines
4.1 KiB
Smarty
Raw Normal View History

{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}"/>
{if $poll_to_delete}
<div class="alert alert-warning text-center">
2015-03-24 00:22:37 +01:00
<h3>{__('adminstuds\\Confirm removal of the poll')} "{$poll_to_delete->id|html}"</h3>
<p>
<button class="btn btn-default" type="submit" value="1"
2015-03-24 00:22:37 +01:00
name="annullesuppression">{__('adminstuds\\Keep the poll')}</button>
<button type="submit" name="delete_confirm" value="{$poll_to_delete->id|html}"
2015-03-24 00:22:37 +01:00
class="btn btn-danger">{__('adminstuds\\Delete the poll')}</button>
</p>
</div>
{/if}
2015-01-18 16:46:54 +01:00
<div class="panel panel-default">
<div class="panel-heading">
2015-03-24 00:22:37 +01:00
{$polls|count} / {$count} {__('Admin\\polls in the database at this time')}
2015-01-18 16:46:54 +01:00
</div>
<table class="table table-bordered table-polls">
<tr align="center">
<th scope="col"></th>
2015-03-24 00:22:37 +01: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\\Users')}</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">
<td class="cell-format">
2015-01-18 16:46:54 +01:00
{if $poll->format === 'D'}
2015-03-24 00:22:37 +01:00
<span class="glyphicon glyphicon-calendar" aria-hidden="true" title="{__('Generic\\Date')}"></span><span class="sr-only">{__('Generic\\Date')}</span>
2015-01-18 16:46:54 +01:00
{else}
2015-03-24 00:22:37 +01:00
<span class="glyphicon glyphicon-list-alt" aria-hidden="true" title="{__('Generic\\Classic')}"></span><span class="sr-only">{__('Generic\\Classic')}</span>
2015-01-18 16:46:54 +01:00
{/if}
</td>
<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>
{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>
{/if}
2015-01-18 16:46:54 +01:00
<td>{$poll->votes|html}</td>
<td>{$poll->id|html}</td>
2015-03-24 00:22:37 +01:00
<td><a href="{$poll->id|poll_url|html}" class="btn btn-link" title="{__('Admin\\See the poll')}"><span class="glyphicon glyphicon-eye-open"></span><span class="sr-only">{__('Admin\\See the poll')}</span></a></td>
<td><a href="{$poll->admin_id|poll_url:true|html}" class="btn btn-link" title="{__('Admin\\Change the poll')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Admin\\Change the poll')}</span></a></td>
<td><button type="submit" name="delete_poll" value="{$poll->id|html}" class="btn btn-link" title="{__('Admin\\Deleted the poll')}"><span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">{__('Admin\\Deleted the poll')}</span></td>
2015-01-18 16:46:54 +01:00
</tr>
{/foreach}
</table>
2015-01-18 16:46:54 +01:00
<div class="panel-heading">
2015-03-24 00:22:37 +01:00
{__('Admin\\Pages:')}
2015-01-18 16:46:54 +01:00
{for $p=1 to $pages}
{if $p===$page}
<a href="{$SERVER_URL}admin/polls.php?page={$p}" class="btn btn-danger" disabled="disabled">{$p}</a>
{else}
<a href="{$SERVER_URL}admin/polls.php?page={$p}" class="btn btn-info">{$p}</a>
{/if}
2015-01-18 16:46:54 +01:00
{/for}
</div>
</div>
</form>
{/block}