Add link to global rank in team part
This commit is contained in:
parent
6b5e51f4e3
commit
3f731fb8e0
5 changed files with 42 additions and 2 deletions
|
@ -138,6 +138,11 @@ else if ($n && $p[0] == SALT_USER)
|
|||
$page = require("team/me.php");
|
||||
break;
|
||||
|
||||
case "rank/":
|
||||
case "rank":
|
||||
$page = require("team/rank.php");
|
||||
break;
|
||||
|
||||
case "summary":
|
||||
case "summary/":
|
||||
$page = require("team/summary.php");
|
||||
|
|
11
onyx/include/team/rank.php
Normal file
11
onyx/include/team/rank.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
if(!defined('ONYX')) exit;
|
||||
|
||||
$template->assign("top", Team::get_top(10));
|
||||
$template->assign("rank", Team::get_top());
|
||||
|
||||
$template->assign("themes", Theme::get_themes());
|
||||
$template->assign("nbExoMax", Exercice::get_nb_exo_max());
|
||||
|
||||
return "teams/rank";
|
|
@ -5,7 +5,7 @@
|
|||
{/block}
|
||||
|
||||
{block name=main}
|
||||
<table class="table table-striped">
|
||||
<table class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
|
|
|
@ -44,7 +44,7 @@ $(document).ready(function() {
|
|||
</p>
|
||||
<p>
|
||||
{$my_team->get_pts()} points{link class="badge pull-right" href_prefix="/{$SALT_USER}/{$my_team->get_id()}/" href="summary" label="Synthèse"}<br>
|
||||
{$my_team->get_rank()}<sup>e</sup> sur {Team::get_nb_teams()}
|
||||
{$my_team->get_rank()}<sup>e</sup> sur {Team::get_nb_teams()}{link class="badge pull-right" href_prefix="/{$SALT_USER}/{$my_team->get_id()}/" href="rank" label="Détails"}
|
||||
</p>
|
||||
</div>
|
||||
</aside>
|
||||
|
|
24
onyx/tpl/bootstrap/teams/rank.tpl
Normal file
24
onyx/tpl/bootstrap/teams/rank.tpl
Normal file
|
@ -0,0 +1,24 @@
|
|||
{extends file="teams/layout.tpl"}
|
||||
|
||||
{block name=content}
|
||||
<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>
|
||||
{/block}
|
Reference in a new issue