projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Also uses int in database to represent user ids (Cf. #844 and 7fe2cd86).
[platal.git]
/
templates
/
survey
/
index.tpl
diff --git
a/templates/survey/index.tpl
b/templates/survey/index.tpl
index
2d4890f
..
3479967
100644
(file)
--- a/
templates/survey/index.tpl
+++ b/
templates/survey/index.tpl
@@
-1,6
+1,6
@@
{**************************************************************************}
{* *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-200
7
Polytechnique.org *}
+{* Copyright (C) 2003-200
8
Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@
-29,21
+29,24
@@
</th>
</tr>
{iterate item=s from=$survey_current}
</th>
</tr>
{iterate item=s from=$survey_current}
- <tr class="{cycle values="impair,pair"}">
+ {if $smarty.session.auth || $s.mode == Survey::MODE_ALL}
+ <tr class="{cycle name=cs_cycle values="impair,pair"}">
<td class="half">
•
<td class="half">
•
- <a href="survey/
show/{$s.survey_
id}">
- {$s.title}
({$s.end|date_format:"%x"})
+ <a href="survey/
vote/{$s.
id}">
+ {$s.title}
[{$s.end|date_format:"%x"} - {$survey_modes[$s.mode]}]
</a>
</td>
</tr>
</a>
</td>
</tr>
- {assign var="has_cs" value="true"}
- {/iterate}
- {if !$has_cs}
- <tr>
- <td class="half">Aucun sondage en cours</td>
- </tr>
+ {assign var="has_cs" value="true"}
{/if}
{/if}
+ {/iterate}
+ <tr class="impair">
+ <td class="half">
+ {if !$has_cs}Aucun sondage en cours{/if}
+ {if $smarty.session.auth}<a style="display: block; float: right;" href="survey/edit/new">{icon name=page_edit} Proposer un sondage</a>{/if}
+ </td>
+ </tr>
</table>
<br />
</table>
<br />
@@
-55,15
+58,17
@@
</th>
</tr>
{iterate item=s from=$survey_old}
</th>
</tr>
{iterate item=s from=$survey_old}
- <tr class="{cycle values="impair,pair"}">
+ {if $smarty.session.auth || $s.mode == Survey::MODE_ALL}
+ <tr class="{cycle name=os_cycle values="impair,pair"}">
<td class="half">
•
<td class="half">
•
- <a href="survey/
show/{$s.survey_
id}">
- {$s.title}
({$s.end|date_format:"%x"})
+ <a href="survey/
result/{$s.
id}">
+ {$s.title}
[{$s.end|date_format:"%x"} - {$survey_modes[$s.mode]}]
</a>
</td>
</tr>
</a>
</td>
</tr>
- {assign var="has_os" value="true"}
+ {assign var="has_os" value="true"}
+ {/if}
{/iterate}
{if !$has_os}
<tr>
{/iterate}
{if !$has_os}
<tr>
@@
-72,6
+77,4
@@
{/if}
</table>
{/if}
</table>
-<a href="./survey/edit/new">Proposer un sondage</a>
-
{* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}
{* vim:set et sw=2 sts=2 ts=8 enc=utf-8: *}