Lobby at challenge end
This commit is contained in:
parent
3f15b7187e
commit
2a9cac24f7
5 changed files with 75 additions and 21 deletions
1
TODO
1
TODO
|
|
@ -4,7 +4,6 @@
|
||||||
** TODO trop de thèmes dans l'interface d'admin => menu
|
** TODO trop de thèmes dans l'interface d'admin => menu
|
||||||
** TODO avoir la page avec le résumé
|
** TODO avoir la page avec le résumé
|
||||||
* PHP
|
* PHP
|
||||||
** TODO On peut encore soumettre après la fin...
|
|
||||||
** TODO les mauvaises pages sont generees (pas debug et non liens prod)
|
** TODO les mauvaises pages sont generees (pas debug et non liens prod)
|
||||||
** TODO sur le frontend, en mode productoin, il va chercher les pages de debug
|
** TODO sur le frontend, en mode productoin, il va chercher les pages de debug
|
||||||
** TODO numéro des exercices
|
** TODO numéro des exercices
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,17 @@ else if ($n && $p[0] == SALT_USER)
|
||||||
$page = "teams/lobby";
|
$page = "teams/lobby";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (time() > $VAR["end_challenge"])
|
||||||
|
{
|
||||||
|
$TEAM = new Team($p[1]);
|
||||||
|
$template->assign("my_team", $TEAM);
|
||||||
|
$template->assign("themes", Theme::get_themes());
|
||||||
|
$template->assign("rank", Team::get_top());
|
||||||
|
|
||||||
|
require("team/summary.php");
|
||||||
|
$page = "teams/end";
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$TEAM = new Team($p[1]);
|
$TEAM = new Team($p[1]);
|
||||||
|
|
|
||||||
20
onyx/tpl/bootstrap/rank.tpl
Normal file
20
onyx/tpl/bootstrap/rank.tpl
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
<table class="table table-striped table-hover">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>#</th>
|
||||||
|
<th>Team</th>
|
||||||
|
<th>Slogan</th>
|
||||||
|
<th>Points</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{foreach from=$rank item=t key=k}
|
||||||
|
<tr{if $t->id == $my_team->id} class="active" style="font-weight: bold"{/if}>
|
||||||
|
<th>{$t->get_rank()}</th>
|
||||||
|
<td>{$t->get_name()}</td>
|
||||||
|
<td>{$t->slogan}</td>
|
||||||
|
<td>{$t->get_pts()}</td>
|
||||||
|
</tr>
|
||||||
|
{/foreach}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
43
onyx/tpl/bootstrap/teams/end.tpl
Normal file
43
onyx/tpl/bootstrap/teams/end.tpl
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
{extends file="layout.tpl"}
|
||||||
|
|
||||||
|
{block name=head}
|
||||||
|
<link href="{$SALT_CDN}/css/main.css" type="text/css" rel="stylesheet">
|
||||||
|
{block name=head2}{/block}
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name=end}
|
||||||
|
<script src="{$SALT_CDN}/js/countdown.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
{if isset($END)}
|
||||||
|
var end_challenge = new Date({$END * 1000});
|
||||||
|
{/if}
|
||||||
|
update_end();
|
||||||
|
</script>
|
||||||
|
{/block}
|
||||||
|
|
||||||
|
{block name=content}
|
||||||
|
{include file="clock.tpl"}
|
||||||
|
<div class="container" style="margin-top: 25px">
|
||||||
|
<div class="alert alert-success">
|
||||||
|
<strong>Le challenge est terminé !</strong> Vous avez résolu {$my_team->get_solved_exercices()|count} exercices, pour un total de {$my_team->get_pts()} points. Vous êtes <strong>{$my_team->get_rank()}e</strong>, bravo !
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-info">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">Progression</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{include file="summary.tpl"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="panel panel-default">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<h3 class="panel-title">Classement final</h3>
|
||||||
|
</div>
|
||||||
|
<div class="panel-body">
|
||||||
|
{include file="rank.tpl"}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/block}
|
||||||
|
|
@ -1,24 +1,5 @@
|
||||||
{extends file="teams/layout.tpl"}
|
{extends file="teams/layout.tpl"}
|
||||||
|
|
||||||
{block name=content}
|
{block name=content}
|
||||||
<table class="table table-striped table-hover">
|
{include file="rank.tpl"}
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>#</th>
|
|
||||||
<th>Team</th>
|
|
||||||
<th>Slogan</th>
|
|
||||||
<th>Points</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
{foreach from=$rank item=t key=k}
|
|
||||||
<tr{if $t->id == $my_team->id} class="active" style="font-weight: bold"{/if}>
|
|
||||||
<th>{$t->get_rank()}</th>
|
|
||||||
<td>{$t->get_name()}</td>
|
|
||||||
<td>{$t->slogan}</td>
|
|
||||||
<td>{$t->get_pts()}</td>
|
|
||||||
</tr>
|
|
||||||
{/foreach}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
|
||||||
Reference in a new issue