Example #1
0
<?php

$this->breadcrumbs = array('Ver Local' => array('local/verLocalCliente', 'id' => $id_local), Yii::t('app', 'Manage'));
Yii::app()->clientScript->registerScript('search', "\r\n\$('.search-button').click(function(){\r\n\t\$('.search-form').toggle();\r\n\treturn false;\r\n});\r\n\$('.search-form form').submit(function(){\r\n\t\$.fn.yiiGridView.update('recarga-grid', {\r\n\t\tdata: \$(this).serialize()\r\n\t});\r\n\treturn false;\r\n});\r\n");
?>
<pre>
  <?php 
$publicidad = Publicidad::model()->random()->find();
echo $publicidad->mensaje;
?>
</pre>

<h1><?php 
echo Yii::t('app', 'Historial de Recargas');
?>
</h1>


<?php 
/*echo GxHtml::link(Yii::t('app', 'Busqueda Avanzada'), '#', array('class' => 'search-button')); ?>
<div class="search-form">
<?php $this->renderPartial('_search', array(
	'model' => $model,
)); */
?>
</div><!-- search-form -->

<?php 
$this->widget('bootstrap.widgets.TbExtendedGridView', array('id' => 'recarga-grid', 'dataProvider' => new CArrayDataProvider($model, array('pagination' => array('pageSize' => 50))), 'type' => 'striped bordered condensed', 'template' => "{extendedSummary}\n{items}{pager}", 'columns' => array(array('name' => 'user_id', 'value' => 'GxHtml::valueEx($data->user)', 'filter' => GxHtml::listDataEx(User::model()->findAllAttributes(null, true))), array('name' => 'local_id', 'value' => 'GxHtml::valueEx($data->local)', 'filter' => GxHtml::listDataEx(Local::model()->findAllAttributes(null, true))), 'celular', 'fecha', 'compania', 'monto', 'comentario', 'estado'), 'extendedSummary' => array('title' => 'TOTAL RECARGAS', 'columns' => array('monto' => array('label' => '$', 'class' => 'TbSumOperation'))), 'extendedSummaryOptions' => array('class' => 'well pull-right')));
Example #2
0
 public function actionGeneratePdf()
 {
     $session = new CHttpSession();
     $session->open();
     if (isset($session['Publicidad_model_search'])) {
         $model = $session['Publicidad_model_search'];
         $model = Publicidad::model()->findAll($model->search()->criteria);
     } else {
         $model = Publicidad::model()->findAll();
     }
     $this->toExcel($model, array('id', 'user', 'mensaje', 'estado'), date('Y-m-d-H-i-s'), array(), 'PDF');
 }