{if isset($is_q_plan) && $is_q_plan === true}<div style="height: 100%; overflow: scroll;">{/if}
<table class="editablepop" style="overflow: hidden;">
    <thead>
        <tr>
            <th scope="col" style="min-width:150px;">{$i.basic_staff}</th>
            {foreach from=$security_list item=key key=curr}
                {assign var="namekey" value="basic_`$curr`"}
                <th scope="col" class="rota">
                    <span>{if isset($i.$namekey)}{$i.$namekey}{else}{$key}{/if}</span>
                </th>
            {/foreach}
            <th scope="col" class="rota"><span>{$i.staffadmin_change_days_past}</span></th>
            <th scope="col" class="rota"><span>{$i.staffadmin_is_project_manager}</span></th>
            <th scope="col" class="rota" style="min-width:150px;"><span style="right:10px;">{$i.staffadmin_project_manager}</span></th>
            <th scope="col" class="rota" style="min-width:50px;"><span>{$i.staffadmin_respect_project_manager}</span></th>
        </tr>
    </thead>
    <tbody>
        {foreach from=$staff_list item=staff}
            <tr {if !$staff->active}class="inforedrow"{/if} {if !isset($is_q_plan) || $is_q_plan !== true}onclick="staffadmin.open('{$staff->id}', false, '', 'staffadmin_tab_security');"{/if}>
                <td {if !isset($is_q_plan) || $is_q_plan !== true}ostyle="cursor:pointer;"{/if} title="{$staff->fullname|truncate:100|escape:'html'}">{$staff->fullname|truncate:40|escape:'html'}</td>
                {include file='Staffadmin/rights_only.tpl'}
                <td style="text-align:right;" title="{$i.staffadmin_change_days_past2}">{*
                    *}{if $staff->change_days_past<=-1}-{else}{intval($staff->change_days_past)}{/if}{*
                *}</td>
                <td style="text-align:center;" title="{$i.staffadmin_is_project_manager}">{boolview value=$staff->is_project_manager hideno=1}</td>
                <td style="min-width:150px; text-align:left;" title="{$i.staffadmin_project_manager}{if $staff->project_manager_id}:{/if} {$staff->project_manager_name|truncate:100|escape:'html'}">{$staff->project_manager_name|truncate:40|escape:'html'}</td>
                <td style="text-align:center;" title="{$i.staffadmin_respect_project_manager}">{boolview value=$staff->respect_project_manager hideno=1}</td>
            </tr>
        {foreachelse}
            <tr>
                <td colspan="5">{$i.basic_no_result1}</td>
            </tr>
        {/foreach}
    </tbody>                
</table>
{if isset($is_q_plan) && $is_q_plan === true}<div>{/if}