Пример #1
0
 public function cargarLocalesCliente()
 {
     $id_user = $this->cargarUser();
     $criteria = new CDbCriteria(array('condition' => 'user_id =:user_id', 'order' => 'id DESC', 'limit' => 500, 'params' => array(':user_id' => $id_user)));
     $model = Local::model()->findAll($criteria);
     $dataProvider = new CActiveDataProvider('Local', array('criteria' => $criteria));
     #$dataProvider->setPagination(false);
     return $dataProvider;
 }
Пример #2
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')));
Пример #3
0
		<?php 
echo $form->labelEx($model, 'user_id');
?>
		<?php 
echo $form->dropDownList($model, 'user_id', GxHtml::listDataEx(User::model()->findAllAttributes(null, true)));
?>
		<?php 
echo $form->error($model, 'user_id');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($model, 'local_id');
?>
		<?php 
echo $form->dropDownList($model, 'local_id', GxHtml::listDataEx(Local::model()->findAllAttributes(null, true)));
?>
		<?php 
echo $form->error($model, 'local_id');
?>
		</div><!-- row -->
		<div class="row">
		<?php 
echo $form->labelEx($model, 'celular');
?>
		<?php 
echo $form->textField($model, 'celular', array('maxlength' => 45));
?>
		<?php 
echo $form->error($model, 'celular');
?>
Пример #4
0
		<div class="row">
		<?php echo $form->labelEx($model,'fono'); ?>
		<?php echo $form->textField($model, 'fono', array('maxlength' => 45)); ?>
		<?php echo $form->error($model,'fono'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'mail'); ?>
		<?php echo $form->textField($model, 'mail', array('maxlength' => 45)); ?>
		<?php echo $form->error($model,'mail'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'username'); ?>
		<?php echo $form->textField($model, 'username', array('maxlength' => 45)); ?>
		<?php echo $form->error($model,'username'); ?>
		</div><!-- row -->
		<div class="row">
		<?php echo $form->labelEx($model,'password'); ?>
		<?php echo $form->passwordField($model, 'password', array('maxlength' => 45)); ?>
		<?php echo $form->error($model,'password'); ?>
		</div><!-- row -->

		<label><?php echo GxHtml::encode($model->getRelationLabel('locals')); ?></label>
		<?php echo $form->checkBoxList($model, 'locals', GxHtml::encodeEx(GxHtml::listDataEx(Local::model()->findAllAttributes(null, true)), false, true)); ?>
		<label><?php echo GxHtml::encode($model->getRelationLabel('userPlans')); ?></label>
		<?php echo $form->checkBoxList($model, 'userPlans', GxHtml::encodeEx(GxHtml::listDataEx(UserPlan::model()->findAllAttributes(null, true)), false, true)); ?>

<?php
echo GxHtml::submitButton(Yii::t('app', 'Save'));
$this->endWidget();
?>
</div><!-- form -->
Пример #5
0
        //'htmlOptions' => array(
        //                        'style' => 'overflow-y:auto;'
        //                                   .'table-layout:fixed;'
        //                                   .'white-space:nowrap;'
        //                                   ),       
	'columns' => array(
		array(
                        'name' => 'id',
                        //'header'=>'id',
                        //'value' => '($model->id',
                        //'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
                     ),
		array(
                        'name'=>'local_id',
                        'value'=>'GxHtml::valueEx($data->local)',
                        'filter'=>GxHtml::listDataEx(Local::model()->findAllAttributes(null, true)),
                        //'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
                     ),
		array(
                        'name'=>'categoria_id',
                        'value'=>'GxHtml::valueEx($data->categoria)',
                        'filter'=>GxHtml::listDataEx(Categoria::model()->findAllAttributes(null, true)),
                        //'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
                     ),
		array(
                        'name' => 'nombre',
                        //'header'=>'nombre',
                        //'value' => '($model->nombre',
                        //'htmlOptions'=>array('style'=>'min-width: 50px; max-width: 100px; white-space:nowrap;'),
                     ),
		array(
Пример #6
0
	'method' => 'get',
)); ?>

	<div class="row">
		<?php echo $form->label($model, 'id'); ?>
		<?php echo $form->textField($model, 'id'); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'user_id'); ?>
		<?php echo $form->dropDownList($model, 'user_id', GxHtml::listDataEx(User::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All'))); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'plan_id'); ?>
		<?php echo $form->dropDownList($model, 'plan_id', GxHtml::listDataEx(Plan::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All'))); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model, 'local_id'); ?>
		<?php echo $form->dropDownList($model, 'local_id', GxHtml::listDataEx(Local::model()->findAllAttributes(null, true)), array('prompt' => Yii::t('app', 'All'))); ?>
	</div>

	<div class="row buttons">
		<?php echo GxHtml::submitButton(Yii::t('app', 'Search')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->