<?php
Yii::app()->getSession()->add('minutas', '2');
Yii::app()->getSession()->remove('sistemas');
Yii::app()->getSession()->remove('gestor');
?>
<img src="http://localhost/sistemas/inicio/images/minuta/t_miminuta.png" />  
<a href="http://localhost/sistemas/inicio/index.php?r=minuta/index">
<img src="http://localhost/sistemas/inicio/images/iconos/volver.png"> 
</a> 

<?php 
$this->widget('bootstrap.widgets.TbGridView', array(
 	'type'=>'striped bordered condensed',
	'id'=>'minuta-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'min_descripcion',
		'min_fecha',
		'min_lugar',		
		array(
			'header'=>'Ver Agenda',
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{agenda}',									
			'buttons'=>array(
				'agenda' => array(											
							'label'=>'Ver Agenda',										
							'imageUrl'=>Yii::app()->baseUrl."/images/minuta/agenda.png",									
							'url'=>'Yii::app()->createUrl("agenda/llamarAgenda", array("agen_id"=>$data->min_codigo))',																	
							'htmlOptions'=>array(
							'style'=>'width: 10px',
							),
				),													
			  ),										
			),
		array(
			'header'=>'Ver Acuerdos',
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{acuerdo}',									
			'buttons'=>array(
				'acuerdo' => array(											
							'label'=>'Ver Acuerdos',										
							'imageUrl'=>Yii::app()->baseUrl."/images/minuta/acuerdos.png",									
							'url'=>'Yii::app()->createUrl("acuerdo/llamarAcuerdo", array("acu_id"=>$data->min_codigo))',
							'htmlOptions'=>array(
							'style'=>'width: 10px',
							),
				),													
			  ),										
			),
		array(
			'header'=>'Ver Compromisos',
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{com}',									
			'buttons'=>array(
				'com' => array(											
							'label'=>'Ver Compromisos',										
							'imageUrl'=>Yii::app()->baseUrl."/images/minuta/compromisos.png",									
							'url'=>'Yii::app()->createUrl("compromiso/llamarCompromiso", array("com_id"=>$data->min_codigo))',
							'htmlOptions'=>array(
							'style'=>'width: 10px',
							),
				),													
			  ),										
			),
		array(
			'header'=>'Ver Revisiones',
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{rev}',									
			'buttons'=>array(
				'rev' => array(											
							'label'=>'Ver Revisiones',										
							'imageUrl'=>Yii::app()->baseUrl."/images/minuta/revision.png",
							'url'=>'Yii::app()->createUrl("revision/llamarRevision", array("rev_id"=>$data->min_codigo))',									
							'htmlOptions'=>array(
							'style'=>'width: 10px',
							),
				),													
			  ),										
			),
		array(
			'header'=>'Publicar',
			'class'=>'bootstrap.widgets.TbButtonColumn',
			'template'=>'{add}',
			'buttons'=>array(
					'add' => array(											
						'label'=>'Publicar Minuta',
						'icon'=>'ok',
						'url'=>'Yii::app()->createUrl("minuta/publicar", array("id"=>$data->min_codigo))',
						'options'=>array(
						'class'=>'btn btn-small',
					 				),
						),													
					  ),
					  //'visible'=>Yii::app()->user->getState('rol')=='Administrador',										
			),
		array(
			'class'=>'CButtonColumn',
			'htmlOptions'=>array('style'=>'width:20px!important'),
			 'headerHtmlOptions'=>array('style'=>'width:20px!important'),
			'template'=>'{delete} {view}',
		),
		array(
              'class'=>'CButtonColumn',
              'header'=>'',
              'htmlOptions'=>array('style'=>'width:30px!important'),
              'headerHtmlOptions'=>array('style'=>'width:30px!important'),
              'template'=>'{pdf}',
                        
              'buttons'=>array(
                        /*{delete} {update} {view} 
                        'view' => array(
                            'label'=>'Ver',
                            'url'=>'Yii::app()->createUrl("tutelas/view", array("id"=>$data->Idxx))',

                            --
                            'viewButtonImageUrl'=>Yii::app()->request->baseUrl.'/images/021.png',
              				'updateButtonImageUrl'=>Yii::app()->request->baseUrl.'/images/017.png',
             			    'deleteButtonImageUrl'=>Yii::app()->request->baseUrl.'/images/004.png',
                        ),*/
                        'pdf' => array(
                                'label'=>'Pdf', 
                                'url'=>"CHtml::normalizeUrl(array('pdf', 'id'=>\$data->min_codigo))",
                                'imageUrl'=>Yii::app()->request->baseUrl.'/images/iconos/pdf_icon.png', 
                                'options' => array('class'=>'pdf','target'=>'_blank'),
                                                         
                        ),
                                                
                )
        ),

	),
)); ?>

