<?php /** * Update Task View * * @var yii\web\View $this * @var webtoolsnz\scheduler\models\SchedulerTask $model */ use yii\helpers\Html; use webtoolsnz\scheduler\models\SchedulerTask; use yii\bootstrap\Tabs; use yii\bootstrap\ActiveForm; use webtoolsnz\widgets\RadioButtonGroup; use yii\grid\GridView; $this->title = $model->__toString(); $this->params['breadcrumbs'][] = ['label' => SchedulerTask::label(2), 'url' => ['index']]; $this->params['breadcrumbs'][] = $model->__toString(); ?> <div class="task-update"> <h1><?php echo $this->title; ?> </h1> <?php $this->beginBlock('main'); ?> <?php $form = ActiveForm::begin(['id' => $model->formName(), 'layout' => 'horizontal', 'enableClientValidation' => false]); ?>
<?php /** * Index View for scheduled tasks * * @var \yii\web\View $this * @var \yii\data\ActiveDataProvider $dataProvider * @var \webtoolsnz\scheduler\models\SchedulerTask $model */ use yii\helpers\Html; use yii\helpers\Url; use yii\grid\GridView; $this->title = \webtoolsnz\scheduler\models\SchedulerTask::label(2); $this->params['breadcrumbs'][] = $this->title; ?> <div class="scheduler-index"> <h1><?php echo $this->title; ?> </h1> <div class="table-responsive"> <?php \yii\widgets\Pjax::begin(); ?> <?php echo GridView::widget(['layout' => '{summary}{pager}{items}{pager}', 'dataProvider' => $dataProvider, 'pager' => ['class' => yii\widgets\LinkPager::className(), 'firstPageLabel' => Yii::t('app', 'First'), 'lastPageLabel' => Yii::t('app', 'Last')], 'columns' => [['attribute' => 'name', 'format' => 'raw', 'value' => function ($t) { return Html::a($t->name, ['update', 'id' => $t->id]); }], 'name', 'description', 'schedule', 'status']]);