Пример #1
0
 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     Authobjetoslista::model()->findByPk($id)->delete();
     // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
     if (!isset($_GET['ajax'])) {
         $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
     }
 }
Пример #2
0
<?php

/**
 * Created by PhpStorm.
 * User: grecia
 * Date: 11/06/2015
 * Time: 15:18
 */
$this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid1', 'dataProvider' => Authobjetoslista::model()->search($model->id, $usuario->iduser), 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'columns' => array('iduser', 'valorobjeto', array('class' => 'CButtonColumn', 'template' => '{delete}'))));
?>


<div class="botones">
    <?php 
$UrlDefault = $this->createUrl('/authobjetos/agregarvalores', array('id' => $model->id, 'idu' => $usuario->iduser, 'asDialog' => 1));
echo CHtml::link(CHtml::image(Yii::app()->getTheme()->baseUrl . '/img/link-add.png', '', array('height' => 25, 'width' => 25)), '#', array('onclick' => " \$('#cru-frame3').attr('src','{$UrlDefault} ');\$('#cru-dialog3').dialog('open');", 'class' => 'botoncito'));
?>

</div>