X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Fsurvey%2Findex.tpl;h=11105216ea43fb2161c814c364e7c1f3b824e125;hb=9006db5d9e2b5d636b631fb51a834977a067d6bb;hp=e32c9f797094eb3374d8ac9ba2c178901ff6e584;hpb=9e1816c7666767755abbc24f6a0df290efff81b6;p=platal.git diff --git a/templates/survey/index.tpl b/templates/survey/index.tpl index e32c9f7..1110521 100644 --- a/templates/survey/index.tpl +++ b/templates/survey/index.tpl @@ -22,50 +22,64 @@

Sondages

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