<?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]message")->widget(CKEditor::className(), ['name' => "TemplateLang[{$model->language}][message]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('email')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => $allowContentDuplication ? 'true' : 'false']]);
?>
    <?php 
if (isset($template->supported_tags) && trim($template->supported_tags) != '') {
    ?>
        <p style="margin-top: -10px;" class="help-block"><?php 
    echo Yii::t('infoweb/email', 'Tags');
    ?>
: <?php 
    echo $template->supported_tags;
    ?>
</p>
    <?php 
}
?>
</div>
コード例 #2
0
<?php

use yii\bootstrap\Tabs;
use kartik\icons\Icon;
use infoweb\cms\helpers\LanguageHelper;
// Add the language tabs
foreach (Yii::$app->params['languages'] as $languageId => $languageName) {
    $tabs[] = ['label' => $languageName . (Yii::$app->getModule('gallery')->allowContentDuplication ? Icon::show('exchange', ['class' => 'duplicateable-all-icon not-converted', 'data-language' => $languageId]) : ''), 'content' => $this->render('_default_language_tab', ['model' => $model->translate($languageId), 'form' => $form]), 'options' => ['class' => LanguageHelper::isRtl($languageId) ? 'rtl' : '']];
}
?>
<div class="tab-content default-tab">

    <?php 
echo Tabs::widget(['items' => $tabs, 'encodeLabels' => false]);
?>

</div>
コード例 #3
0
<?php

use yii\bootstrap\Tabs;
use kartik\icons\Icon;
use infoweb\cms\helpers\LanguageHelper;
$tabs = [];
// Add the language tabs
foreach (Yii::$app->params['languages'] as $languageId => $languageName) {
    $tabs[$languageId] = ['label' => $languageName . ($allowContentDuplication ? Icon::show('exchange', ['class' => 'duplicateable-all-icon not-converted', 'data-language' => $languageId]) : ''), 'content' => $this->render('_default_language_tab', ['model' => $model->getTranslation($languageId), 'alias' => $model->getTranslation($languageId)->alias, 'form' => $form, 'page' => $model, 'allowContentDuplication' => $allowContentDuplication]), 'active' => $languageId == Yii::$app->language ? true : false, 'options' => ['class' => LanguageHelper::isRtl($languageId) ? 'rtl' : '']];
}
?>
<div class="tab-content default-tab">
    <?php 
echo Tabs::widget(['items' => $tabs, 'encodeLabels' => false]);
?>
</div>
<?php

use mihaildev\ckeditor\CKEditor;
use infoweb\cms\helpers\LanguageHelper;
use yii\helpers\ArrayHelper;
?>
<div class="tab-content language-tab">

    <?php 
echo $form->field($model, "[{$model->language}]name")->textInput(['name' => "Lang[{$model->language}][name]"]);
?>

    <?php 
echo $form->field($model, "[{$model->language}]content")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][content]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : [])]);
?>

</div>
コード例 #5
0
<?php

use yii\bootstrap\Tabs;
use infoweb\cms\helpers\LanguageHelper;
$tabs = [];
// Add the language tabs
foreach (Yii::$app->params['languages'] as $languageId => $languageName) {
    $tabs[] = ['label' => $languageName, 'content' => $this->render('_default_language_tab', ['model' => $model->getTranslation($languageId), 'form' => $form]), 'active' => $languageId == Yii::$app->language ? true : false, 'options' => ['class' => LanguageHelper::isRtl($languageId) ? 'rtl' : '']];
}
?>
<div class="tab-content default-tab">
    <?php 
echo Tabs::widget(['items' => $tabs]);
?>
</div>
<?php

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content default-language-tab">
    <?php 
echo $form->field($model, "[{$model->language}]name")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][name]", 'data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']);
?>

    <?php 
if (Yii::$app->getModule('gallery')->enableDescription) {
    ?>
    <?php 
    echo $form->field($model, "[{$model->language}]description")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][description]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => Yii::$app->getModule('gallery')->allowContentDuplication ? 'true' : 'false']]);
    ?>
    <?php 
}
?>
</div>
<?php

use mihaildev\ckeditor\CKEditor;
use yii\helpers\ArrayHelper;
use infoweb\cms\helpers\LanguageHelper;
?>
<div class="tab-content language-tab">

    <?php 
echo $form->field($model, "[{$model->language}]title")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][title]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
?>

    <?php 
if (Yii::$app->getModule('partials')->enableUrl) {
    ?>
    <?php 
    echo $form->field($model, "[{$model->language}]url")->textInput(['maxlength' => 255, 'name' => "Lang[{$model->language}][url]", 'data-duplicateable' => var_export($allowContentDuplication, true)]);
    ?>
    <?php 
}
?>

    <?php 
echo $form->field($model, "[{$model->language}]content")->widget(CKEditor::className(), ['name' => "Lang[{$model->language}][content]", 'editorOptions' => ArrayHelper::merge(Yii::$app->getModule('cms')->getCKEditorOptions(), Yii::$app->getModule('partials')->ckEditorOptions, LanguageHelper::isRtl($model->language) ? ['contentsLangDirection' => 'rtl'] : []), 'options' => ['data-duplicateable' => var_export($allowContentDuplication, true)]]);
?>
</div>