Exemplo n.º 1
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use esoftslimited\blog\models\Category;
use esoftslimited\blog\models\Post;
use esoftslimited\blog\assets\BlogAsset;
use esoftslimited\blog\Module;
use pendalf89\filemanager\widgets\FileInput;
use pendalf89\filemanager\widgets\TinyMce;
use common\widgets\ImageSelector;
/* @var $this yii\web\View */
/* @var $model esoftslimited\blog\models\Post */
/* @var $form yii\widgets\ActiveForm */
BlogAsset::register($this);
?>

<div class="post-form">

    <?php 
$form = ActiveForm::begin(['enableClientValidation' => false]);
?>

    <div class="row">
        <!--Left column START-->
        <div class="col-md-9 panel-default">
            <div class="panel panel-default">
                <div class="panel-body">

                    <?php 
echo $form->field($model, 'title')->textInput(['maxlength' => 255, 'class' => 'form-control translit-input duplicate-input']);
Exemplo n.º 2
0
<?php

use yii\helpers\Html;
use esoftslimited\blog\Module;
use esoftslimited\blog\helpers\Helper;
use esoftslimited\blog\assets\BlogAsset;
use kartik\alert\Alert;
/* @var $this yii\web\View */
/* @var $searchModel esoftslimited\blog\models\TypeSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Module::t('main', 'Blog');
$this->params['breadcrumbs'][] = $this->title;
$assetPath = BlogAsset::register($this)->baseUrl;
?>

<div class="blog-default-index">
    <h1><?php 
echo Module::t('main', 'Blog module');
?>
</h1>

    <?php 
if (Helper::isJustInstalled()) {
    ?>
        <?php 
    echo Alert::widget(['type' => Alert::TYPE_SUCCESS, 'title' => Module::t('main', 'Welcome to the module “Blog”!'), 'icon' => 'glyphicon glyphicon-ok-sign', 'body' => Module::t('main', 'You have successfully installed the module “Blog” is now to create a record, you need to create your first post type and category'), 'showSeparator' => true]);
    ?>
    <?php 
}
?>