<?php

/* @var $this DepartmentController */
/* @var $model Department */

$this->breadcrumbs = array(
    yii::t('default', 'Organization') => array('/dashboard/organization'),
    Yii::t('default', 'Departments') => array('index'),
    $model->name,
);
$this->widget('bootstrap.widgets.TbAlert');


$this->widget('ext.bootstrap.widgets.TbDetailView', array(
    'type' => 'striped',
    'cssFile' => Yii::app()->request->baseUrl . '/css/general/CDetailView/' . Yii::app()->language . '/styles.css',
    'data' => $model,
    'attributes' => array(
        'name',
        'accounting_unit',
        'activity_code',
        array(
            'type' => 'raw',
            'name' => 'location_id',
            'value' => Yii::app()->user->checkAccess('Facility Admin')?$model->location->code : CHtml::link($model->location->code, array('location/view', 'id' => $model->location_id))
        ),
        array(
            'name' => 'status',
            'value' => Yii::t('default', $model->status),
        ),
    ),
));
?>
<br />
<?php echo CHtml::link(Yii::t('default', 'Back'), array('index'), array('class' => 'btn primary')); ?>

