Example #1
0
<?php

use yii\helpers\Html;
use yii\grid\GridView;
use frontend\assets\AdminAsset;
$this->registerJsFile('/js/custom/switch-banner.js', ['depends' => AdminAsset::className()]);
$this->title = 'Баннеры';
$this->params['breadcrumbs'][] = $this->title;
?>
<div id="content">
    <div class="outer">
        <div class="inner bg-light lter">
            <div id="collapse4" class="body">
                <!--Begin Datatables-->
                <div class="image-index">

                    <h1><?php 
echo Html::encode($this->title);
?>
</h1>


                    <p>
                        <?php 
echo Html::a('Загрузить баннер(ы)', ['/banner/default/upload'], ['class' => 'btn btn-success']);
?>
                    </p>
              

                    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => ['name', ['attribute' => 'name', 'format' => 'html', 'value' => function ($dataProvider) {
Example #2
0
<?php

use yii\helpers\Html;
use frontend\assets\AdminAsset;
use yii\helpers\Url;
AdminAsset::register($this);
$this->beginPage();
?>
<!doctype html>
<html>
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <?php 
echo Html::csrfMetaTags();
?>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Colfans | 后台管理</title>

    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="<?php 
echo Yii::getAlias('@img');
?>
Example #3
0
<?php

use frontend\assets\AdminAsset;
use vova07\imperavi\Widget;
use yii\helpers\Html;
use yii\helpers\Url;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
$this->registerJsFile('/js/custom/image-upload.js', ['depends' => AdminAsset::className()]);
?>
<div id="content">
    <div class="outer">
        <div class="inner bg-light lter">
            <div id="collapse4" class="body">
                <div class="brend-index">
                    <?php 
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data', 'id' => 'form-article']]);
?>
                    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => true]);
?>
                    <?php 
echo $form->field($model, 'article_category')->dropDownList([NULL => ''] + ArrayHelper::map(common\models\ArticleCategory::find()->all(), 'id', 'name'));
?>
                    <?php 
echo $form->field($model, 'template')->dropDownList([NULL => ''] + ArrayHelper::map(common\models\Template::find()->all(), 'id', 'name'));
?>
                    <?php 
echo $form->field($model, 'content')->widget(Widget::className(), ['settings' => ['iframe' => true, 'air' => true, 'formatting' => ['iframe'], 'lang' => 'ru', 'minHeight' => 400, 'pastePlainText' => true, 'buttonSource' => true, 'focus' => true, 'imageUpload' => '/blog/upload', 'imageManagerJson' => '/blog/uploaded', 'plugins' => ['clips', 'fullscreen', 'imagemanager']]]);
?>
                    <?php