2017 © Pedro Peláez
 

yii2-extension yii2-inspinia

Inspinia 2.5 widgets

image

jcabanillas/yii2-inspinia

Inspinia 2.5 widgets

  • Friday, June 10, 2016
  • by jcabanillas
  • Repository
  • 3 Watchers
  • 9 Stars
  • 577 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 1 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Inspinia Admin Theme

Inspinia 2.5 widgets that really works, (*1)

Buy license to this theme https://wrapbootstrap.com/theme/inspinia-responsive-admin-theme-WB0R5L90S

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist jcabanillas/yii2-inspinia "*"

or add, (*4)

"jcabanillas/yii2-inspinia-asset": "*"

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

Quick Start

Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component:, (*6)

For Yii 2 Application Template or Basic Application Template, (*7)

'components' => [
    'view' => [
         'theme' => [
             'pathMap' => [
                '@app/views' => '@vendor/jcabanillas/yii2-inspinia/views'
             ],
         ],
    ],
],

This asset bundle provides sample files for layout and view, they are not meant to be customized directly in the vendor/ folder., (*8)

Therefore it is recommended to copy the views into your application and adjust them to your needs., (*9)

Customization

Copy files from vendor/jcabanillas/yii2-inspinia/views to @app/views.
Remove the custom view configuration from your application by deleting the path mappings, if you have made them before.

Components

Header block and breadcrumbs

Structure, (*10)



Title

=Breadcrumbs::widget([ 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], ]) ?>

To change it use:, (*11)

<?php $this->beginBlock('content-header'); ?>
About <small>static page</small>
<?php $this->endBlock(); ?>

Add this block and use header right toolbar, (*12)

<?php $this->beginBlock('content-header-actions'); ?>
<a href="<?=Url::to(['create'])?>" class="btn btn-primary">
    <i class="fa fa-fw fa-plus"></i>
    <?=\Yii::t('reference', 'Create filial')?>
</a>
<?php $this->endBlock(); ?>

Middle box

<div class="middle-box text-center animated fadeInRightBig">
    <h3 class="font-bold">This is page content</h3>
    <div class="error-desc">
        You can create here any grid layout you want. And any variation layout you imagine:) Check out
        main dashboard and other site. It use many different layout.
        <br/><a href="index-2.html" class="btn btn-primary m-t">Dashboard</a>
    </div>
</div>

Panels

Usage:, (*13)

$this->title,
    'description'=> 'same text',
    'toolbar'=>[
        ...
    ]
])?>

    <?php echo GridView::widget([
        'dataProvider' => $dataProvider,
        'tableOptions' => ['class' => 'table table-hover']
    ]); ?>


Configurations: title - Title of panel; description - Description panel (right from title) footer - footer text, (*14)

toolbar - panel's menu example, (*15)

'toolbar'=>[
        [
            'title' => '',
            'link'  => Url::to(['/']),
            'icon'  => 'wrench',
            'items' => [
                [
                    'title' => 'Item 1',
                    'link'  => Url::to(['/']),
                    'icon'  => 'earth',
                ],
                [
                    'title' => 'Item 2',
                    'link'  => Url::to(['/']),
                    'icon'  => 'pencil',
                ],
            ],
        ],
        [
            'title' => '',
            'link'  => Url::to(['http://vk.com']),
            'icon'  => 'vk',
        ]
    ]

collapse_button true if panel collapable close_button true if panel closable, (*16)

ionRangeSlider widget

<?= $form->field($model, 'work_time')->widget(\jcabanillas\inspinia\widgets\ionRangeSlider::className(), [
    'clientOptions'=>[
        'type'=>'double',
        'grid'=>true,
        'min'=>0,
        'max'=>'24',
        'from'=>10,
        'to'=>18,
        'step'=>'.01',
        'prefix'=> \Yii::t('reference', 'Worktime:'),
        'decorate_both'=> false,
        'values_separator'=>  ' '.\Yii::t('reference', 'to').' ',
    ]
]) ?>

The Versions

10/06 2016

dev-master

9999999-dev

Inspinia 2.5 widgets

  Sources   Download

Apache-2.0

The Requires

  • yiisoft/yii2 *
  • bower-asset/fontawesome *
  • bower-asset/ionrangeslider *
  • bower-asset/knob *
  • bower-asset/switchery *
  • bower-asset/cropper *
  • bower-asset/momentjs *
  • bower-asset/chosen *
  • bower-asset/jquery-sparkline *
  • bower-asset/flot *
  • bower-asset/flot.tooltip *
  • bower-asset/flot-spline *
  • bower-asset/jquery-timeago ^1.5
  • yiisoft/yii2-jui *

 

yii2 inspinia assets widgets