UI : Add availability to edit poll title
This commit is contained in:
parent
410d2127ce
commit
94380c6182
@ -1,14 +1,28 @@
|
||||
{* TODO Add a form maybe *}
|
||||
{$admin = $admin|default:false}
|
||||
<form action="{$admin_poll_id|poll_url:true}" method="POST" id="title-form">
|
||||
<div class="jumbotron{if $admin} bg-danger{/if}">
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<h3>{$poll->title}</h3>
|
||||
<h3>{$poll->title}{if $admin} <button class="btn btn-link btn-sm btn-edit" title="{_('Edit the title')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{_('Edit')}</span></button>{/if}</h3>
|
||||
{if $admin}
|
||||
<div class="hidden js-title">
|
||||
<label class="sr-only" for="newtitle">{_("Title")}</label>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="newtitle" name="title" size="40" value="{$poll->title}" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-success" name="update_poll_info" value="title" title="'{_('Save the new title')}"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">{_('Save')}</span></button>
|
||||
<button class="btn btn-link btn-cancel" title="#_('Cancel the title edit')}"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">{_('Cancel')}</span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="btn-group pull-right">
|
||||
<button onclick="print(); return false;" class="btn btn-default"><span class="glyphicon glyphicon-print"></span> {_('Print')}</button>
|
||||
<a href="{$SERVER_URL}export.php?poll={$poll_id}&mode=csv" class="btn btn-default"><span class="glyphicon glyphicon-download-alt"></span> {_('Export to CSV')}</a>
|
||||
{if $admin|default:false}
|
||||
{if $admin}
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-trash"></span> <span class="sr-only">' . _("Remove") . '</span> <span class="caret"></span>
|
||||
</button>
|
||||
@ -52,3 +66,4 @@
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
{* Global informations about the current poll *}
|
||||
|
||||
{include 'part/poll_info.tpl'}
|
||||
{include 'part/poll_info.tpl' admin=$admin}
|
||||
|
||||
{* Information about voting *}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user