{extends "reports/reports_base.tpl.html"}
{block "title"}{t}Workload by Time Period{/t}{/block}

{block "report_content"}
{if $type == 'email'}
    <h3 align="center">{t}Email Workload by Time of day{/t}</h3>
    <p align="center" width="80%">{t}Based on all issues recorded in Eventum since start to present.{/t}</p>
{else}
    <h3 align="center">{t}Workload by Time of day{/t}</h3>
    <p align="center" width="80%">{t}Based on all issues recorded in Eventum since start to present.{/t}<br />
        {t}Actions are any event that shows up in the history of an issue, such as a user or a developer updating an issue, uploading a file, sending an email, etc.{/t}
    </p>
{/if}
<div align="center">
<img src="graph.php?graph=workload_time_period&type={$type}">
</div>
<br />
      <table class="bordered grid">
        <tr>
          <th>
            {t}Time Period{/t}<br />
            {t}(GMT){/t}
          </th>
          <th>
            {if $type == "email"}{t}Developer Emails{/t}{else}{t}Developer Actions{/t}{/if}
          </th>
          <th>
            {if $type == "email"}{t}Customer Emails{/t}{else}{t}Customer Actions{/t}{/if}
          </th>
          <th>
            {t}Time Period{/t}<br />
            ({$user_tz})
          </th>
        </tr>
        {section name="workload" loop=$data}
        <tr class="{cycle values='odd,even'}">
          <td align="center">{$data[workload].display_time_gmt}</td>
          <td align="center">
              {if $data[workload].developer.rank|default:'' == 1}<b>{/if}
              {if $data[workload].developer.count|default:'' != ''}{$data[workload].developer.count} ({$data[workload].developer.percentage|round}%){/if}
              {if $data[workload].developer.rank|default:'' == 1}</b>{/if}
          </td>
          <td align="center">
              {if $data[workload].customer.rank|default:'' == 1}<b>{/if}
              {if $data[workload].customer.count|default:''}{$data[workload].customer.count} ({$data[workload].customer.percentage|round}%){/if}
              {if $data[workload].customer.rank|default:'' == 1}</b>{/if}
          </td>
          <td align="center">{$data[workload].display_time_user}</td>
        </tr>
        {/section}
      </table>
<br />
{/block}
