Fixed carousel

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
<table class="table" style="font-size: 14px; padding: 10px; margin-bottom: 10px;"> <table class="table" style="font-size: 14px; padding: 10px; margin-bottom: 10px;">
<thead> <thead>
<tr> <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} {for $i=1 to $nbExoMax}
<th class="text-center">Exercice {$i}</th> <th class="text-center">Exercice {$i}</th>
{/for} {/for}