示例#1
0
<?php

/**
 * @link https://github.com/roboapp
 * @copyright Copyright (c) 2016 Roboapp
 * @license [MIT License](https://opensource.org/licenses/MIT)
 */
/* @var $model roboapp\language\models\Language */
use roboapp\language\Module;
$this->title = Module::t('Create language');
echo $this->render('_menu');
echo $this->render('_form', ['model' => $model]);
示例#2
0
>
        <a href="<?php 
echo Url::to(['/admin/' . $module]);
?>
">
            <?php 
if ($action === 'edit') {
    ?>
                <i class="glyphicon glyphicon-chevron-left font-12"></i>
            <?php 
}
?>
            <?php 
echo Module::t('List');
?>
        </a>
    </li>
    <li <?php 
echo $action === 'create' ? 'class="active"' : '';
?>
>
        <a href="<?php 
echo Url::to(['/admin/' . $module . '/admin/create']);
?>
"><?php 
echo Module::t('Create');
?>
</a>
    </li>
</ul>
<br/>
示例#3
0
 /** @inheritdoc */
 public function attributeLabels()
 {
     return ['alias' => Module::t('Alias'), 'local' => Module::t('Local'), 'created_at' => Module::t('Create'), 'updated_at' => Module::t('Update')];
 }
示例#4
0
<?php

/**
 * @link https://github.com/roboapp
 * @copyright Copyright (c) 2016 Roboapp
 * @license [MIT License](https://opensource.org/licenses/MIT)
 */
/* @var $this yii\web\View */
/* @var $model roboapp\language\models\Language */
use roboapp\language\Module;
use yii\helpers\Html;
use yii\widgets\ActiveForm;
$form = ActiveForm::begin(['enableAjaxValidation' => true, 'options' => ['class' => 'model-form']]);
?>

<?php 
echo $form->field($model, 'alias');
echo $form->field($model, 'local')->textarea();
?>

<?php 
echo Html::submitButton(Module::t('Save'), ['class' => 'btn btn-primary']);
ActiveForm::end();
示例#5
0
                    <?php 
        echo $item->local;
        ?>
                </td>
                <td>
                    <a href="<?php 
        echo Url::to(['/admin/' . $module->id . '/admin/delete', 'id' => $item->primaryKey]);
        ?>
"
                       class="glyphicon glyphicon-remove confirm-delete"
                       title="<?php 
        echo Module::t('Delete item');
        ?>
"></a>
                </td>
            </tr>
        <?php 
    }
    ?>
        </tbody>
    </table>
    <?php 
    echo yii\widgets\LinkPager::widget(['pagination' => $data->pagination]);
} else {
    ?>
    <p><?php 
    echo Module::t('No records found');
    ?>
</p>
<?php 
}
示例#6
0
 public function actions()
 {
     return ['index' => ['class' => Index::class, 'searchModel' => Language::class, 'nameVariableDataProvider' => 'data'], 'create' => ['class' => Create::class, 'newModel' => Language::class, 'successMessage' => Module::t('Language is create.'), 'redirectTo' => function (Language $model) {
         return Url::to(['edit', 'id' => $model->id]);
     }], 'edit' => ['class' => Update::class, 'findModel' => [$this, 'findModel'], 'view' => 'edit', 'successMessage' => Module::t('Language saved.')], 'delete' => ['class' => Delete::class, 'findModel' => [$this, 'findModel'], 'successMessage' => Module::t('Language deleted.'), 'redirectTo' => ['index']]];
 }