X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=templates%2Fprofile%2Fgrades.js.tpl;h=b395b1adef4c2b1798a703b0503ea1afce6a3305;hb=353f2d2b11c4e3c6c0bc3553813368b6f42fa9c6;hp=d674f0cec38c929319988f8763858aa8cf06b82c;hpb=dd9bac8f7903e9924525ad8db3e38650ff5ad1b6;p=platal.git diff --git a/templates/profile/grades.js.tpl b/templates/profile/grades.js.tpl index d674f0c..b395b1a 100644 --- a/templates/profile/grades.js.tpl +++ b/templates/profile/grades.js.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2008 Polytechnique.org *} +{* Copyright (C) 2003-2009 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -23,15 +23,15 @@ subgrades = new Array(); names = new Array(); {foreach from=$medal_list key=type item=list} -{foreach from=$list item=m} -names[{$m.id}] = "{$m.text}"; -{if $grades[$m.id]|@count} -names[{$m.id}] = "{$m.text}"; -subgrades[{$m.id}] = new Array({$grades[$m.id]|@count}); -{foreach from=$grades[$m.id] item=g} -subgrades[{$m.id}][{$g.gid-1}] = [{$g.gid},"{$g.text}"]; -{/foreach} -{/if}{/foreach} + {foreach from=$list item=m} + names[{$m.id}] = "{$m.text}"; + {if $grades[$m.id]|@count} + subgrades[{$m.id}] = new Array({$grades[$m.id]|@count}); + {foreach from=$grades[$m.id] item=g} + subgrades[{$m.id}][{$g.gid-1}] = [{$g.gid},"{$g.text}"]; + {/foreach} + {/if} + {/foreach} {/foreach} {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}