45 lines
1.4 KiB
Smarty
45 lines
1.4 KiB
Smarty
{extends file="admin/layout.tpl"}
|
|
|
|
{block name=content}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>id</th>
|
|
<th>Nom</th>
|
|
<th>Exercices</th>
|
|
<th>Résolus</th>
|
|
</tr>
|
|
</thead>
|
|
{if $themes}
|
|
<tbody>
|
|
{foreach from=$themes item=t}
|
|
<tr>
|
|
<td>
|
|
{$t->id}<br>
|
|
<a href="?delete={$t->id}"><span class="glyphicon glyphicon-trash"></span></a>
|
|
<a href="/{$SALT_ADMIN}/themes/export?id={$t->id}" role="button"><span class="glyphicon glyphicon-floppy-save"></span> Exporter</a>
|
|
</td>
|
|
<td><a href="/{$SALT_ADMIN}/{$t->id}-{$t->name}">{$t->name}</a></td>
|
|
<td><ul>
|
|
{foreach from=$t->get_exercices_ordered() item=e}
|
|
<li><a href="/{$SALT_ADMIN}/{$t->id}-{$t->name}/{$e->id}">{$e->get_name()}</a></li>
|
|
{/foreach}
|
|
</ul></td>
|
|
<td>FIXME</td>
|
|
</tr>
|
|
{/foreach}
|
|
</tbody>
|
|
{/if}
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="6">
|
|
<a class="btn btn-success" href="/{$SALT_ADMIN}/themes/import" role="button"><span class="glyphicon glyphicon-cloud-upload"></span> Importer</a>
|
|
{if $themes}
|
|
<a class="btn btn-danger" href="/{$SALT_ADMIN}/themes/?drop" onclick="return confirm('Êtes-vous sûr de vouloir vider la table des thèmes ainsi que les exercices associés ?')" role="button"><span class="glyphicon glyphicon-trash"></span> Vider</a>
|
|
{/if}
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
{/block}
|