<?php

$this->breadcrumbs=array(
    'Plate Auth Insert Profiles'=>array('index'),
    $model->id,
);

$menu=array(
    array('label'=>'Create PlateAuthInsertProfile','url'=>array('create'),'auth'=>'plateauthinsertprofile_create'),
    array('label'=>'Update PlateAuthInsertProfile','url'=>array('update','id'=>$model->id),'auth'=>'plateauthinsertprofile_update'),
    array('label'=>'Delete PlateAuthInsertProfile','url'=>'#','linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?'),'auth'=>'plateauthinsertprofile_delete'),
    array('label'=>'Manage PlateAuthInsertProfile','url'=>array('admin'),'auth'=>'plateauthinsertprofile_management'),
);
?>

<h1>
  View PlateAuthInsertProfile #
  <?php echo $model->id; ?>
</h1>



<?php 

$this->printMenu('Operations', $menu);

$this->widget('bootstrap.widgets.TbDetailView',array(
    'data'=>$model,
    'attributes'=>array(
        'id',
		'name',
        'description',
        'epoch',
		'list_code',
	),
)); ?>


<h3>Fields</h3>

<?php if(is_array_ex($fields)) { ?>

<table class="table table.condensed">
  <thead>
    <tr>
      <th>#</th>
      <th>C</th>
      <th>Group</th>
      <th>Name</th>
      <th>Type</th>
      <th>Label</th>
      <!--<th>Description</th>-->
      <th><span class="icon-exclamation" title="Required"></span></th>
      <th><span class="icon-eye-open" title="Visible"></span></th>
      <th><span class="icon-pencil" title="Editable"></span></th>
      <th>Default</th>
      <th>Values</th>
    </tr>
  </thead>
  <tbody>
    <?php 
    foreach($fields as $field) if($field instanceof PlateAuthInsertProfileField)
    {
      ?>
    <tr>
      <td><?php echo $field->order; ?>
      </td>
      <td><?php echo $field->column; ?>
      </td>
      <td><?php echo $field->group; ?>
      </td>
      <td><?php echo $field->name; ?>
      </td>
      <td><?php echo $field->type; ?>
      </td>
      <td><?php echo $field->label; ?>
      </td>
      <!--<td><?php /*echo CHtml::textArea("{$field_id}[description]", $field->description, array('class'=>'monospace');*/ ?>
      </td>-->
      <td><?php echo $field->required ? '<span class="icon-check" title="TRUE"></span>' : '<span class="icon-check-empty" title="FALSE"></span>'; ?>
      </td>
      <td><?php echo $field->visible ? '<span class="icon-check" title="TRUE"></span>' : '<span class="icon-check-empty" title="FALSE"></span>'; ?>
      </td>
      <td><?php echo $field->editable ? '<span class="icon-check" title="TRUE"></span>' : '<span class="icon-check-empty" title="FALSE"></span>'; ?>
      </td>
      <td><?php echo $field->default; ?>
      </td>
      <td><?php
      echo $field->values;
      //echo is_array_ex($field->valuesArray, true) ? CHtml::listBox('values', $field->defaultVar, $field->valuesArray) : '';
      ?>
      </td>
    </tr>
    <?php } ?>
  </tbody>
</table>

<?php } else { 
  echo("<b><center>Fields not found!</center></b>");
}?>
