2017 © Pedro Peláez
 

yii2-extension yii2-adminlte-widgets

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

image

insolita/yii2-adminlte-widgets

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  • Wednesday, July 11, 2018
  • by Insolita
  • Repository
  • 10 Watchers
  • 51 Stars
  • 22,775 Installations
  • PHP
  • 12 Dependents
  • 0 Suggesters
  • 19 Forks
  • 0 Open issues
  • 19 Versions
  • 8 % Grown

The README.md

Widgets for AdminLte theme

Use 3.x tags for yii >= 2.0.13, (*1)

Use 2.x tags for yii < 2.0.13, (*2)

  • Box-widget with support collapse buttons and can save collapsed state in cookie support solid style
  • Tile-widget - similar as box, with same options but with background
  • Smallbox-widget
  • Alert-widget
  • Callout-widget
  • Infobox-widget
  • Flash-Alerts
  • [Timeline Widget] (http://almsaeedstudio.com/themes/AdminLTE/pages/UI/timeline.html) - see more info about it in file Timeline.md
  • ChatBox since 2.0
  • LteSetup since 2.0

See http://almsaeedstudio.com/themes/AdminLTE/pages/widgets.html and http://almsaeedstudio.com/themes/AdminLTE/pages/UI/general.html examples, (*3)

CHANGELOG, (*4)

Independent of any AdminLte AssetBundles If you want use cookie collapsing boxes, set correct dependencies in AssetManager, (*5)

'components'=>[
//--------
     'assetManager'=>[
                 'class'=>'yii\web\AssetManager',
                 'bundles'=>[
                 //--------
                     'insolita\wgadminlte\JsCookieAsset'=>[
                           'depends'=>[
                               'yii\web\YiiAsset',
                               'namespace\for\AdminLteAsset', // for example 'dmstr\web\AdminLteAsset', if we use https://github.com/dmstr/yii2-adminlte-asset
                          ]
                     ],
                      'insolita\wgadminlte\CollapseBoxAsset'=>[
                            'depends'=>[
                                'insolita\wgadminlte\JsCookieAsset'
                            ]
                      ],
             ],
     ]
//--------

]

Installation

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

Either run, (*7)

php composer.phar require --prefer-dist insolita/yii2-adminlte-widgets "^3.2"

or add, (*8)

"insolita/yii2-adminlte-widgets": "^3.2"

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

Usage

  • Box
    <?php \insolita\wgadminlte\LteBox::begin([
             'type'=>\insolita\wgadminlte\LteConst::TYPE_INFO,
             'isSolid'=>true,
             'boxTools'=>'<button class="btn btn-success btn-xs create_button" ><i class="fa fa-plus-circle"></i> Add</button>',
             'tooltip'=>'this tooltip description',
             'title'=>'Manage users',
             'footer'=>'total 44 active users',
         ])?>
        ANY BOX CONTENT HERE
    <?php \insolita\wgadminlte\LteBox::end()?>
  • Tile
   <?php \insolita\wgadminlte\LteBox::begin([
               'type'=>\insolita\wgadminlte\LteConst::COLOR_MAROON,
               'tooltip'=>'Useful information!',
               'title'=>'Attention!',
               'isTile'=>true
           ])?>
        ANY BOX CONTENT HERE
   <?php \insolita\wgadminlte\LteBox::end()?>
  • Box with content as property, (*10)

     <?php \insolita\wgadminlte\LteBox::widget([
                 'type'=>\insolita\wgadminlte\LteConst::COLOR_MAROON,
                 'tooltip'=>'Useful information!',
                 'title'=>'Attention!',
                 'isTile'=>true,
                 'body'=>'Some Box content'
             ])?>
    
  • CollapseBox (Based on LteBox), (*11)

    <?php \insolita\wgadminlte\CollapseBox::begin([
             'type'=>\insolita\wgadminlte\LteConst::TYPE_INFO,
             'collapseRemember' => true,
             'collapseDefault' => false,
             'isSolid'=>true,
             'boxTools'=>'<button class="btn btn-success btn-xs create_button" ><i class="fa fa-plus-circle"></i> Добавить</button>',
             'tooltip'=>'Описание содаржимого',
             'title'=>'Управление пользователями',
         ])?>
        ANY BOX CONTENT HERE
    <?php \insolita\wgadminlte\CollapseBox::end()?>
  • SmallBox, (*12)

    ```php \insolita\wgadminlte\LteConst::COLOR_LIGHT_BLUE, 'title'=>'90%', 'text'=>'Free Space', 'icon'=>'fa fa-cloud-download', 'footer'=>'See All ', 'link'=>Url::to("/user/list") ]);?>, (*13)


* InfoBox ```php <?php echo \insolita\wgadminlte\LteInfoBox::widget([ 'bgIconColor'=>\insolita\wgadminlte\LteConst::COLOR_AQUA, 'bgColor'=>'', 'number'=>100500, 'text'=>'Test Three', 'icon'=>'fa fa-bolt', 'showProgress'=>true, 'progressNumber'=>66, 'description'=>'Something about this' ])?>
  • Callout
   \insolita\wgadminlte\LteConst::TYPE_WARNING,
            'head'=>'Operation Complete',
            'text'=>'Something text bla-bla-bla bla-bla-blabla-bla-blabla-bla-blabla-bla-blabla-bla-blabla-bla-bla'
        ]);?>
 \insolita\wgadminlte\LteConst::TYPE_WARNING,
            'head'=>'Operation Complete'
        ]);?>


  • Alert
   =\insolita\wgadminlte\Alert::widget([
              'type'=>\insolita\wgadminlte\LteConst::TYPE_SUCCESS,
              'text'=>'Operation Complete',
              'closable'=>true
          ]);?>
    <?php
    \insolita\wgadminlte\Alert::begin([
                 'type'=>\insolita\wgadminlte\LteConst::TYPE_SUCCESS,
                 'closable'=>true
             ]);?>
    Some alert message
    <?php \insolita\wgadminlte\Alert::end()?>


  • FlashAlerts

Add in layout, (*14)

    <?= \insolita\wgadminlte\FlashAlerts::widget([
        'errorIcon' => '<i class="fa fa-warning"></i>',
        'successIcon' => '<i class="fa fa-check"></i>',
        'successTitle' => 'Done!', //for non-titled type like 'success-first'
        'closable' => true,
        'encode' => false,
        'bold' => false,
    ]); ?>

And set flash messages anywhere, (*15)

Yii::$app->session->setFlash('info1','Message1');
Yii::$app->session->setFlash('info2','Message2');
Yii::$app->session->setFlash('info3','Message3');
Yii::$app->session->setFlash('success-first','Message');
Yii::$app->session->setFlash('success-second','Message');

Since 2.0, (*16)

  • ChatBox
<?php 
   \insolita\wgadminlte\LteChatBox::begin([
       'type' => \insolita\wgadminlte\LteConst::TYPE_PRIMARY,
       'footer'=>'<input type="text" name="newMessage">',
       'title'=>'Messages',
       'boxTools' => '<button class="btn btn-xs"><i class="fa fa-refresh"></i></button>'
       ]);
      echo \insolita\wgadminlte\LteChatMessage::widget([
          'isRight' => false,
          'author' => 'Artur Green',
          'message' => 'Some message bla-bla',
          'image'=>'https://almsaeedstudio.com/themes/AdminLTE/dist/img/user3-128x128.jpg',
          'createdAt' => '5 minutes ago'
]);
      echo  \insolita\wgadminlte\LteChatMessage::widget([
                'isRight' => true,
                'author' => 'Jane Smith',
                'message' => 'Some message bla-bla',
                'image'=>'https://almsaeedstudio.com/themes/AdminLTE/dist/img/user1-128x128.jpg',
                'createdAt' => '2017-23-03 17:33'
      ]);
   \insolita\wgadminlte\LteChatBox::end();
?>

Widget for configure lte settings, (*17)

Add in layout, (*18)

<?php
   \insolita\wgadminlte\LteSetup::widget([
       'animationSpeed' => 'fast',
       'enableFastclick' => false,
       'navbarMenuSlimscroll'=>false
       //etc...
]);
?>

Example, (*19)

The Versions

11/07 2018

dev-master

9999999-dev

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

15/05 2018

3.1.1

3.1.1.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

05/01 2018

3.1

3.1.0.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

05/01 2018

dev-release-2.x

dev-release-2.x

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

05/01 2018

2.1

2.1.0.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

05/01 2018

dev-feature/adminlte2.4

dev-feature/adminlte2.4

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

03/11 2017

3.0

3.0.0.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

25/03 2017

2.0

2.0.0.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

02/06 2016

v1.1.6

1.1.6.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

02/06 2016

dev-ext-flashAlert

dev-ext-flashAlert

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

19/05 2016

v1.1.5

1.1.5.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

24/03 2016

v1.1.4

1.1.4.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

02/02 2016

v1.1.3

1.1.3.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

02/05 2015

v1.1.2

1.1.2.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

12/03 2015

dev-forlte2

dev-forlte2

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

12/03 2015

v1.1.1

1.1.1.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

06/03 2015

dev-develop

dev-develop

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

06/03 2015

dev-stkit

dev-stkit

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte

14/02 2015

v1.0.0

1.0.0.0

Widgets for AdminLTE theme (Box with remember collapse state, Timeline, Tile, Callout, SmallBox etc)

  Sources   Download

MIT

The Requires

 

by Avatar Insolita

yii2 widget adminlte