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);
예제 #2
0
$this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->params['subtitle'];
?>
<div class="season-ticket-view">
    <div class="box box-default">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="fa fa-list"></i>', ['index'], ['class' => 'btn btn-default btn-sm', 'title' => Ticket::t('ticket', 'List')]);
?>
                <?php 
echo Html::a('<i class="fa fa-pencil"></i>', ['update', 'id' => $model->id], ['class' => 'btn btn-success btn-sm', 'title' => Ticket::t('ticket', 'Update')]);
?>
                <?php 
echo Html::a('<i class="fa fa-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Ticket::t('ticket', 'Create')]);
?>
                <?php 
echo Html::a('<i class="fa fa-trash"></i>', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger btn-sm', 'title' => Ticket::t('ticket', 'Delete'), 'data-confirm' => Ticket::t('ticket', 'Are you sure to delete this item?'), 'data-method' => 'post']);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'title', 'description', 'cost', 'amount', ['attribute' => 'limit_format', 'value' => $model->getLimitFormatArray()[$model->limit_format]], 'limit_value']]);
?>

        </div>
    </div>
</div>

예제 #3
0
?>
<div class="<?php 
echo $gridId;
?>
">
    <div class="box box-default">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="fa fa-plus"></i>', ['create'], ['class' => 'btn btn-primary btn-sm', 'title' => Ticket::t('ticket', 'Create')]);
?>
                <?php 
echo Html::a('<i class="fa fa-trash"></i>', ['batch-delete'], ['class' => 'btn btn-danger btn-sm', 'id' => 'batch-delete', 'title' => Ticket::t('ticket', 'Delete selected')]);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>

            <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'id' => $gridId, 'filterModel' => $searchModel, 'columns' => [['class' => CheckboxColumn::classname()], 'title', 'description', 'cost', 'amount', 'limit_value', ['attribute' => 'limit_format', 'value' => function ($model) {
    return SeasonTicket::getLimitFormatArray()[$model->limit_format];
}, 'filter' => Html::activeDropDownList($searchModel, 'limit_format', SeasonTicket::getLimitFormatArray(), ['class' => 'form-control', 'prompt' => ''])], ['class' => 'yii\\grid\\ActionColumn', 'buttonOptions' => ['class' => 'btn btn-default btn-xs'], 'headerOptions' => ['style' => 'width:100px;'], 'header' => Ticket::t('ticket', 'Actions')]]]);
?>

        </div>
    </div>
</div>
예제 #4
0
<?php

use backend\modules\ticket\Ticket;
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model backend\modules\ticket\models\SeasonTicket */
$this->title = Ticket::t('ticket', 'Tickets');
$this->params['subtitle'] = Ticket::t('ticket', 'Create ticket');
$this->params['breadcrumbs'][] = ['label' => $this->title, 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->params['subtitle'];
?>
<div class="season-ticket-create">
    <div class="box box-primary">
        <div class="box-header">
            <div class="pull-right">
                <?php 
echo Html::a('<i class="fa fa-list"></i>', ['index'], ['class' => 'btn btn-default btn-sm', 'title' => Ticket::t('ticket', 'List')]);
?>
            </div>
        </div>
        <div class="box-body">
            <?php 
echo $this->render('_form', ['model' => $model]);
?>
        </div>
    </div>
</div>
 /**
  * @inheritdoc
  */
 public function attributeLabels()
 {
     return ['id' => Ticket::t('ticket', 'ID'), 'title' => Ticket::t('ticket', 'Title'), 'description' => Ticket::t('ticket', 'Description'), 'cost' => Ticket::t('ticket', 'Cost'), 'amount' => Ticket::t('ticket', 'Number of lessons'), 'limit_format' => Ticket::t('ticket', 'Limit - format'), 'limit_value' => Ticket::t('ticket', 'Limit - value')];
 }
예제 #6
0
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'limit_format')->textInput()->dropDownList($model->getLimitFormatArray())->hint(Ticket::t('ticket', 'Time limit - unit'));
?>

        </div>
    </div>
    <div class="row">
        <div class="col-sm-12">
            <?php 
echo $form->field($model, 'limit_value')->textInput()->hint(Ticket::t('ticket', 'Time limit - the number of such units'));
?>

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

</div>