<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use app\modules\category\Module; ?> <h1><?php print Module::t("admin", "New category"); ?> </h1> <div class="form width_450"> <?php $form = ActiveForm::begin(['id' => 'category-form', 'options' => ['class' => 'form-horizontal']]); ?> <?php echo $form->field($model, 'machine_name'); ?> <?php echo $form->field($model, 'caption'); ?> <div class="form-group"> <div class="col-lg-offset-1 col-lg-11"> <?php echo Html::submitButton('Save', ['class' => 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end();
<td><?php print $model->getAttribute("caption"); ?> </td> <td> <a class="btn btn-mini btn-primary" type="button" href="/category/admin/form/<?php print $id; ?> "> <i class="glyphicon glyphicon-edit"></i> </a> <a class="btn btn-mini btn-warning confirmable" type="button" data-confirm="<?php print Module::t("admin", "confirm_delete_entity"); ?> " href="/category/admin/delete/<?php print $id; ?> " > <i class="glyphicon glyphicon-trash"></i> </a> </td> </tr> <?php } ?>
public function attributeLabels() { return ['machine_name' => Module::t("entity", "machine_name"), 'caption' => Module::t("entity", "caption")]; }
public function exportMenu() { return ['admin' => [['label' => Module::t('admin', "Categories"), 'url' => ['/category/admin']]]]; }