Ejemplo n.º 1
0
<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use pendalf89\blog\models\Category;
use pendalf89\blog\models\Post;
use pendalf89\blog\assets\BlogAsset;
use pendalf89\blog\Module;
use pendalf89\filemanager\widgets\FileInput;
use pendalf89\filemanager\widgets\TinyMce;
/* @var $this yii\web\View */
/* @var $model pendalf89\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']);
?>
Ejemplo n.º 2
0
<?php

use yii\helpers\Html;
use pendalf89\blog\Module;
use pendalf89\blog\helpers\Helper;
use pendalf89\blog\assets\BlogAsset;
use kartik\alert\Alert;
/* @var $this yii\web\View */
/* @var $searchModel pendalf89\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 
}
?>