<table class='table table-bordered datatable' data-fixed-left-width='200' data-fixed-right-width='200'>
  <thead>
    <tr>
      <th class='text-center'><?php echo $lang->my->company->dept;?></th>
      <th class='text-center'><?php echo $lang->my->company->account;?></th>
      <?php foreach($dateList as $currentDate):?>
      <?php if($currentDate == end($dateList)) continue;?>
      <th class='text-center flex-col' data-width='200'><?php echo date(DT_DATE1, $currentDate);?></th>
      <?php endforeach;?>
      <th class='text-center'><?php echo date(DT_DATE1, end($dateList));?></th>
    </tr>
  </thead>
  <?php foreach($dataList as $user => $efforts):?>
  <tr>
    <td class='text-center'><?php echo zget($deptList, $userDept[$user], ' ')?></td>
    <td class='text-center'><?php echo zget($users, $user)?></td>
    <?php foreach($dateList as $currentDate):?>
    <td>
      <?php foreach($efforts as $effort):?>
      <?php if($effort->date == date('Y-m-d', $currentDate)):?>
      <div class='text-nowrap text-ellipsis w-180px' title='<?php echo $effort->work?>'>
        <?php echo html::a($this->createLink('effort', 'view', "effortID={$effort->id}"), $effort->work, "data-toggle='modal' data-width='80%'")?>
      </div>
      <?php endif;?>
      <?php endforeach;?>
    </td>
    <?php endforeach;?>
  </tr>
  <?php endforeach;?>
</table>
