2013-11-08 19:46:48 +00:00
{ 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>
2013-12-01 19:03:20 +00:00
<td><a href="/ { $SALT_ADMIN } /ex/ { $t - > id } - { $t - > name } "> { $t - > name } </a></td>
2013-11-08 19:46:48 +00:00
<td><ul>
2013-11-12 15:52:50 +00:00
{ foreach from = $t - > get_exercices_ordered ( ) item = e }
2014-12-14 10:04:17 +00:00
<li><a href="/ { $SALT_ADMIN } /ex/ { $t - > id } - { $t - > name } / { $e - > id } "> { $e - > get_title ( ) } </a></li>
2013-11-08 19:46:48 +00:00
{ /foreach }
</ul></td>
2014-01-14 15:14:31 +00:00
<td>
{ foreach from = $t - > get_exercices_ordered ( ) item = e }
{ count ( $e - > get_solved ( ) ) } <br>
{ /foreach }
</td>
2013-11-08 19:46:48 +00:00
</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 }
2013-11-25 10:53:19 +00:00
<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>
2013-11-08 19:46:48 +00:00
{ /if }
</td>
</tr>
</tfoot>
</table>
{ /block }