Fixed carousel

This commit is contained in:
nemunaire 2014-01-21 17:45:46 +01:00
parent d26e7826bd
commit 0c33d83131
3 changed files with 43 additions and 44 deletions

View File

@ -5,56 +5,51 @@
{/block}
{block name=main}
{if isset($teams)}
{if isset($teams)}
<div id="carousel-team" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<div class="well">
<table class="table" style="font-size: 14px;">
<thead>
<tr>
<th></th>
{for $i=1 to $nbExoMax}
<th class="text-center">Exercice {$i}</th>
{/for}
</tr>
</thead>
<tbody>
{$total=0}
{foreach from=$themes item=theme}
<tr>
<th>{$theme->get_name()}</th>
{$themeID=$theme->get_id()}
{foreach from=$theme->get_exercices_ordered() item=exo}
{$teamName=""}
{for $i=0 to $nbExoMax}
{$teamName=$exo->first_to_solve_exercice()}
{/for}
{if $teamName != ""}
<td class="success text-center">{$teamName}</td>
{else}
<td class="danger text-center"></td>
{/if}
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{foreach from=$teams item=my_team key=k}
<div class="item active">
<div class="well">
<table class="table" style="font-size: 14px;">
<thead>
<tr>
<th></th>
{for $i=1 to $nbExoMax}
<th class="text-center">Exercice {$i}</th>
{/for}
</tr>
</thead>
<tbody>
{$total=0}
{foreach from=$themes item=theme}
<tr>
<th>{$theme->get_name()}</th>
{$themeID=$theme->get_id()}
{foreach from=$theme->get_exercices_ordered() item=exo}
{$teamName=""}
{for $i=0 to $nbExoMax}
{$teamName=$exo->first_to_solve_exercice()}
{/for}
{if $teamName != ""}
<td class="success text-center">{$teamName|replace:"_":" "}</td>
{else}
<td class="danger text-center"></td>
{/if}
{/foreach}
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
{foreach from=$teams item=my_team key=k}
<div class="item">
<div class="well">
{include file="summary.tpl"}
</div>
</div>
{/foreach}
{/foreach}
</div>
</div>
{/if}
{/block}

View File

@ -22,7 +22,7 @@
<h3>Top 10</h3>
<div class="list-group">
{foreach from=$top item=t key=k}
<div class="list-group-item">{$k+1}. {link href="{$t->id}-{$t->get_name_url()}" href_prefix="/" label={$t->get_name()|replace:"_":" et "}}
<div class="list-group-item">{$k+1}. {link href="{$t->id}-{$t->get_name_url()}" href_prefix="/" label={$t->get_name()|replace:"_":" "}}
<span class="badge">
{$t->get_pts()}
</span>
@ -46,5 +46,9 @@
var end_challenge = new Date({$END * 1000});
{/if}
update_end();
$(document).ready(function() {
$('#carousel-team').carousel({
interval: 2000 });
});
</script>
{/block}

View File

@ -1,7 +1,7 @@
<table class="table" style="font-size: 14px; padding: 10px; margin-bottom: 10px;">
<thead>
<tr>
<th style="font-size: 30px">{$my_team->get_name()}</th>
<th style="font-size: 30px">{$my_team->get_name()|replace:"_":" "}</th>
{for $i=1 to $nbExoMax}
<th class="text-center">Exercice {$i}</th>
{/for}