Skip to content

Commit

Permalink
updated drop down
Browse files Browse the repository at this point in the history
  • Loading branch information
eluhr committed Oct 25, 2018
1 parent 1c0440a commit 3ab66e7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/views/crud/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@

<div class="row">
<div class="col-xs-12 col-md-6">
<?= SmallBox::widget([
<?= Yii::$app->user->can('publication_crud_publication-category_index') ||Yii::$app->user->can('publication_crud_publication-category') ? SmallBox::widget([
'head' => Yii::t('publication', 'Categories'),
'footer' => Yii::t('publication', 'Manage categories'),
'footer_link' => ['/publication/crud/publication-category/index']
]) ?>
'footer_link' => ['/publication/crud/publication-category/index'],
]) : '' ?>
</div>
<div class="col-xs-12 col-md-6">
<?= SmallBox::widget([
<?= Yii::$app->user->can('publication_crud_publication-item_index') ||Yii::$app->user->can('publication_crud_publication-index') ?SmallBox::widget([
'head' => Yii::t('publication', 'Items'),
'footer' => Yii::t('publication', 'Manage items'),
'footer_link' => ['/publication/crud/publication-item/index'],
'type' => SmallBox::TYPE_RED
]) ?>
]) : '' ?>
</div>
</div>
2 changes: 1 addition & 1 deletion src/views/crud/publication-item/_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
'name' => 'class_name',
'model' => $model,
'attribute' => 'category_id',
'data' => \yii\helpers\ArrayHelper::map(dmstr\modules\publication\models\crud\PublicationCategoryTranslation::find()->where(['language' => \Yii::$app->language])->all(), 'id', 'title'),
'data' => \yii\helpers\ArrayHelper::map(dmstr\modules\publication\models\crud\PublicationCategory::find()->all(), 'id', 'title'),
'options' => [
'placeholder' => Yii::t('cruds', 'Type to autocomplete'),
'multiple' => false,
Expand Down

0 comments on commit 3ab66e7

Please sign in to comment.