$this->title = Module::t('eugenekei-news', 'News');
$this->params['subtitle'] = Module::t('eugenekei-news', 'Update News');
$this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->params['subtitle'];
?>
<div class="news-create">
    <div class="box box-success">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="glyphicon glyphicon-list"></i>', ['index'], ['class' => 'btn btn-default btn-sm', 'title' => Module::t('eugenekei-news', 'List')]);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-eye-open"></i>', ['view', 'id' => $model->id], ['class' => 'btn btn-default btn-sm', 'title' => Module::t('eugenekei-news', 'View')]);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Module::t('eugenekei-news', 'Create')]);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-trash"></i>', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger btn-sm', 'title' => Module::t('eugenekei-news', 'Delete'), 'data-confirm' => Module::t('eugenekei-news', 'Are you sure to delete this item?'), 'data-method' => 'post']);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
echo $this->render('_form', ['model' => $model, 'box' => $box]);
?>
        </div>
    </div>
</div>
예제 #2
0
    <div class="box box-default">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="glyphicon glyphicon-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Module::t('eugenekei-news', 'Create')]);
?>
                <?php 
echo Html::a('<i class="glyphicon glyphicon-trash"></i>', ['batch-delete'], ['class' => 'btn btn-danger btn-sm', 'id' => 'batch-delete', 'title' => Module::t('eugenekei-news', 'Delete selected')]);
?>
            </div>
        </div>
        <div class="box-body">

            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => $gridId, 'options' => ['class' => 'table-responsive'], 'filterModel' => $searchModel, 'columns' => [['class' => CheckboxColumn::classname()], 'title', ['attribute' => 'status', 'value' => function ($model) {
    return $model->getStatusArray()[$model->status];
}, 'filter' => Html::activeDropDownList($searchModel, 'status', $statusArray, ['class' => 'form-control', 'prompt' => ''])], ['attribute' => 'created_at', 'format' => 'datetime', 'filter' => DateRangePicker::widget(['model' => $searchModel, 'attribute' => 'created_at', 'convertFormat' => true, 'presetDropdown' => true, 'options' => ['class' => 'form-control'], 'pluginOptions' => ['format' => 'Y-m-d H:i:s', 'dateLimit' => ['months' => 6], 'opens' => 'left']])], ['attribute' => 'user_id', 'value' => function ($model) {
    $authorModel = Yii::$app->controller->module->authorModel;
    $authorNameField = Yii::$app->controller->module->authorNameField;
    return $model->{$authorModel}->{$authorNameField};
}], ['class' => 'yii\\grid\\ActionColumn', 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'headerOptions' => ['style' => 'width:95px;'], 'header' => Module::t('eugenekei-news', 'Actions')]]]);
?>

        </div>
    </div>
</div>
use backend\modules\timetable\Module as Timetable;
use backend\modules\employment\Employment;
use backend\modules\pay\Pay;
use backend\modules\ticket\Ticket;
use backend\modules\statistics\Statistics;
if (!isset(Yii::$app->i18n->translations['rbac-admin'])) {
    Yii::$app->i18n->translations['rbac-admin'] = ['class' => 'yii\\i18n\\PhpMessageSource', 'sourceLanguage' => 'en', 'basePath' => '@mdm/admin/messages'];
}
$controllerPath = '';
$moduleId = '';
if (Yii::$app->controller->module->id) {
    $controllerPath = '/' . Yii::$app->controller->module->id;
    $moduleId = Yii::$app->controller->module->id;
}
$controllerPath .= '/' . Yii::$app->controller->id;
?>
<aside class="main-sidebar">

    <section class="sidebar">
        <?php 
echo Nav::widget(['id' => 'adminlte-sidebar-menu', 'encodeLabels' => false, 'options' => ['class' => 'sidebar-menu'], 'activateItems' => true, 'activateParents' => true, 'items' => [['label' => Config::t('configuration', 'Configuration'), 'url' => ['/config/default/index'], 'visible' => Yii::$app->user->can('/config/*'), 'icon' => Config::getIcon()], ['label' => User::t('user-admin', 'Users'), 'url' => ['/user/default/index'], 'visible' => Yii::$app->user->can('/user/*'), 'icon' => User::getIcon()], ['label' => Group::t('group-admin', 'Groups'), 'url' => ['/group/default/index'], 'visible' => Yii::$app->user->can('/group/*'), 'icon' => Group::getIcon()], ['label' => Timetable::t('timetable-admin', 'Timetable'), 'url' => ['/timetable/default/index'], 'visible' => Yii::$app->user->can('/timetable/*'), 'icon' => Timetable::getIcon()], ['label' => Ticket::t('ticket', 'Tickets'), 'url' => ['/ticket/default/index'], 'visible' => Yii::$app->user->can('/ticket/*'), 'icon' => Ticket::getIcon()], ['label' => Pay::t('pay-admin', 'Pays'), 'url' => ['/pay/default/index'], 'visible' => Yii::$app->user->can('/pay/*'), 'icon' => Pay::getIcon()], ['label' => Employment::t('employment', 'Paid employments'), 'url' => ['/employment/default/index'], 'visible' => Yii::$app->user->can('/employment/*'), 'icon' => Employment::getIcon()], ['label' => News::t('eugenekei-news', 'News'), 'url' => ['/news/admin/index'], 'visible' => Yii::$app->user->can('/news/admin/*'), 'icon' => News::getIcon(), 'active' => $moduleId === 'news'], ['label' => Statistics::t('statistics', 'Statistics'), 'url' => ['/statistics/default/index'], 'visible' => Yii::$app->user->can('/statistics/*'), 'icon' => Statistics::getIcon()], ['label' => Yii::t('rbac-admin', 'Assignments'), 'url' => ['/rbac'], 'icon' => 'fa-legal', 'visible' => Yii::$app->user->can('/rbac/*'), 'active' => $moduleId === 'rbac', 'items' => [['label' => Yii::t('rbac-admin', 'Assignments'), 'url' => ['/rbac/assignment/index'], 'active' => $controllerPath === '/rbac/assignment'], ['label' => Yii::t('rbac-admin', 'Permissions'), 'url' => ['/rbac/permission/index'], 'active' => $controllerPath === '/rbac/permission'], ['label' => Yii::t('rbac-admin', 'Roles'), 'url' => ['/rbac/role/index'], 'active' => $controllerPath === '/rbac/role'], ['label' => Yii::t('rbac-admin', 'Routes'), 'url' => ['/rbac/route/index'], 'active' => $controllerPath === '/rbac/route'], ['label' => Yii::t('rbac-admin', 'Rules'), 'url' => ['/rbac/rule/index'], 'active' => $controllerPath === '/rbac/rule']]]]]);
?>



    </section>

</aside>

<?php 
//print_r(Yii::$app->i18n->translations);
<?php

use yii\helpers\Html;
use eugenekei\news\Module;
/* @var $this yii\web\View */
/* @var $model eugenekei\news\models\News */
$box = '';
$this->title = Module::t('eugenekei-news', 'News');
$this->params['subtitle'] = Module::t('eugenekei-news', 'Create');
$this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->params['subtitle'];
?>
<div class="news-create">
    <div class="box box-primary">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="glyphicon glyphicon-list"></i>', ['index'], ['class' => 'btn btn-default btn-sm', 'title' => Module::t('eugenekei-news', 'List')]);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
echo $this->render('_form', ['model' => $model]);
?>

        </div>
    </div>
</div>
예제 #5
0
    <?php 
// echo $form->field($model, 'status')
?>

    <?php 
// echo $form->field($model, 'created_at')
?>

    <?php 
// echo $form->field($model, 'updated_at')
?>

    <?php 
// echo $form->field($model, 'user_id')
?>

    <div class="form-group">
        <?php 
echo Html::submitButton(Module::t('eugenekei-news', 'Search'), ['class' => 'btn btn-primary']);
?>
        <?php 
echo Html::resetButton(Module::t('eugenekei-news', 'Reset'), ['class' => 'btn btn-default']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
</div>
예제 #6
0
        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'content')->widget(Imperavi::className(), ['id' => 'imperavi-widget-content', 'settings' => ['lang' => 'ru', 'minHeight' => 200, 'maxHeight' => 400, 'imageManagerJson' => Url::to(['admin/images-get']), 'imageUpload' => Url::to(['admin/image-upload']), 'imageDelete' => Url::to(['admin/image-delete']), 'plugins' => $imperaviPlugins]]);
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'status')->dropDownList($model->getStatusArray());
?>

        </div>
    </div>
    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? Module::t('eugenekei-news', 'Create') : Module::t('eugenekei-news', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-primary btn-large' : 'btn btn-success btn-large']);
?>
    </div>

    <?php 
ActiveForm::end();
?>

</div>