From 95c4737953e83e3f7fd6184928ab3cd131f1057a Mon Sep 17 00:00:00 2001 From: Erwan TERTRAIS <erwan@tertrais.xyz> Date: Wed, 13 Dec 2017 10:40:10 +0100 Subject: [PATCH] edit button classic poll --- tpl/part/vote_table_classic.tpl | 10 +++++++++- tpl/part/vote_table_date.tpl | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/tpl/part/vote_table_classic.tpl b/tpl/part/vote_table_classic.tpl index fe6a43e1..bcd4cf27 100644 --- a/tpl/part/vote_table_classic.tpl +++ b/tpl/part/vote_table_classic.tpl @@ -96,7 +96,15 @@ {elseif !$hidden} {* Voted line *} <tr> - <th class="bg-info">{$vote->name|html}</th> + <th class="bg-info">{$vote->name|html} + {if $slots gt 4} + <span style="float:right;"> + <a href="{if $admin}{poll_url id=$poll->admin_id vote_id=$vote->uniqId admin=true}{else}{poll_url id=$poll->id vote_id=$vote->uniqId}{/if}" class="btn btn-default btn-sm" title="{__f('Poll results', 'Edit the line: %s', $vote->name)|html}"> + <i class="glyphicon glyphicon-pencil"></i><span class="sr-only">{__('Generic', 'Edit')}</span> + </a> + </span> + {/if} + </th> {$id=0} {foreach $slots as $slot} diff --git a/tpl/part/vote_table_date.tpl b/tpl/part/vote_table_date.tpl index 9688163a..63d4b622 100644 --- a/tpl/part/vote_table_date.tpl +++ b/tpl/part/vote_table_date.tpl @@ -152,11 +152,11 @@ {* Voted line *} <th class="bg-info">{$vote->name|html} - {if $slots gt 7} - <span style="float:right;"> - <a href="{if $admin}{poll_url id=$poll->admin_id vote_id=$vote->uniqId admin=true}{else}{poll_url id=$poll->id vote_id=$vote->uniqId}{/if}" class="btn btn-default btn-sm" title="{__f('Poll results', 'Edit the line: %s', $vote->name)|html}"> - <i class="glyphicon glyphicon-pencil"></i><span class="sr-only">{__('Generic', 'Edit')}</span> - </a> + {if $slots gt 4} + <span style="float:right;"> + <a href="{if $admin}{poll_url id=$poll->admin_id vote_id=$vote->uniqId admin=true}{else}{poll_url id=$poll->id vote_id=$vote->uniqId}{/if}" class="btn btn-default btn-sm" title="{__f('Poll results', 'Edit the line: %s', $vote->name)|html}"> + <i class="glyphicon glyphicon-pencil"></i><span class="sr-only">{__('Generic', 'Edit')}</span> + </a> </span> {/if} </th> -- GitLab