<?php 

class modLotCompositionView {
  
  public function __construct(modLotComposition $lotComposition) {
    if (isset($lotComposition)) {
        
      $menu = new MainMenu('lotcomposition');
      $this->beforeMenu = $menu->before();
      $this->afterMenu  = $menu->after();

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

  $layout = "

  $this->beforeMenu

<div class='container'>	
  <div class='row'>
    <div class='col-md-12'>
      <label>Lot Definition</label>
      <table class='table table-bordered'>
        <tbody>
          <tr>
            <td style='width:15%;'>
    $this->lo_idKeyLayout
    $this->selLotNameLayout
            </td>
            <td style='width:15%;'> 
    $this->selLotTypeLayout
            </td>
            <td colspan='3' style='width:40%;'>
    $this->inpRationaleLayout
            </td>
            <td colspan='2' style='width:30%;'> 
    $this->selInterpretationLayout
            </td>
          </tr>
        </tbody>
      </table>    
      <table class='table table-bordered' style='width:85%;margin-top:15px;'>
        <tbody>
          <tr>
            <td style='width:15%;'>
    $this->lc_idKeyLayout
    $this->selLotMaterialLayout
            </td>
            <td style='width:15%;'> 
    $this->selLotColourLayout
            </td>
            <td style='width:15%;'>
    $this->selLotCompactionLayout
            </td>
            <td colspan='3' rowspan='7' style='width:40%;'>
    $this->addInclusionsLayout
            </td>
            <td rowspan='2' >
            </td>
          </tr>
          <tr>
            <td style='width:15%;'>
    $this->selLotTextureLayout
            </td>
            <td style='width:15%;'> 
    $this->selLotSphericityLayout
            </td>
            <td style='width:15%;'>
    $this->selLotRoundingLayout
            </td>
          </tr>    
          <tr>    
            <td colspan='3' rowspan='5'>
    $this->inpCompositionNoteLayout
            </td>
            <td>
    $this->putLotCompositionLayout
            </td>
          </tr>
        </tbody>
      </table>    
      <table class='table table-bordered' style='width:85%;margin-top:5px;''>
        <tbody>
          <tr>
            <td>
    $this->sumCompositionsLayout
            </td>
          </tr>
          <tr>
            <td>
    $this->delCompositionLayout
            </td>
          </tr>
        </tbody>
      </table>    
      <table class='table table-bordered' style='margin-top:15px;'>
        <tbody>
          <tr>
            <td style='width:85%;'>
     $this->inpParcelLotNoteLayout
           </td>
            <td style='width:15%;'>
     $this->putParcelLotLayout
           </td>
          </tr>
        </tbody>
      </table>    
      <table class='table table-bordered' style='margin-top:5px;'>
        <tbody>
          <tr>
            <td>
    $this->sumParcelLotsLayout
            </td>
          </tr>
          <tr>
            <td>
    $this->delParcelLotLayout
            </td>
          </tr>
        </tbody>
      </table>    
    </div>
  </div>    
</div>

  $this->afterMenu

<script>

$this->selLotNameScript
$this->selLotTypeScript
$this->inpRationaleScript
$this->selInterpretationScript
$this->addInclusionsScript
$this->sumLotCompositionsScript
$this->sumParcelLotsScript

</script>
    ";
	
    return $layout;
 
  }
}

?>