Don't display description on studs.php if the field is blank

This commit is contained in:
Olivier Perez 2015-04-15 13:16:55 +02:00
parent f5c4ddddbe
commit 3fb351dbce

View File

@ -72,6 +72,7 @@
</div> </div>
{/if} {/if}
</div> </div>
{if $admin || !empty(preg_replace('/[ \r\n]/', '', $poll->description))}
<div class="form-group col-md-8" id="description-form"> <div class="form-group col-md-8" id="description-form">
<label class="control-label">{__('Generic', 'Description')}{if $admin && !$expired} <button class="btn btn-link btn-sm btn-edit" title="{__('PollInfo', 'Edit the description')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic', 'Edit')}</span></button>{/if}</label> <label class="control-label">{__('Generic', 'Description')}{if $admin && !$expired} <button class="btn btn-link btn-sm btn-edit" title="{__('PollInfo', 'Edit the description')}"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">{__('Generic', 'Edit')}</span></button>{/if}</label>
<pre class="form-control-static well poll-description">{$poll->description|html}</pre> <pre class="form-control-static well poll-description">{$poll->description|html}</pre>
@ -84,6 +85,7 @@
</div> </div>
{/if} {/if}
</div> </div>
{/if}
</div> </div>
<div class="row"> <div class="row">
</div> </div>