<?php
/* @var $this PosController */
/* @var $model Pos */

$this->breadcrumbs = array(
    yii::t('default', 'POS') => array('/dashboard/poss'),
    yii::t('default', 'POSs') => array('index'),
    $model->name,
);

$this->widget('bootstrap.widgets.TbAlert');
?>


<?php
$this->widget('ext.bootstrap.widgets.TbDetailView', array(
    'type' => 'striped',
    'cssFile' => Yii::app()->request->baseUrl . '/css/general/CDetailView/' . Yii::app()->language . '/styles.css',
    'data' => $model->with('posSchedules'),
    'attributes' => array(
        'name',
        array(
            'type' => 'raw',
            'name' => Yii::t('default', 'Location Name'),
            'value'=>CHtml::link($model->location->code, array('location/view', 'id' => $model->location_id))
        ),
        'installation_date',
        array(
            'type' => 'raw',
            'name' => 'user_id',
            'value'=>$model->user->getIdentifier(),
        ),
        'description',
        'mac_address',
        array(
            'name' => 'status',
            'value' => Yii::t('default', $model->status),
        ),
        array(
            'type' => 'raw',
            'name' => yii::t("default", 'Schedules'),
            // ToDO : update link url and parameter after doing Pos Schedules Assign 
            'value'=>CHtml::link(yii::t("default", 'Manage'), array('/posSchedule/create','posId'=>$model->id)).$model->getAllSchedules()
        ),
    ),
)); ?>
<br />
<?php echo CHtml::link(Yii::t('default', 'Back'), array('index'), array('class' => 'btn primary')); ?>
