Disable the button href when exercice is unlocked

This commit is contained in:
Li Chen 2013-11-08 20:39:58 +01:00
parent 23dc662822
commit 4d1a860a01

View File

@ -5,7 +5,14 @@
<h3 style="font-variant: small-caps">{$cur_theme->get_name()}</h3>
<p>
{foreach from=$cur_theme->get_exercicesOrdered() item=exercice}
<a class="btn btn-{if $exercice->has_solved($my_team)}success{elseif $exercice->is_unlocked($my_team)}primary{else}danger{/if}" role="button" href="/{$SALT_USER}/{$my_team->get_id()}/{$cur_theme->get_id()}-{$cur_theme->get_name()}/{$exercice->get_id()}">{$exercice->get_name()}</a>
{if $exercice->has_solved($my_team)}
<a class="btn btn-success" role="button" href="/{$SALT_USER}/{$my_team->get_id()}/{$cur_theme->get_id()}-{$cur_theme->get_name()}/{$exercice->get_id()}">{$exercice->get_name()}</a>
{elseif $exercice->is_unlocked($my_team)}
<a class="btn btn-primary" role="button" href="/{$SALT_USER}/{$my_team->get_id()}/{$cur_theme->get_id()}-{$cur_theme->get_name()}/{$exercice->get_id()}">{$exercice->get_name()}</a>
{else}
<a class="btn btn-danger">{$exercice->get_name()}</a>
{/if}
{/foreach}
</p>
</div>