Skip to content

Commit

Permalink
Change create separate buttons to one, Dropdown button
Browse files Browse the repository at this point in the history
  • Loading branch information
tafid committed Aug 6, 2015
1 parent 38cccfb commit 94a5459
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions src/views/account/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,29 @@
echo Html::beginForm();
$box = ActionBox::begin(['model' => $model, 'bulk' => true, 'options' => ['class' => 'box-info']]);
$box->beginActions();
?>
<div class="dropdown">
<button class="btn btn-success dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
<?= Yii::t('app', 'Create accaunt'); ?>&nbsp;
<span class="caret"></span>
</button>
<?= $box->renderSearchButton(); ?>
<?= LinkSorter::widget([
'show' => true,
'sort' => $dataProvider->getSort(),
'attributes' => [
'login', 'client', 'server', 'state', 'type'
],
]); ?>
<?= \yii\bootstrap\Dropdown::widget([
'items' => [
['label' => Yii::t('app', 'Create {modelClass}', ['modelClass' => 'account']), 'url' => ['create']],
['label' => Yii::t('app', 'Create FTP {modelClass}', ['modelClass' => 'account']), 'url' => ['create-ftponly']],
]
]) . '&nbsp;'; ?>
</div>

echo Html::a(Yii::t('app', 'Create {modelClass}', ['modelClass' => 'account']), ['create'], ['class' => 'btn btn-success']) . '&nbsp;';
echo Html::a(Yii::t('app', 'Create FTP {modelClass}', ['modelClass' => 'account']), ['create-ftponly'], ['class' => 'btn btn-success']) . '&nbsp;';
print $box->renderSearchButton();
echo LinkSorter::widget([
'show' => true,
'sort' => $dataProvider->getSort(),
'attributes' => [
'login', 'client', 'server', 'state', 'type'
],
]);

<?php
$box->endActions();

$box->beginBulkActions();
Expand Down

0 comments on commit 94a5459

Please sign in to comment.