echo ButtonGroup::widget(['orientation' => ButtonGroup::VERTICLE, 'buttons' => [['label' => 'Left', 'options' => ['class' => 'btn-warning']], ['label' => 'Middle', 'options' => ['class' => 'btn-warning']], ['label' => 'Right', 'options' => ['class' => 'btn-warning']]]]); ?> </td> <td> <?php echo ButtonGroup::widget(['orientation' => ButtonGroup::VERTICLE, 'encodeLabels' => false, 'buttons' => [['label' => "<i class='fa fa-align-left'></i>", 'options' => ['class' => 'btn-warning']], ['label' => "<i class='fa fa-align-center'></i>", 'options' => ['class' => 'btn-warning']], ['label' => "<i class='fa fa-align-right'></i>", 'options' => ['class' => 'btn-warning']]]]); ?> </td> <td> <?php echo ButtonGroup::widget(['orientation' => ButtonGroup::VERTICLE, 'encodeLabels' => false, 'buttons' => [['label' => "<i class='fa fa-align-left'></i>", 'options' => ['class' => 'btn-warning btn-flat']], ['label' => "<i class='fa fa-align-center'></i>", 'options' => ['class' => 'btn-warning btn-flat']], ['label' => "<i class='fa fa-align-right'></i>", 'options' => ['class' => 'btn-warning btn-flat']]]]); ?> </td> <td> <?php echo ButtonGroup::widget(['orientation' => ButtonGroup::VERTICLE, 'encodeLabels' => false, 'buttons' => [['label' => "1", 'options' => ['class' => 'btn-warning']], ['label' => "2", 'options' => ['class' => 'btn-warning']], ['dropdown' => ['label' => '', 'group' => true, 'options' => ['type' => 'button', 'class' => 'btn-warning'], 'dropdown' => ['items' => [['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], ['label' => 'Something else here', 'url' => '#'], ['divider' => true], ['label' => 'Separated link', 'url' => '#']]]]]]]); ?> </td> </tr> <!-- /.warning --> <!-- success --> <tr> <td> <div class="btn-group-vertical"> <button type="button" class="btn btn-success">Top</button> <button type="button" class="btn btn-success">Middle</button> <button type="button" class="btn btn-success">Bottom</button> </div> </td> <td> <div class="btn-group-vertical">
use yii\adminUi\widget\ButtonGroup; use yii\adminUi\widget\Button; use common\modules\media\widgets\MediaUpload; use common\modules\media\widgets\EmbedUpload; /* @var $this yii\web\View */ /* @var $model common\models\Asset */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="asset-form"> <?php $mediaupload = MediaUpload::widget(['options' => ['addRemoveLinks' => true]]); $embedupload = EmbedUpload::widget(); Row::begin(); Column::begin(['grid' => [['type' => Column::TYPE_DESKTOP, 'size' => Column::SIZE_FULL]]]); echo ButtonGroup::widget(['buttons' => [Button::widget(['label' => 'Media Upload', 'options' => ['class' => 'btn-primary btn-lg col-xs-6 col-sm-6 col-md-6 col-lg-6', 'data-toggle' => "collapse", 'data-target' => '#media-upload', 'data-parent' => "#media-upload-wrapper"]]), Button::widget(['label' => 'Embed Media Upload', 'options' => ['class' => 'btn-info btn-lg col-xs-6 col-sm-6 col-md-6 col-lg-6', 'data-toggle' => "collapse", 'data-target' => '#embed-upload', 'data-parent' => "#media-upload-wrapper"]])], 'options' => ['class' => 'col-md-12']]); Column::end(); Row::end(); Row::begin(); Column::begin(['grid' => [['type' => Column::TYPE_DESKTOP, 'size' => Column::SIZE_FULL]]]); echo Collapse::widget(['box' => false, 'header' => false, 'options' => ['id' => 'media-upload-wrapper'], 'items' => [['content' => $mediaupload, 'contentOptions' => ['id' => 'media-upload']], ['content' => $embedupload, 'contentOptions' => ['id' => 'embed-upload']]]]); Column::end(); Row::end(); /* echo MediaUpload::widget([ 'options' => [ 'addRemoveLinks' => true, ] ]); //*/ ?>