<?php 

defined('PUBLIC_ACCESS') or die('Restricted Access');

class modOfficeTimesheetView {
   
  // Initialize controls using data from the model. 
  public function __construct(modOfficeTimesheet $officeTimesheet) {
    if (isset($officeTimesheet)) {

      $menu = new MainMenu('officetimesheet');
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();

      $controlsControls = new EntryInit('officetimesheet');
      $entryInit = $controlsControls->get("entryInit");
      foreach ($entryInit as $control) {
//print_r ($control);
//print_r ("<br>");        
        eval ($control);
      }
    }
  }
  
  public function output() {

    $layout = "

   $this->beforeMenu

<div style='border:1px solid black;'>  
  <div class='container'>
    <div class='row'>
      <div class='col-sm-12'>
        <table class='table table-condensed'>
          <tr>
            <td colspan='2'>
    $this->ptr_idKeyLayout
    $this->selWorkdayLayout
            </td>
            <td style='vertical-align:middle;'>
    $this->chkAwayFromWorkLayout
            </td>
            <td colspan='4'>
            </td>
          </tr>
          <tr>
          <tr>
            <td colspan='2'>
    $this->livProjectSearchLayout
            </td>
            <td colspan='2'>
    $this->selProjectParcelLayout
            </td>
            <td>
    $this->selProjectRoleLayout
            </td>
            <td colspan='2'>
            </td>
          </tr>
          <tr>
            <td>
    $this->selStartTimeLayout
            </td>
            <td>
    $this->selEndTimeLayout
            </td>
            <td>
    $this->selBreakDurLayout
            </td>
            <td>
    $this->selDurationLayout
            </td>
            <td style='vertical-align:middle;text-align: center;'>
    $this->chkBillableTimeLayout
            </td>
            <td>
    $this->inpStatusRationaleLayout
            </td>
            <td>
            </td>
          </tr>
          <tr>
            <td colspan='6'>
    $this->inpOfficeNoteLayout
            </td>
            <td>
    $this->putpwpersonnelLayout
            </td>
          </tr>
        </table>
      </div>
    </div>  
    <div class='row'>
      <div class='col-sm-12'>
      $this->sumTimesheetLayout
      $this->delpwpersonnelLayout
      </div>
    </div>  
  </div>
</div>  

   $this->afterMenu

<script>

$this->chkAwayFromWorkScript
$this->chkBillableTimeScript
$this->selStartTimeScript
$this->selEndTimeScript
$this->selBreakDurScript
$this->selDurationScript
$this->livProjectSearchScript
$this->selProjectParcelScript
$this->selProjectRoleScript
$this->sumTimesheetScript
$this->selWorkdayScript
  
</script>
  ";
 
  return $layout;
  }	

}

?>