public function run() { $this->registerJs(); Html::addCssClass($this->options, 'ui accordion'); if ($this->styled) { Html::addCssClass($this->options, self::TYPE_STYLED); } if ($this->fluid) { Html::addCssClass($this->options, self::TYPE_FLUID); } if ($this->vertical) { Html::addCssClass($this->options, self::TYPE_VERTICAL); } if ($this->inverted) { Html::addCssClass($this->options, self::TYPE_INVERTED); echo Elements::segment(Html::tag('div', $this->renderItems(), $this->options), ['class' => self::TYPE_INVERTED]); } else { echo Html::tag('div', $this->renderItems(), $this->options); } }
use yii\web\View; use Zelenin\yii\modules\I18n\models\SourceMessage; use Zelenin\yii\modules\I18n\Module; use Zelenin\yii\SemanticUI\collections\Breadcrumb; use Zelenin\yii\SemanticUI\Elements; use Zelenin\yii\SemanticUI\widgets\ActiveForm; $this->title = Module::t('Update') . ': ' . $model->message; echo Breadcrumb::widget(['links' => [['label' => Module::t('Translations'), 'url' => ['index']], ['label' => $this->title]]]); ?> <div class="message-update"> <div class="message-form"> <?php echo Elements::header(Module::t('Source message'), ['class' => 'top attached']); ?> <?php echo Elements::segment(Html::encode($model->message), ['class' => 'bottom attached']); ?> <?php $form = ActiveForm::begin(); ?> <div class="field"> <div class="ui grid"> <?php foreach ($model->messages as $language => $message) { ?> <div class="four wide column"> <?php echo $form->field($model->messages[$language], '[' . $language . ']translation')->label($language); ?> </div> <?php