Пример #1
0
 /**
  * Returns Translations links for Create action
  * @param $model
  * @return array
  */
 public static function getCreateItems($model, $urlPrefix)
 {
     if ($model->source_id == -1) {
         return [['label' => strtoupper(\yii\fluent\models\Language::getDefault()->title), 'icon' => 'fa fa-language', 'url' => [$urlPrefix . '/create']]];
     } else {
         return TranslationsHelper::getUpdateItems($model, $urlPrefix);
     }
 }
Пример #2
0
<?php

use yii\helpers\Html;
use yii\fluent\modules\admin\Module;
/* @var $this yii\web\View */
/* @var $model \yii\fluent\models\Block */
$this->title = Module::t('main', 'Page') . " | " . Module::t('main', 'Create');
$this->params['breadcrumbs'][] = ['label' => Module::t('main', 'Pages'), 'url' => ['index']];
$this->params['breadcrumbs'][] = Module::t('main', 'Create');
$this->params['title'] = Module::t('main', 'Page');
$this->params['subtitle'] = Module::t('main', 'Create');
$this->params['actions'] = [['label' => Module::t('main', 'Manage'), 'icon' => 'fa fa-list', 'url' => ['index']]];
$this->params['translations'] = \yii\fluent\modules\admin\components\helpers\TranslationsHelper::getCreateItems($model, 'page');
?>

<?php 
echo $this->render('_form', ['model' => $model]);
Пример #3
0
<?php

use yii\helpers\Html;
use yii\fluent\modules\admin\Module;
use yii\fluent\modules\admin\components\helpers\TranslationsHelper;
/* @var $this yii\web\View */
/* @var $model \yii\fluent\models\Block */
$this->title = Module::t('main', 'Translation') . " | " . $model->message;
$this->params['breadcrumbs'][] = ['label' => Module::t('main', 'Translations'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->message, 'url' => ['update', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Module::t('main', 'Update');
$this->params['title'] = Module::t('main', 'Translation');
$this->params['subtitle'] = $model->message;
$this->params['actions'] = [['label' => Module::t('main', 'Manage'), 'icon' => 'fa fa-list', 'url' => ['index']], ['label' => Module::t('main', 'Create'), 'icon' => 'fa fa-pencil', 'url' => ['create']]];
$this->params['translations'] = TranslationsHelper::getUpdateItems($model, 'message');
?>

<?php 
echo $this->render('_form', ['model' => $model]);
Пример #4
0
<?php

use yii\helpers\Html;
use yii\fluent\modules\admin\Module;
use yii\fluent\modules\admin\components\helpers\TranslationsHelper;
/* @var $this yii\web\View */
/* @var $model \yii\fluent\models\Block */
$this->title = Module::t('main', 'User') . " | " . $model->name;
$this->params['breadcrumbs'][] = ['label' => Module::t('main', 'Blocks'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['update', 'id' => $model->id]];
$this->params['breadcrumbs'][] = Module::t('main', 'Update');
$this->params['title'] = Module::t('main', 'Block');
$this->params['subtitle'] = $model->name;
$this->params['actions'] = [['label' => Module::t('main', 'Manage'), 'icon' => 'fa fa-list', 'url' => ['index']], ['label' => Module::t('main', 'Create'), 'icon' => 'fa fa-pencil', 'url' => ['create']]];
$this->params['translations'] = TranslationsHelper::getUpdateItems($model, 'block');
?>

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