2017 © Pedro Peláez
 

yii2-extension yii2-adminlte-widgets

Adminlte widgets and helpers for yii2

image

wokster/yii2-adminlte-widgets

Adminlte widgets and helpers for yii2

  • Friday, September 22, 2017
  • by wokster
  • Repository
  • 1 Watchers
  • 0 Stars
  • 114 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 12 % Grown

The README.md

Adminlte widgets and helpers for yii2

Adminlte widgets, helpers and gii for yii2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist wokster/yii2-adminlte-widgets "*"

or add, (*4)

"wokster/yii2-adminlte-widgets": "*"

to the require section of your composer.json file., (*5)

Usage

Use BoxWidget to add your content in adminLTE box full config:, (*6)

     'Some title', //string
        'border' => false,       //boolean
        'color' => 'default',    //bootstrap color name 'success', 'danger' еtс.
        'solid' => false,        //boolean
        'padding' => true,       //boolean
        'footer' => false,       //boolean or html to render footer
        'collapse' => true,      //boolean Default AdminLTE button for collapse box
        'close' => false,        //boolean Default AdminLTE button for remove box
        'hide' => false,         //boolean collapsed or not
        'buttons' => [           //array with config to add custom buttons or links
              //sample for links, like in default gii view template
              ['link', '',['delete', 'id' => $model->id],[
                'data-toggle'=>'tooltip', 'data-original-title'=>'delete it',
                'data' => [
                'confirm' => 'Вы уверены, что хотите безвозвратно удалить партнера?',
                'method' => 'post',
              ],]],
              ['link', '',['update','id' => $model->id],['data-toggle'=>'tooltip', 'data-original-title'=>'update it']],
              //sample for custom button
              ['button', '', ['class'=>'btn btn-box-tool', 'data-toggle'=>'tooltip', 'data-original-title'=>'some tooltip']]
        ],
    ]);
    ?>

    <?php echo 'some content'; ?>

    <?php BoxWidget::end();?>

To use gii with adminLTE template, add in config:, (*7)

    'modules' => [
    ....
        'gii' => [
            'class' => 'yii\gii\Module',
            'allowedIPs' => ['*'],
            'generators' => [
                'tcrud'   => [
                    'class'     => '\wokster\ltewidgets\generators\tcrud\Generator',
                ],
                'tmodel'   => [
                    'class'     => '\wokster\ltewidgets\generators\tmodel\Generator',
                ]
            ]
        ],
    ....
    ],

this generator can create widgets for upload files and add behaviors and rules etc. in model and form. It's based on column names. So try name your column as:
text - gen imperavi redactor widget in form
status_id - gen status behavior in model and dropdown in form
url - gen autogenerate js from "title" attribute
img or image or media_url - gen behavior for upload in model and widget in form
date or date_start or date_finish - datePicker in form
sort - add rules for integer 1 - 99, (*8)

The Versions

22/09 2017

dev-master

9999999-dev

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

22/09 2017

1.1.5

1.1.5.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

17/09 2017

1.1.4

1.1.4.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

10/09 2017

1.1.3

1.1.3.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

10/09 2017

1.1.2

1.1.2.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

10/09 2017

1.1.1

1.1.1.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

03/09 2017

1.0.2

1.0.2.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte

03/09 2017

1.0.1

1.0.1.0

Adminlte widgets and helpers for yii2

  Sources   Download

MIT

The Requires

 

by Maksym Tymofeiev

extension yii2 widgets adminlte