{if $show_header}
<div class="ui-report-header ui-widget-header ui-corner-all noprint" style="pd4ml-display:none; margin-bottom:5mm;">
    <a class="dialog_make_text_btn ui-corner-all" style="pd4ml-display:none;"
       onclick="evaluation.open_file(this, 'pdf', '{site_url url="reportportlet/`$reports_xjxcookie`/`$timeprotocol_report`/result_pdf/`$staff_timeprotocol_file_id`"}', 'XNOX')">
        <span class="dialog_make_btn16 pdf"></span>
        PDF
    </a>
    
    {if $staff_count === 1}
        <a class="dialog_make_text_btn ui-corner-all" style="pd4ml-display:none;"
           onclick="evaluation.open_file_canvas(this, '{$timeprotocol_report}', '{$staff_timeprotocol_file_id}', reporting_chart_canvas.toDataURL())">
            <span class="dialog_make_btn16 pdf"></span>
            {$i.basic_type_image} PDF
        </a>
    {/if}
        
    {portlet file='report_designs_list'}
    
    {portlet file='report_formats_list' formats_default='A4'}
</div>
{else}
    {*MORE THAN ONE STAFF => DO PAGE BREAK*}
    <pd4ml:page.break/>
{/if}

<!-- ------------------------------------- Zeitraum + Mitarbeiter ------------------------------------- -->

<table class="editablepop" style="margin-bottom:5mm; display:block; pd4ml-display:block; width:100%;">
    <tbody>
        <tr>
            <td style="vertical-align:top; width:450px; background: none;">{*
                *}<h3 style="line-height:20px;">{*
                    *}{$staff_info->staff_name} - {*
                    *}{$from_day=$from_date->format('d')}{*
                    *}{if $from_day==='01'}{*
                        *}{$from_month="basic_month_`$from_date->format('m')`"}{*
                        *}{$i.$from_month} {$from_date->format('Y')}
                    {else}{*
                        *}{$from_date->us_date()} - {$to_date->us_date()}
                    {/if}
                </h3>
            </td>
            <td style="vertical-align:bottom; background: none;"><textarea style="display:none; pd4ml-display:block; width:700px; height:28px; font-size:20px; border:0 none; margin:0; padding:0;" rows="1" cols="50"></textarea></td>
        </tr>
    </tbody>
</table>
            
<!-- ------------------------------------- Hauptliste ------------------------------------- -->

<table id="staff_timeprotocol_data_{$staff_uid}" class="editablepop" style="margin-top: 2mm;">
    <colgroup>
        <col style="width:200mm;"></col>
        {include file='reportsview/staff_timeprotocol_colgroups.tpl'}
    </colgroup>
    <thead>
        <tr>
            <th>{$i.reporting_rep_project}</th>{*
            *}{include file='reportsview/staff_timeprotocol_header.tpl' target_hours_header=1}
        </tr>
    </thead>
    <tbody>
        {include file='reportsview/staff_timeprotocol_projects.tpl'}
        {include file='reportsview/staff_timeprotocol_totals.tpl'}
    </tbody>
</table>
        
<p style="margin:1mm;">
    {if $all_overtime_ok}
        {$i.reporting_overtime_ok}
    {else}
        {$i.reporting_overtime_not_ok}
    {/if}
    {if !$all_set_ok}
        <br />{$i.reporting_set_not_ok}
    {/if}
    {if isset($view_overtime_details) && $view_overtime_details}
        <br /><small>{$i.reporting_overtime_pool_sh_ro}</small>
    {/if}
</p>
        
<!-- ------------------------------------- Überstunden ------------------------------------- -->

<table class="editablepop" style="margin-top: 3mm;">
    <tbody>
        <tr>
            {$sum=0}
            <th style="width:80mm;">{$i.reporting_overtime_upto}</th>
            {foreach item="overtime" from=$overtime_pool_upto}
                {$sum=$sum+$overtime->number}
                <td style="width:40mm; text-align:right;">{$overtime->name}</td>
                <td class="floatval" style="width:20mm; text-align:right;">{float_to_usnumber($overtime->number,2)}</td>
            {/foreach}
            <td style="width:40mm; text-align:right;">{$i.reporting_rep_x_total}</td>
            <td class="floatval" style="width:20mm; text-align:right;">{float_to_usnumber($sum,2)}</td>
        </tr>
    </tbody>
</table>
        

<span id="open_file_canvas_position_{$staff_uid}"></span>
<div id="staff_timeprotocol_graph_{$staff_uid}" style="width: 90%; min-width:550px; max-width:900px; height:330px; pd4ml-display:none;{if count($projects_list) === 0} display:none;{/if}"></div>
<p style="visibility: hidden; pd4ml-display:none;">.</p>
<p style="visibility: hidden; pd4ml-display:none;">.</p>