server/onyx/tpl/bootstrap/teams/exercice.tpl

72 lines
2.2 KiB
Smarty
Raw Normal View History

2013-11-08 14:47:55 +00:00
{extends file="teams/theme.tpl"}
2013-11-08 14:47:55 +00:00
{block name=exercices}
<div class="panel panel-info">
<div class="panel-heading">
2014-01-11 16:04:38 +00:00
<h3 class="panel-title">Exercice {$cur_exercice->number} <small>{$solved} équipe{if $solved > 1}s ont{else} a{/if} résolu cet exercice</small></h3>
2013-11-08 14:47:55 +00:00
</div>
<div class="panel-body">
<ul>
<li><strong>Gain :</strong> {$cur_exercice->points}</li>
2013-12-14 05:11:14 +00:00
<li><strong>Description :</strong> {$cur_exercice->statement|escape|nl2br}</li>
2013-11-08 14:47:55 +00:00
</ul>
</div>
</div>
2013-11-04 23:35:35 +00:00
2013-11-08 14:47:55 +00:00
{if $cur_exercice->files}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Téléchargements</h3>
</div>
<table class="table">
<thead>
<tr>
<th></th>
<th>Nom</th>
<th>SHA1</th>
<th>Taille</th>
</tr>
</thead>
<tbody>
{foreach from=$cur_exercice->files item=file}
{if file_exists($file['path'])}
<tr>
<td>
2013-12-12 18:33:18 +00:00
<a href="/files/{$file['path_orig']}">
2013-11-08 14:47:55 +00:00
<span class="glyphicon glyphicon-download"></span>
</a>
</td>
<td>{$file['name']}</td>
<td>{$file['sha1']}</td>
<td>{filesize($file['path'])}</td>
</tr>
{/if}
{/foreach}
</tbody>
</table>
</div>
2013-11-04 23:35:35 +00:00
{/if}
2013-11-08 14:47:55 +00:00
<div class="panel panel-success">
<div class="panel-heading">
<h3 class="panel-title">Soumettre une solution</h3>
</div>
<div class="panel-body">
{if $cur_exercice->has_solved($my_team)}
2014-01-14 16:09:29 +00:00
<strong>R&eacute;solu &agrave; {$cur_exercice->has_solved($my_team)|date_format:"%H:%M:%S"} :)</strong>
2013-11-08 14:47:55 +00:00
{else}
2014-01-14 16:09:29 +00:00
{if $cur_exercice->last_try($my_team)}
<label>Derni&egrave;re solution test&eacute;e &agrave;</label> {$cur_exercice->last_try($my_team)|date_format:"%H:%M:%S"}
{/if}
<form role="form" method="post" action="/{$SALT_USER}/{$my_team->get_id()}/{$cur_theme->get_id()}-{$cur_theme->get_name_url()}/{$cur_exercice->id}/submission" >
2013-11-08 14:47:55 +00:00
<div class="form-group">
<label for="solution">Soumettre la solution :</label>
<input type="text" class="form-control" id="solution" name="solution">
</div>
2013-11-28 16:35:34 +00:00
<button type="submit" class="btn btn-success" {if isset($submission_disabled)}disabled="disabled"{/if}>Soumettre</button>
</form>
2013-11-08 14:47:55 +00:00
{/if}
</div>
2013-11-04 22:20:16 +00:00
</div>
{/block}