From 187c84074e91992f2b1d1678cf5a6c5f8f0c7f93 Mon Sep 17 00:00:00 2001 From: Olivier PEREZ Date: Thu, 18 Dec 2014 23:57:38 +0100 Subject: [PATCH] Display a different hint pane on admin page. --- tpl/part/poll_hint.tpl | 11 +++++++++++ tpl/part/poll_hint_admin.tpl | 7 +++++++ tpl/studs.tpl | 12 +++--------- 3 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 tpl/part/poll_hint.tpl create mode 100644 tpl/part/poll_hint_admin.tpl diff --git a/tpl/part/poll_hint.tpl b/tpl/part/poll_hint.tpl new file mode 100644 index 0000000..341a9f1 --- /dev/null +++ b/tpl/part/poll_hint.tpl @@ -0,0 +1,11 @@ +{if $active} +
+

{_("If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.")}

+ +
+{else} +
+

{_("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.")}

+ +
+{/if} \ No newline at end of file diff --git a/tpl/part/poll_hint_admin.tpl b/tpl/part/poll_hint_admin.tpl new file mode 100644 index 0000000..7a21be1 --- /dev/null +++ b/tpl/part/poll_hint_admin.tpl @@ -0,0 +1,7 @@ +
+

{_('As poll administrator, you can change all the lines of this poll with this button')} {_('Edit')}, + {_(' remove a column or a line with')} {_('Remove')} + {_('and add a new column with')} {_('Add a column')}.

+

{_('Finally, you can change the informations of this poll like the title, the comments or your email address.')}

+ +
\ No newline at end of file diff --git a/tpl/studs.tpl b/tpl/studs.tpl index 879cbbd..de89e8a 100644 --- a/tpl/studs.tpl +++ b/tpl/studs.tpl @@ -12,16 +12,10 @@ {* Information about voting *} -{if $poll->active} -
-

{_("If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.")}

- -
+{if $admin} + {include 'part/poll_hint_admin.tpl'} {else} -
-

{_("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.")}

- -
+ {include 'part/poll_hint.tpl' active=$poll->active} {/if} {* Scroll left and right *}