<?php

use yii\helpers\Html;
use common\widgets\GridView;

/* @var $this yii\web\View */
/* @var $searchModel frontend\models\ActivitiesSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */

$this->title = 'All Absences';
$this->params['breadcrumbs'][] = $this->title;

?>
<div class="activities-index">

    <?= GridView::widget([
        'title' => $this->title,
        'search' => $this->render('_search', ['model' => $searchModel]), 
        'dataProvider' => $AllabsenceDataProvider,
        'filterModel' => $searchModel,
        'columns' => [

            //'id',
           	'jobstatus',
               [
                'attribute' => 'welder',
                'format' => 'raw',
                'value' => function($model){
                    $welders = explode(',', $model->welder);
                    $out = '<ul class="list-unstyled">';
                        foreach($welders as $welder) {
                        $out .= '<li>'.$welder.'</li>';
                        }
                        $out .= '</ul>';
                    return $out;
                }
            ],
            'shiftlength',
                     
               //'user.username',
 			//'travelstarttime',
            //'starttime',
            'sdate',
            'edate',
            
            //'finishtime',
            // 'travelfinishtime',
            // 'shiftlength',
            // 'assistant',
            // 'contact',
            // 'contactno',
            // 'createdby',
            // 'createdon',
            // 'noofwelds',
            // 'contactemail:email',
            // 'date',
            // 'noofshifts',
            // 'attachments',

            ['class' => 'common\widgets\ActionColumn'],
        ],
    ]); ?>

</div>
