Ejemplo n.º 1
0
echo Html::activeHiddenInput($model, 'parent');
?>
    <?php 
echo $form->field($model, 'cm_id')->dropDownList(ArrayHelper::map(Cm::find()->all(), 'id', 'name'), ['prompt' => Yii::t('app', 'Please select content model')])->hint(Yii::t('app', 'When selected ,can not modify'));
?>

    <?php 
echo $form->field($model, 'parent_txt')->textInput(['placeHolder' => Yii::t('app', 'Please input Node id or Node name to select') . Yii::t('app', 'When selected ,can not modify')]);
?>

    <?php 
echo $form->field($model, 'slug')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'workflow')->dropDownList(ArrayHelper::map(Workflow::find()->all(), 'id', 'name'), ['prompt' => Yii::t('app', 'Please select workflow')]);
?>

    <?php 
echo $form->field($model, 'tpl_index')->textInput(['maxlength' => true])->hint(Yii::t('app', 'Please fill the template name relative the site template,no need file extension'));
?>

    <?php 
echo $form->field($model, 'tpl_detail')->textInput(['maxlength' => true])->hint(Yii::t('app', 'Please fill the template name relative the site template,no need file extension'));
?>

    <?php 
//$form->field($model, 'status')->textInput()
?>

    <?php 
Ejemplo n.º 2
0
 /**
  * Finds the Workflow model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Workflow the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Workflow::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Ejemplo n.º 3
0
    return Html::a('<span class="fa fa-list-ol"></span>', ['list', 'wf_id' => $model->id], ['title' => Yii::t('app', 'View step list'), 'data-pjax' => '1']);
}], 'template' => '{update} {list} {delete}']]]);
?>
            </div>
        </div>
</div>

<div id="work-state">
    <div class="panel panel-info">
        <div class="panel-heading">
            <?php 
echo Yii::t('app', 'Workflow States');
?>
        </div>
        <div class="panel-body">
            <?php 
echo GridView::widget(['dataProvider' => $dataProvider2, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'name', 'val', ['attribute' => 'is_inner', 'value' => function ($model) {
    $is_inner = Workflow::IS_INNER();
    return $is_inner[$model->is_inner];
}], ['class' => 'yii\\grid\\ActionColumn', 'buttons' => ['update' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-pencil"></span>', ['state-update', 'id' => $model->id], ['data-pjax' => 1, 'title' => Yii::t('app', 'Update')]);
}, 'delete' => function ($url, $model, $key) {
    return Html::a('<span class="glyphicon glyphicon-trash"></span>', ['state-delete', 'id' => $model->id], ['data-pjax' => 1, 'title' => Yii::t('app', 'Delete'), 'data-method' => 'post', 'data-confirm' => Yii::t('app', 'Are you sure you want to delete this item?')]);
}], 'template' => '{update} {delete}']]]);
?>
        </div>

    </div>

</div>
Ejemplo n.º 4
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getWf()
 {
     return $this->hasOne(Workflow::className(), ['id' => 'wf_id']);
 }