Esempio n. 1
0
<?php

$this->breadcrumbs = array(IguAgents::label(2), Yii::t('app', 'Index'));
$this->menu = array(array('label' => Yii::t('app', 'Manage') . ' ' . IguAgents::label(2), 'url' => array('admin')));
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('user/createAdmin'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'active' => true, 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'linkOptions' => array('class' => 'search-button')), array('label' => 'Export to PDF', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GeneratePdf'), 'linkOptions' => array('target' => '_blank'), 'visible' => true), array('label' => 'Export to Excel', 'icon' => 'icon-download', 'url' => Yii::app()->controller->createUrl('GenerateExcel'), 'linkOptions' => array('target' => '_blank'), 'visible' => true))));
$this->endWidget();
?>

<h1><?php 
echo GxHtml::encode(IguAgents::label(2));
?>
</h1>

<?php 
$this->widget('zii.widgets.CListView', array('dataProvider' => $dataProvider, 'itemView' => '_view'));
Esempio n. 2
0
	<div class="row">
		<?php 
echo $form->label($model, 'id');
?>
		<?php 
echo $form->textField($model, 'id');
?>
	</div>

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

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

	<div class="row">
		<?php 
echo $form->label($model, 'useddate');
Esempio n. 3
0
 <span class="required">*</span> <?php 
echo Yii::t('app', 'are required');
?>
.
	</p>

	<?php 
echo $form->errorSummary($model);
?>

		<div class="row">
		<?php 
echo $form->labelEx($model, 'idagent');
?>
		<?php 
echo $form->dropDownList($model, 'idagent', GxHtml::listDataEx(IguAgents::model()->findAllAttributes(null, true)));
?>
		<?php 
echo $form->error($model, 'idagent');
?>
		</div><!-- row -->
		
		 <div class="row">
		<?php 
echo $form->labelEx($model, 'Number');
?>
		<input type="text" name="number" class="row" />
		<span style='color:red'><?php 
echo $form->error($model, 'idvoucher');
?>
</span>
Esempio n. 4
0
 public function actionGeneratePdf()
 {
     $session = new CHttpSession();
     $session->open();
     Yii::import('application.modules.admin.extensions.giiplus.bootstrap.*');
     require_once 'tcpdf/tcpdf.php';
     require_once 'tcpdf/config/lang/eng.php';
     if (isset($session['IguAgents_records'])) {
         $model = $session['IguAgents_records'];
     } else {
         $model = IguAgents::model()->findAll();
     }
     $html = $this->renderPartial('expenseGridtoReport', array('model' => $model), true);
     //die($html);
     $pdf = new TCPDF();
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor(Yii::app()->name);
     $pdf->SetTitle('IguAgents Report');
     $pdf->SetSubject('IguAgents Report');
     //$pdf->SetKeywords('example, text, report');
     $pdf->SetHeaderData('', 0, "Report", '');
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, "Example Report by " . Yii::app()->name, "");
     $pdf->setHeaderFont(array('helvetica', '', 8));
     $pdf->setFooterFont(array('helvetica', '', 6));
     $pdf->SetMargins(15, 18, 15);
     $pdf->SetHeaderMargin(5);
     $pdf->SetFooterMargin(10);
     $pdf->SetAutoPageBreak(TRUE, 0);
     $pdf->SetFont('dejavusans', '', 7);
     $pdf->AddPage();
     $pdf->writeHTML($html, true, false, true, false, '');
     $pdf->LastPage();
     $pdf->Output("IguAgents_002.pdf", "I");
 }
Esempio n. 5
0
<?php

$this->breadcrumbs = array($model->label(2) => array('index'), Yii::t('app', 'Manage'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$.fn.yiiGridView.update('igu-voucher-management-grid', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
$this->beginWidget('zii.widgets.CPortlet', array('htmlOptions' => array('class' => '')));
$this->widget('bootstrap.widgets.TbMenu', array('type' => 'pills', 'items' => array(array('label' => 'Create', 'icon' => 'icon-plus', 'url' => Yii::app()->controller->createUrl('create'), 'linkOptions' => array()), array('label' => 'List', 'icon' => 'icon-th-list', 'url' => Yii::app()->controller->createUrl('index'), 'linkOptions' => array()), array('label' => 'Manage', 'icon' => 'icon-search', 'url' => Yii::app()->controller->createUrl('admin'), 'active' => true, 'linkOptions' => array()))));
$this->endWidget();
?>

<h3><?php 
echo Yii::t('app', 'Manage') . ' ' . GxHtml::encode($model->label(2));
?>
</h3>


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

<?php 
$this->widget('zii.widgets.grid.CGridView', array('id' => 'igu-voucher-management-grid', 'dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'idagent', 'value' => 'GxHtml::valueEx($data->idagent0)', 'filter' => GxHtml::listDataEx(IguAgents::model()->findAllAttributes(null, true))), array('name' => 'idvoucher', 'value' => 'GxHtml::valueEx($data->idvoucher0)', 'filter' => GxHtml::listDataEx(IguVoucher::model()->findAllAttributes(null, true))), 'useddate', 'givendate')));