示例#1
0
文件: index.php 项目: hkhateb/linet3
<?php

/* * *********************************************************************************
 * The contents of this file are subject to the Mozilla Public License Version 2.0
 * ("License"); You may not use this file except in compliance with the Mozilla Public License Version 2.0
 * The Original Code is:  Linet 3.0 Open Source
 * The Initial Developer of the Original Code is Adam Ben Hur.
 * All portions are Copyright (C) Adam Ben Hur.
 * All Rights Reserved.
 * ********************************************************************************** */
$model = new Docs('search');
$model->unsetAttributes();
if (isset($_GET['Docs'])) {
    $model->attributes = $_GET['Docs'];
}
//$var=CHtml::link(CHtml::encode($data->docnum),"#", array("onclick"=>'refNum('.CJSON::encode($data).')'));
$this->widget('EExcelView', array('id' => 'docs-grid', 'dataProvider' => $model->search(), 'template' => '{items}{pager}', 'filter' => $model, 'columns' => array(array('name' => 'doctype', 'filter' => CHtml::listData(Doctype::model()->findAll(), 'id', 'name'), 'value' => '$data->getTypeName()', 'htmlOptions' => array('style' => 'width:35%;')), array('name' => 'docnum', 'value' => 'CHtml::link(CHtml::encode($data->docnum),"#", array("onclick"=>\'refNum(\'.CJSON::encode($data).\')\'));', 'type' => 'raw', 'htmlOptions' => array('style' => 'width:5%;')), 'company', array('name' => 'status', 'value' => '$data->getStatus()', 'htmlOptions' => array('style' => 'width:8%;')), array('name' => 'total', 'htmlOptions' => array('style' => 'width:8%;')))));
?>