本文整理汇总了PHP中Grid::addColumn方法的典型用法代码示例。如果您正苦于以下问题:PHP Grid::addColumn方法的具体用法?PHP Grid::addColumn怎么用?PHP Grid::addColumn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grid
的用法示例。
在下文中一共展示了Grid::addColumn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchresultAction
public function searchresultAction()
{
$page = $this->request->queryString("page");
if (empty($page)) {
$page = "1";
}
$key = $this->request->getParam('txtKey');
if (!isset($key)) {
$key = '';
} else {
$key = trim($key);
}
$totalRecord = $this->model->get('product')->getTotalResult($key);
$this->view->data['page'] = $page;
$this->view->data['totalRecord'] = $totalRecord;
$this->view->data['pageSize'] = 10;
$this->view->data['products'] = $this->model->get('product')->getSearchResults($key, $page, $this->view->data['pageSize']);
$grid = new Grid($this->view->data['products']);
$grid->setModule('admin');
$grid->setController('product');
$grid->setTotalRecord($totalRecord);
$grid->setPageSize($this->view->data['pageSize']);
$grid->setPage($page);
$grid->addColumn(array('header' => 'Tiêu đề bài viết', 'align' => 'left', 'width' => '', 'index' => 'title'));
$grid->addColumn(array('header' => 'URL key', 'align' => 'left', 'width' => '', 'index' => 'url_key'));
$grid->addColumn(array('header' => 'Xuất bản', 'align' => 'center', 'width' => '140', 'index' => 'public_time'));
$grid->addColumn(array('header' => 'Thứ tự', 'align' => 'center', 'width' => '60', 'index' => 'priority'));
$this->view->data['grid'] = $grid;
$this->view->show('search');
}
示例2: indexAction
public function indexAction()
{
$page = $this->request->queryString("page");
if (empty($page)) {
$page = "1";
}
$model = $this->model->get('feedback');
$totalRecord = $model->getTotalRecord(1);
$this->view->data['page'] = $page;
$this->view->data['totalRecord'] = $totalRecord;
$this->view->data['pageSize'] = 10;
$this->view->data['users'] = $model->getAll($page, $this->view->data['pageSize'], null);
$grid = new Grid($this->view->data['users']);
$grid->setModule('admin');
$grid->setController('feedback');
$grid->setTotalRecord($totalRecord);
$grid->setPageSize($this->view->data['pageSize']);
$grid->setPage($page);
$grid->addColumn(array('header' => 'ID', 'align' => 'center', 'width' => '', 'index' => 'id'));
$grid->addColumn(array('header' => 'Họ tên', 'align' => 'left', 'width' => '', 'index' => 'fullname'));
$grid->addColumn(array('header' => 'Thư điện tử', 'align' => 'center', 'width' => '', 'index' => 'email'));
$grid->addColumn(array('header' => 'Điện thoại', 'align' => 'center', 'width' => '', 'index' => 'phone'));
$this->view->data['grid'] = $grid;
$this->view->show('index');
}
示例3: indexAction
public function indexAction()
{
$page = $this->request->queryString("page");
if (empty($page)) {
$page = "1";
}
$userModel = $this->model->get('user');
$totalRecord = $userModel->getTotalRecord(1);
$this->view->data['page'] = $page;
$this->view->data['totalRecord'] = $totalRecord;
$this->view->data['pageSize'] = 10;
$this->view->data['users'] = $userModel->getUser($page, $this->view->data['pageSize'], null);
$grid = new Grid($this->view->data['users']);
$grid->setModule('admin');
$grid->setController('user');
$grid->setTotalRecord($totalRecord);
$grid->setPageSize($this->view->data['pageSize']);
$grid->setPage($page);
$grid->addColumn(array('header' => 'ID', 'align' => 'center', 'width' => '', 'index' => 'id'));
$grid->addColumn(array('header' => 'Tên truy cập', 'align' => 'left', 'width' => '', 'index' => 'username'));
$grid->addColumn(array('header' => 'Tên hiển thị', 'align' => 'center', 'width' => '', 'index' => 'display_name'));
$grid->addColumn(array('header' => 'Email', 'align' => 'center', 'width' => '', 'index' => 'email'));
$this->view->data['grid'] = $grid;
$this->view->show('index');
}
示例4: getGrid
function getGrid($idCliente)
{
$ob = "2";
if (isset($_REQUEST["ob"])) {
$ob = $_REQUEST["ob"];
}
$pagina = 1;
if (isset($_REQUEST["pagina"])) {
$pagina = $_REQUEST["pagina"];
}
$showProcessMsg = false;
$sql = "SELECT uc_id FROM web.wuc_usuariosclientes WHERE uc_idusuarioextranet = :idusuarioextranet";
$params = array(":idusuarioextranet" => $idCliente);
$idUsuarioCliente = ValorSql($sql, "", $params);
$params = array(":contrato" => $_SESSION["contrato"], ":idcliente" => $idUsuarioCliente);
$sql = "SELECT ¿es_id?, ¿es_nombre?, art.utiles.armar_domicilio(es_calle, es_numero, es_piso, es_departamento, NULL) || ' ' ||\n\t\t\t\t\t\tart.utiles.armar_localidad(es_cpostal, es_cpostala, es_localidad, es_provincia) ¿direccion?,\n\t\t\t\t\t\tDECODE(INSTR(" . formatEstablecimientos($_SESSION["establecimientosUsuario"]) . ", ',' || TO_CHAR(es_id) || ','), 0, ' ', 'checked') ¿checked?\n\t\t\tFROM aes_establecimiento, web.wel_establecimientoscliente\n\t\t WHERE es_id = el_idestablecimiento(+)\n\t\t\t AND es_contrato = :contrato\n\t\t\t AND el_idcliente(+) = :idcliente\n\t\t\t AND es_fechabaja IS NULL";
$grilla = new Grid(10, 5);
$grilla->addColumn(new Column(" ", 1, true, false, -1, "nada", "/modules/usuarios_registrados/clientes/administracion_usuarios/check_grid_establecimientos.php", "", -1, true, -1, "", false, "", "checkbox", 4));
$grilla->addColumn(new Column("Nombre"));
$grilla->addColumn(new Column("Dirección"));
$grilla->addColumn(new Column("", -1, false));
$grilla->setColsSeparator(true);
$grilla->setOrderBy($ob);
$grilla->setPageNumber($pagina);
$grilla->setParams($params);
$grilla->setRefreshIntoWindow(true);
$grilla->setRowsSeparator(true);
$grilla->setRowsSeparatorColor("#c0c0c0");
$grilla->setShowTotalRegistros(false);
$grilla->setSql($sql);
$grilla->setTableStyle("GridTableCiiu");
$grilla->setUseTmpIframe(true);
return $grilla->Draw(false);
}
示例5: getGrid
function getGrid()
{
$ob = "1_D_";
if (isset($_REQUEST["ob"])) {
$ob = $_REQUEST["ob"];
}
$pagina = 1;
if (isset($_REQUEST["pagina"])) {
$pagina = $_REQUEST["pagina"];
}
$showProcessMsg = false;
$sql = "SELECT ab_id ¿id?, ab_fechaalta ¿fecha?, ab_nombre ¿archivo?, ab_id ¿numerotransferencia?, ab_id ¿id2?\n\t\t\tFROM web.wab_archivobapro\n\t\t WHERE ab_tipo = 'P'\n\t\t\t AND ab_fechadescargado IS NOT NULL";
$grilla = new Grid(15, 10);
$grilla->addColumn(new Column("", 0, false));
$grilla->addColumn(new Column("Fecha", 0, true, false, -1, "", "", "colFecha", -1, false));
$grilla->addColumn(new Column("Archivo", 0, true, false, -1, "", "", "colFecha", -1, false));
$grilla->addColumn(new Column("Nº Transferencia", 0, true, false, -1, "", "", "colFecha", -1, false));
$grilla->addColumn(new Column(" ", 8, true, false, -1, "btnDownload", "bajar_archivo.php?u=f", "colDownload"));
$grilla->setColsSeparator(false);
$grilla->setOrderBy($ob);
$grilla->setPageNumber($pagina);
$grilla->setRowsSeparator(true);
$grilla->setRowsSeparatorColor("#c0c0c0");
$grilla->setShowTotalRegistros(false);
$grilla->setSql($sql);
$grilla->setUseTmpIframe(true);
return $grilla->Draw(false);
}
示例6: getGrid
function getGrid()
{
$ob = "1_D_";
if (isset($_REQUEST["ob"])) {
$ob = $_REQUEST["ob"];
}
$pagina = 1;
$showProcessMsg = false;
$params = array(":idlogin" => $_SESSION["idEvaluado"]);
$sql = "SELECT pd_id ¿id?, pd_quehace ¿quehace?, pd_paraquelohace ¿paraquelohace?, pd_comolohizo ¿comolohizo?\n\t\t\tFROM rrhh.dpd_descripcion\n\t\t WHERE pd_idlogin = :idlogin";
$grilla = new Grid(1, 100);
$grilla->addColumn(new Column("", 0, true, false, -1, "BotonInformacion", "seleccionar_tarea.php", "GridFirstColumn"));
$grilla->addColumn(new Column("Que hace"));
$grilla->addColumn(new Column("Para que lo hace"));
$grilla->addColumn(new Column("Como se sabe lo que hizo"));
$grilla->setColsSeparator(true);
$grilla->setOrderBy($ob);
$grilla->setPageNumber($pagina);
$grilla->setParams($params);
$grilla->setRowsSeparator(true);
$grilla->setShowFooter(false);
$grilla->setSql($sql);
$grilla->setUseTmpIframe(true);
return $grilla->Draw(false);
}
示例7: setVariance
public function setVariance($arr)
{
$this->variances = $arr;
if (isset($this->grid)) {
foreach ($arr as $key => $item) {
if (is_numeric($key)) {
$key = $item;
}
$this->grid->addColumn('html', $key . '_inf', $key . ' info');
$this->grid->addColumn('html,wrap', $key . '_res', $key . ' result');
}
}
}
示例8: init
function init()
{
parent::init();
if (!$this->auto_test) {
$this->setVariance(array('Test'));
return;
// used for multi-page testing
}
//$this->grid=$this->add('Grid');
$this->grid->addColumn('template', 'name')->setTemplate('<a href="' . $this->app->url(null, array('testonly' => '')) . '<?$name?>"><?$name?></a>');
$this->setVariance(array('Test'));
//$this->setVariance(array('GiTemplate','SMlite'));
//$this->runTests();
}
示例9: getGrid
function getGrid()
{
$ob = "2";
if (isset($_REQUEST["ob"])) {
$ob = $_REQUEST["ob"];
}
$pagina = 1;
if (isset($_REQUEST["pagina"])) {
$pagina = $_REQUEST["pagina"];
}
$showProcessMsg = false;
$params = array();
$where = "";
if ($_REQUEST["email"] != "") {
$params[":email"] = "%" . $_REQUEST["email"] . "%";
$where .= " AND uc_email LIKE :email";
}
if ($_REQUEST["id"] != "") {
$params[":idusuarioextranet"] = $_REQUEST["id"];
$where .= " AND uc_idusuarioextranet = :idusuarioextranet";
}
if ($_REQUEST["usuario"] != "") {
$params[":nombre"] = "%" . $_REQUEST["usuario"] . "%";
$where .= " AND uc_nombre LIKE :nombre";
}
$sql = "SELECT DISTINCT ¿uc_idusuarioextranet?, ¿uc_nombre?, ¿uc_email?\n\t\t\tFROM web.wuc_usuariosclientes, web.wcu_contratosxusuarios\n\t\t WHERE uc_id = cu_idusuario\n\t\t\t AND uc_fechabaja IS NULL\n\t\t\t AND cu_contrato in (" . $_SESSION["contratos"] . ") _EXC1_";
$grilla = new Grid(15, 10);
$grilla->addColumn(new Column("", 8, true, false, -1, "btnLupa", "show_usuario.php", "GridFirstColumn"));
$grilla->addColumn(new Column("Nombre", 0, true, false, -1, "", "", "", -1, false));
$grilla->addColumn(new Column("e-Mail", 0, true, false, -1, "", "", "", -1, false));
$grilla->setColsSeparator(false);
$grilla->setExtraConditions(array($where));
$grilla->setOrderBy($ob);
$grilla->setPageNumber($pagina);
$grilla->setParams($params);
$grilla->setRowsSeparator(true);
$grilla->setRowsSeparatorColor("#c0c0c0");
$grilla->setShowTotalRegistros(true);
$grilla->setSql($sql);
$grilla->setUseTmpIframe(true);
return $grilla->Draw(false);
}
示例10: getGrid
function getGrid($idUsuario, $CodCaratula, $NroExpediente, $NroCarpeta, $tipoJuicio)
{
$idCheque = "0";
if (isset($_REQUEST["id"])) {
$idCheque = $_REQUEST["id"];
}
$pagina = 1;
if (isset($_REQUEST["pagina"])) {
$pagina = $_REQUEST["pagina"];
}
$showProcessMsg = false;
$idAbogado = $idUsuario;
$params = array();
$params[":idAbogado"] = $idAbogado;
$where = "";
$ob = " ORDER BY jt_numerocarpeta ";
if ($CodCaratula != "") {
$params[":CodCaratula"] = str_replace("-", "", $CodCaratula);
$where .= " AND NVL(jt_demandante, '') || 'C/' || NVL(jt_demandado, '') || ' ' || jt_caratula\n LIKE '%' || UPPER(:CodCaratula) ||'%' ";
}
if ($NroExpediente != "") {
$params[":NroExpediente"] = str_replace("-", "", $NroExpediente);
$where .= " AND JT_NROEXPEDIENTE = :NroExpediente ";
}
if ($NroCarpeta != "") {
$params[":NroCarpeta"] = str_replace("-", "", $NroCarpeta);
$where .= " AND JT_NUMEROCARPETA = :NroCarpeta ";
}
if (is_numeric($tipoJuicio)) {
if ($tipoJuicio != "" and $tipoJuicio > "0") {
$params[":tipoJuicio"] = str_replace("-", "", $tipoJuicio);
$where .= " AND JT_IDTIPO = :tipoJuicio ";
}
}
$sql = ObtenerListaJuiciosEnTramite($idAbogado, $where, $ob);
$grilla = new Grid(1, 15);
$grilla->addColumn(new Column("Carpeta ", 0, true, false, -1, "", "", "", -1, false - 1));
$grilla->addColumn(new Column("Caratula ", 0, true, false, -1, "", "", "", -1, false));
$grilla->addColumn(new Column("Expediente ", 0, true, false, -1, "", "", "", -1, false));
//$grilla->addColumn(new Column("ID", 0, true, false, -1, "", "", "", -1, false));
//$grilla->addColumn(new Column("ESTADO", 0, true, false, -1, "", "", "", -1, false));
$grilla->addColumn(new Column("", 0, true, false, -1, "btnPdf ", "/Admin-Web-Form", "", -1, true, -1, "Juicio"));
$grilla->addColumn(new Column("", 0, true, false, -1, "btnPdf", "/Admin-Web-Form", "", -1, true, -1, "Pericias"));
$grilla->addColumn(new Column("", 0, true, false, -1, "btnPdf ", "/Admin-Web-Form", "", -1, true, -1, "Eventos"));
$grilla->addColumn(new Column("", 0, true, false, -1, "btnPdf", "/Admin-Web-Form", "", -1, true, -1, "Sentencia"));
$grilla->setColsSeparator(false);
$grilla->setPageNumber($pagina);
$grilla->setParams($params);
$grilla->setRowsSeparator(true);
$grilla->setRowsSeparatorColor("#c0c0c0");
$grilla->setShowTotalRegistros(true);
$grilla->setSql($sql);
$grilla->setUseTmpIframe(true);
$grilla->addColOpenExtWindows("CR");
$grilla->addColOpenExtWindows("TEX");
return $grilla->Draw(false);
}
示例11: indexAction
public function indexAction()
{
$page = $this->request->queryString("page");
if (empty($page)) {
$page = "1";
}
$pageSize = 20;
$totalRecord = $this->model->get('category')->getTotalRecord();
$this->view->data['page'] = $page;
$this->view->data['totalRecord'] = $totalRecord;
$this->view->data['pageSize'] = $pageSize;
$this->view->data['parentCategorys'] = $this->model->get('category')->getCategorys($page, $pageSize);
$categoryGrid = new Grid($this->view->data['parentCategorys']);
$categoryGrid->setModule('admin');
$categoryGrid->setController('category');
$categoryGrid->setTotalRecord($totalRecord);
$categoryGrid->setPageSize($pageSize);
$categoryGrid->addColumn(array('header' => 'Tên chuyên mục', 'align' => 'left', 'width' => '', 'index' => 'title'));
$categoryGrid->addColumn(array('header' => 'URL key', 'align' => 'left', 'width' => '', 'index' => 'url_key'));
$categoryGrid->addColumn(array('header' => 'Mục cha', 'align' => 'center', 'width' => '60', 'index' => 'parent_id'));
$categoryGrid->addColumn(array('header' => 'Thứ tự', 'align' => 'center', 'width' => '60', 'index' => 'sort_order'));
$this->view->data['grid'] = $categoryGrid;
$this->view->show('index');
}
示例12: indexAction
public function indexAction()
{
$page = $this->request->queryString("page");
if (empty($page)) {
$page = "1";
}
$bannerModel = $this->model->get('banner');
$totalRecord = $bannerModel->getTotalRecord(1);
$this->view->data['page'] = $page;
$this->view->data['totalRecord'] = $totalRecord;
$this->view->data['pageSize'] = 10;
$this->view->data['banners'] = $bannerModel->getBanner($page, $this->view->data['pageSize'], null);
$grid = new Grid($this->view->data['banners']);
$grid->setModule('admin');
$grid->setController('banner');
$grid->setTotalRecord($totalRecord);
$grid->setPageSize($this->view->data['pageSize']);
$grid->setPage($page);
$grid->addColumn(array('header' => 'ID', 'align' => 'center', 'width' => '', 'index' => 'id'));
$grid->addColumn(array('header' => 'Tên banner', 'align' => 'left', 'width' => '', 'index' => 'title'));
$grid->addColumn(array('header' => 'Link', 'align' => 'center', 'width' => '', 'index' => 'link'));
$this->view->data['grid'] = $grid;
$this->view->show('index');
}
示例13: importField
/**
* Import one field from model into grid.
*
* @param string $field
*
* @return void|Grid|Controller_Grid_Format
*/
public function importField($field)
{
$field = $this->model->hasElement($field);
if (!$field) {
return;
}
/** @type Field $field */
$field_name = $field->short_name;
if ($field instanceof Field_Reference) {
$field_name = $field->getDereferenced();
}
$field_type = $this->getFieldType($field);
/** @type string $field_caption */
$field_caption = $field->caption();
$this->field_associations[$field_name] = $field;
$column = $this->owner->addColumn($field_type, $field_name, $field_caption);
if ($field->sortable() && $column->hasMethod('makeSortable')) {
$column->makeSortable();
}
return $column;
}
示例14: addColumnMVC
function addColumnMVC($field_name, $type = null)
{
$field = $this->getController()->getModel()->getField($field_name);
if (is_null($field)) {
throw new Exception_InitError("Field '{$field_name}' is not defined in the " . get_class($this->getController()->getModel()) . " model");
}
if (is_null($type)) {
$type = $this->getController()->formatType($field->datatype(), 'grid', $field_name);
}
if ($field_name == 'locked') {
return parent::addColumn('locked', 'locked', '');
}
if ($field_name == 'id') {
$type = 'text';
}
$r = parent::addColumn($type, $field_name, $field->caption());
//echo get_class($field) . '<br />';
if ($field->sortable()) {
$r->makeSortable();
}
return $r;
}
示例15: Grid
if ($establecimiento != -1) {
$params[":idestablecimiento"] = $establecimiento;
$where.= " AND es_id = :idestablecimiento";
}
$sql =
"SELECT ¿tj_nombre?, ¿tj_cuil?, ¿es_nombre?, ¿rl_tarea?, ¿tj_id?, 'xchecked' ¿checked?
FROM ctj_trabajador, crl_relacionlaboral, cre_relacionestablecimiento, aes_establecimiento
WHERE tj_id = rl_idtrabajador
AND rl_id = re_idrelacionlaboral(+)
AND re_idestablecimiento = es_id(+)
AND rl_contrato = art.afiliacion.get_contratovigente((SELECT em_cuit
FROM aem_empresa
WHERE em_id = :idempresa), SYSDATE) _EXC1_";
$grilla = new Grid();
$grilla->addColumn(new Column("Trabajador"));
$grilla->addColumn(new Column("CUIL"));
$grilla->addColumn(new Column("Establecimiento"));
$grilla->addColumn(new Column("Tarea"));
$grilla->addColumn(new Column(" ", 1, true, false, -1, "btnSeleccionar", "/modules/usuarios_registrados/clientes/certificado_de_cobertura/seleccionar_trabajador.php", "", -1, true, -1, "", false, "", "checkbox", 6));
$grilla->addColumn(new Column("", -1, false));
$grilla->setExtraConditions(array($where));
$grilla->setOrderBy($ob);
$grilla->setPageNumber($pagina);
$grilla->setParams($params);
$grilla->setSql($sql);
$grilla->setTableStyle("GridTableCiiu");
$grilla->setUseTmpIframe(true);
$grilla->Draw();
}
?>