Commit bd03f7cc authored by robertokir's avatar robertokir

[bp/r69914][FIX] PluginTrackerList: Check permissions properly in pop-ups....

[bp/r69914][FIX] PluginTrackerList: Check permissions properly in pop-ups. Also, do not show blank pop-up when no fields should show (thanks Marc)
parent f43afa27
{assign var=hasPopup value='n'}
{capture name=popup}
<div class="panel panel-default">
<table class="table table-bordered item">
{foreach from=$popupFields|default:null item=field}
<tr><th>{$field.name|escape}</th><td>{trackeroutput field=$field item=$popupItem showpopup=n showlinks=n}</td></tr>
{if $field.isPublic eq 'y'
and ($field.isHidden eq 'n' or $field.isHidden eq 'c' or $field.isHidden eq 'p' or $field.isHidden eq 'a' or $tiki_p_admin_trackers eq 'y' or $tiki_p_admin eq 'y')
and $field.type ne 'x' and $field.type ne 'h' and ($field.type ne 'p' or $field.options_array[0] ne 'password')
and (empty($field.visibleBy) or in_array($default_group, $field.visibleBy) or tiki_p_admin_trackers eq 'y' or $tiki_p_admin eq 'y')}
<tr><th>{$field.name|escape}</th><td>{trackeroutput field=$field item=$popupItem showpopup=n showlinks=n}</td></tr>
{$hasPopup = 'y'}
{/if}
{/foreach}
</table>
</div>
{/capture}
{popup text=$smarty.capture.popup|escape:"javascript"|escape:"html" fullhtml="1" hauto=true vauto=true trigger="hover"}
{if $hasPopup eq 'y'}
{popup text=$smarty.capture.popup|escape:"javascript"|escape:"html" fullhtml="1" hauto=true vauto=true trigger="hover"}
{/if}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment