Skip to content

Commit

Permalink
Added Model block
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Nov 7, 2016
1 parent 8b7e86e commit a68aa84
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/views/dashboard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,30 @@
</div>
<?php endif ?>

<?php if (Yii::getAlias('@model', false) && Yii::$app->user->can('manage')) : ?>
<div class="col-lg-3 col-md-6 col-sm-12 col-xs-12">
<?php $box = SmallBox::begin([
'boxTitle' => Yii::t('hipanel:stock', 'Models'),
'boxIcon' => 'fa-cubes',
'boxColor' => SmallBox::COLOR_BLUE,
]) ?>
<?php $box->beginBody() ?>
<br>
<br>
<?= SearchForm::widget([
'formOptions' => [
'id' => 'part-search',
'action' => Url::to('@model/index'),
],
'model' => new ModelSearch(),
'attribute' => 'model_like',
'buttonColor' => SmallBox::COLOR_BLUE,
]) ?>
<?php $box->endBody() ?>
<?php $box->beginFooter() ?>
<?= Html::a(Yii::t('hipanel', 'View') . $box->icon(), '@model/index', ['class' => 'small-box-footer']) ?>
<?php $box->endFooter() ?>
<?php $box::end() ?>
</div>
<?php endif ?>
</div>

0 comments on commit a68aa84

Please sign in to comment.