public function renderButtons($data, $row) { echo BsHtml::buttonDropdown('', array(array('label' => 'Editar', 'url' => array('update', 'id' => $data->pre_id)), array('label' => 'Eliminar', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $data->pre_id), 'confirm' => 'Esta seguro de borrar este item?'))), array('split' => false, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'color' => BsHtml::BUTTON_COLOR_PRIMARY, 'icon' => BsHtml::GLYPHICON_COG)); }
public function renderButtons($data) { echo BsHtml::buttonDropdown('', array(array('label' => 'Editar', 'url' => array('update', 'id' => $data->eva_id), 'visible' => Usuario::model()->findByPk(Yii::app()->user->id)->usu_rol != "view"), array('label' => 'Eliminar', 'url' => '#', 'linkOptions' => array('submit' => array('delete', 'id' => $data->eva_id), 'confirm' => 'Esta seguro de borrar este item?'), 'visible' => Usuario::model()->findByPk(Yii::app()->user->id)->usu_rol != "view"), array('label' => 'Infome en PDF', 'url' => '', 'onclick' => "window.open(href='pdf?id={$data->eva_id}')")), array('split' => false, 'size' => BsHtml::BUTTON_SIZE_SMALL, 'color' => BsHtml::BUTTON_COLOR_PRIMARY, 'icon' => BsHtml::GLYPHICON_COG)); }
<?php /* @var $this Controller */ $this->beginContent('//layouts/main'); ?> <div id="content"> <?php if (!empty($this->menu)) { echo BsHtml::buttonDropdown('Opciones', $this->menu, array('size' => BsHtml::BUTTON_SIZE_SMALL, 'color' => BsHtml::BUTTON_COLOR_PRIMARY)); } ?> <?php echo $content; ?> </div><!-- content --> <?php $this->endContent();