<?php
/* @var $this LocationController */
/* @var $model Location */

$this->breadcrumbs = array(
    yii::t('default', 'Reports') => array('/dashboard/Reports'),
    yii::t('default', 'Details For Person Tickets'),
);
?>

<?php
$form = $this->beginWidget('ext.bootstrap.widgets.TbActiveForm', array(
            'action' => Yii::app()->createUrl($this->route),
            'method' => 'get',
        ));


echo $form->labelEx($model, 'person');

$persons = array_values(Person::getArrayOfPersons());
array_push($persons, yii::t('default', 'All Persons'));
$form->widget('zii.widgets.jui.CJuiAutoComplete', array(
    'model' => $model,
    'attribute' => 'person',
    'source' => $persons,
    'options' => array(
        'minLength' => '0',
    ),));

echo "<br />";
echo Yii::t('default', 'From Date');
echo "<br />";
Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker', array(
    'model' => $model,
    'attribute' => 'from_date',
    'mode' => 'date', //use "time","date" or "datetime" (default)
    'language' => '',
    'options' => array(
        'dateFormat' => 'yy-mm-dd',
        'showAnim' => 'fold',
        'changeMonth' => true,
        'changeYear' => true,
        'yearRange' => 'c-30:c+5',
    )
));

echo "<br />";
echo Yii::t('default', 'To Date');
echo "<br />";
Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker', array(
    'model' => $model,
    'attribute' => 'to_date',
    'mode' => 'date', //use "time","date" or "datetime" (default)
    'language' => '',
    'options' => array(
        'dateFormat' => 'yy-mm-dd',
        'showAnim' => 'fold',
        'changeMonth' => true,
        'changeYear' => true,
        'yearRange' => 'c-30:c+5',
    )
)); ?>
<div class="actions">
    <?php echo CHtml::submitButton(Yii::t('default', 'Go'), array('class' => 'btn primary')); ?>
    &ensp;
    <?php echo CHtml::submitButton(Yii::t('default', 'Export'), array('name' => 'export', 'class' => 'btn primary')); ?>
</div>
<?php $this->endWidget(); ?>
    <!-- search-form -->







<?php
    $this->widget('ext.bootstrap.widgets.TbGridView', array(
        'id' => 'VReportTicketSummaryForDepartment-grid',
        'type' => 'striped',
        'dataProvider' => $model->search($is_empty),
        'type' => 'striped',
        'filter' => $model,
        'columns' => array(
            'person',
            'department',
            'accounting_unit',
            'activity_code',
            'user_name',
            'pos',
            'id',
            'badge',
            'schedule',
            'date_time',
            'cancelled',
        ),
    ));
?>
