X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fsurvey%2Findex.tpl;h=81c3b7315217e78a8f7a38786828cabb6b6aea06;hb=173ff0bdf41db90ee0995e0c3bf844bf2151d0e6;hp=6f8d914d9c929a9fd2a37f87e9d2d3f7066827d4;hpb=82af3fc3b6e003b0cbbcf4faf4ed4f0ea5c07570;p=platal.git diff --git a/templates/survey/index.tpl b/templates/survey/index.tpl index 6f8d914..81c3b73 100644 --- a/templates/survey/index.tpl +++ b/templates/survey/index.tpl @@ -22,33 +22,75 @@

Sondages

-{if $active->total() > 0} - +{* Survey::MODE_ALL equals 0. *} +{assign var=SurveyMODE_ALL value=0} +{if $survey_current->total() > 0 || $smarty.session.auth} +
- - {if hasPerm('admin')} - - {/if} - {iterate from=$active item=survey} - + {iterate item=s from=$survey_current} + {if $smarty.session.auth || $s.mode == $SurveyMODE_ALL} + + - {if hasPerm('admin')} - - {/if} + {assign var="has_cs" value="true"} + {/if} {/iterate} + {if hasPerm('user')} + + + + {/if}
+ Sondages en cours
+ {$s.title} + {if $s.uid eq $smarty.session.user->id() || hasPerm('admin')} + (résultats partiels) + {/if} + - {$survey->title} + {$s.end|date_format:"%x"} - {icon name=page_edit} + + {$survey_modes[$s.mode]}
+ {if $smarty.session.auth}{icon name=page_edit} Proposer un sondage{/if} +
{/if} +
-
- {icon name=page_edit} Proposer un nouveau sondage -
+ + + + + + {iterate item=s from=$survey_old} + {if $smarty.session.auth || $s.mode == $SurveyMODE_ALL} + + + + + + {assign var="has_os" value="true"} + {/if} + {/iterate} + {if !$has_os} + + + + {/if} +
+ Anciens sondages +
+ + {$s.title} + + + {$s.end|date_format:"%x"} + + {$survey_modes[$s.mode]} +
Aucun ancien sondage
{* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}