Ejemplo n.º 1
0
 public function actionborradetalle($id)
 {
     $model = Contactosadicio::model()->findByPk($id);
     //echo "salio";
     $model->delete();
 }
Ejemplo n.º 2
0
	)
	),




	),
	));
*/
?>
	<?php 
if (!$model->isNewRecord) {
    ?>

	   <?php 
    $this->widget('zii.widgets.grid.CGridView', array('id' => 'detalle-grid', 'itemsCssClass' => 'table table-striped table-bordered table-hover', 'dataProvider' => Contactosadicio::model()->search_por_contacto($model->id), 'summaryText' => '->', 'columns' => array('documentos.desdocu', 'mail', array('class' => 'CCheckBoxColumn', 'value' => '$data->activo'), array('htmlOptions' => array('width' => 400), 'class' => 'CButtonColumn', 'template' => '{update}{delete}', 'buttons' => array('update' => array('visible' => 'true', 'url' => '$this->grid->controller->createUrl("/contactos/modificadetalle/",
	   array("id"=>$data->id,
	   "asDialog"=>1,
	   "gridId"=>$this->grid->id,
	   )
	   )', 'click' => 'function(){
	   $("#cru-frame").attr("src",$(this).attr("href"));
	   $("#cru-dialog").dialog("open");
	   return false;
	   }', 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemaimagenes'] . 'lapicito.png', 'label' => 'Actualizar Item'), 'delete' => array('visible' => 'true', 'url' => '$this->grid->controller->createUrl("/contactos/borradetalle", array("id"=>$data->id))', 'options' => array('ajax' => array('type' => 'GET', 'success' => 'js:function() { $.fn.yiiGridView.update("detalle-grid");}', 'url' => 'js:$(this).attr("href")'), 'onClick' => 'Loading.show();Loading.hide(); '), 'imageUrl' => '' . Yii::app()->getTheme()->baseUrl . Yii::app()->params['rutatemaimagenes'] . 'borrador.png', 'label' => 'Ver detalle'))))));
    ?>



	   <?php 
    $createUrl = $this->createUrl('/contactos/creaadicional', array("asDialog" => 1, "gridId" => 'detalle-grid', "idcabeza" => $model->id));