当前位置: 首页>>代码示例>>PHP>>正文


PHP grocery_CRUD::display_as方法代码示例

本文整理汇总了PHP中grocery_CRUD::display_as方法的典型用法代码示例。如果您正苦于以下问题:PHP grocery_CRUD::display_as方法的具体用法?PHP grocery_CRUD::display_as怎么用?PHP grocery_CRUD::display_as使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在grocery_CRUD的用法示例。


在下文中一共展示了grocery_CRUD::display_as方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: enfants_window

 public function enfants_window($id)
 {
     $this->id_demande = $id;
     try {
         $crud = new grocery_CRUD();
         $crud->set_language("french");
         $crud->set_theme('bootstrap');
         $crud->where('id_from_demande', $this->id_demande);
         $crud->set_table('sos_enfants');
         $crud->set_subject('Enfant');
         $crud->unset_add();
         $crud->unset_delete();
         $crud->field_type('id_from_demande', 'hidden', $this->id_demande);
         $crud->unset_edit_fields('id_from_kids');
         $crud->set_relation('id_from_kids', 'sos_kids', "id_kid");
         $crud->set_relation('recu', 'sos_gen_recu', "name_recu", null, 'name_recu ASC');
         $crud->set_relation_n_n('accompagniement', 'sos_relation_accompagniement_kid', 'sos_gen_accompagniement_kid', 'id_from_enfants', 'id_from_accompagniement_kid', 'name_accompagniement_kid');
         $crud->set_relation_n_n('activite', 'sos_relation_activite_kid', 'sos_gen_activite_kid', 'id_from_enfants', 'id_from_activite_kid', 'name_activite_kid');
         $crud->columns('enfant', 'recu', 'activite', 'accompagniement', 'commentaire_enfant');
         //$crud->display_as('id_from_kids', 'Enfants');
         $crud->display_as('accompagniement', 'Accompagnement');
         $crud->display_as('activite', 'Activité');
         $crud->display_as('recu', 'Reçu');
         $crud->display_as('id_from_kids', 'Enfant(s)');
         $crud->display_as('commentaire_enfant', 'Commentaire enfant');
         $crud->callback_column('accompagniement', array($this, 'accompagniement'));
         $crud->callback_column('activite', array($this, 'activite'));
         $crud->callback_column('enfant', array($this, 'enfant'));
         $crud->required_fields('recu');
         $output = $crud->render();
         $this->db->where('id_demande', $this->id_demande);
         $query = $this->db->get('sos_demande');
         if ($query->num_rows == 1) {
             $row_demande = $query->row();
         }
         //   $my_demande = $row_demande->id_from_demande;
         $menu = new stdClass();
         $menu->n3 = true;
         //$menu->id_1 = $my_demande;
         $menu->id = $row_demande->id_from_femme;
         $menu->status = $this->session->userdata('status');
         $this->db->where('id_femme', $menu->id);
         $query = $this->db->get('sos_femme');
         if ($query->num_rows == 1) {
             $row_femme = $query->row();
         }
         $header = $this->navigation->home_f($menu) . ' ' . '<p><pre>' . $row_femme->prenom . ' ' . $row_femme->nom . ' ' . $row_femme->nom_marital . '</pre></p>';
         $data = array('output' => $output, 'header' => $header);
         $this->_example_output($data);
     } catch (Exception $e) {
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:simplonco,项目名称:sos_femmes,代码行数:53,代码来源:enfants.php

示例2: administracion

 function administracion()
 {
     if (!$this->tank_auth->is_logged_in()) {
         redirect('/auth/login/');
     }
     try {
         /* Creamos el objeto */
         $crud = new grocery_CRUD();
         /* Seleccionamos el tema */
         $crud->set_theme('flexigrid');
         /* Seleccionmos el nombre de la tabla de nuestra base de datos*/
         $crud->set_table('method');
         /* Le asignamos un nombre */
         $crud->set_subject('Metodo');
         /* Asignamos el idioma español */
         $crud->set_language('spanish');
         /* Aqui le decimos a grocery que estos campos son obligatorios */
         $crud->required_fields('MethodID', 'Description');
         /* Aqui le indicamos que campos deseamos mostrar */
         $crud->columns('MethodID', 'Description');
         $crud->display_as('MethodID', 'ID');
         $crud->display_as('Description', 'Descripci&oacuten');
         /* Generamos la tabla */
         $output = $crud->render();
         /* La cargamos en la vista situada en */
         $this->load->view('Method/administracion', $output);
     } catch (Exception $e) {
         /* Si algo sale mal cachamos el error y lo mostramos */
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:aloewens,项目名称:vacan,代码行数:31,代码来源:Method.php

示例3: index

 public function index()
 {
     try {
         // General
         $crud = new grocery_CRUD();
         $crud->set_language("french");
         $crud->set_theme('bootstrap');
         $crud->set_table('sos_gen_nationalite_detailles');
         $crud->set_subject('Situation administrative');
         //relations
         $crud->set_relation('id_from_nationalite', 'sos_gen_nationalite', 'name_nationalite');
         //Master/child relations
         //Visual
         $crud->columns('name_nationalite_detailles', 'id_from_nationalite');
         $crud->display_as('name_nationalite_detailles', 'Situation administrative');
         $crud->display_as('id_from_nationalite', 'Nationalité');
         //unsets
         //Requireds
         $crud->required_fields('name_nationalite_detailles', 'id_from_nationalite');
         //Callbacks
         //field Types
         // Actions
         // Renders
         $output = $crud->render();
         $menu = new stdClass();
         $menu->n1 = true;
         $menu->lien3_1_1_4 = false;
         $menu->status = $this->session->userdata('status');
         $header = $this->navigation->home_f($menu);
         $data = array('output' => $output, 'header' => $header);
         $this->_example_output($data);
     } catch (Exception $e) {
         show_error($e->getMessage() . ' --- ' . $e->getTraceAsString());
     }
 }
开发者ID:simplonco,项目名称:sos_femmes,代码行数:35,代码来源:nationalite.php

示例4: consultar

 function consultar()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         //-> Identifico el ID del Cliente
         $crud->set_table('facturas');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Factura');
         // Display As
         $crud->unset_add();
         $crud->display_as('id_moneda_pago', 'Moneda Pago');
         $crud->display_as('id_cliente', 'Cliente');
         $crud->display_as('id_estatus', 'Estatus');
         //-> Columnas
         $crud->columns('folio', 'id_cliente', 'total', 'fecha_creacion', 'id_estatus');
         // Relaciones
         $crud->set_relation('id_moneda_pago', 'tipos_moneda', 'descripcion');
         $crud->set_relation('registrado_por', 'usuarios', 'nombre');
         $crud->set_relation('id_estatus', 'formas_pago', 'descripcion');
         $crud->set_relation('id_cliente', 'clientes', 'nombre');
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "CONSULTAR FACTURAS";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:34,代码来源:facturas.php

示例5: index

 function index()
 {
     if ($this->session->userdata('is_logged_in')) {
         $crud = new grocery_CRUD();
         $crud->set_table('productos');
         //->
         $crud->set_theme('datatables');
         $crud->set_language('spanish');
         $crud->set_subject('Producto');
         // Display As
         $crud->display_as('id_clasificacion', 'Clasificación');
         $crud->display_as('id_estatus', 'Estatus');
         //-> Columnas
         $crud->columns('descripcion', 'id_clasificacion', 'precio');
         // Relaciones
         $crud->set_relation('id_clasificacion', 'productos_clasificaciones', 'descripcion');
         $crud->set_relation('id_estatus', 'disponible_nodisponible', 'descripcion');
         // Upload
         ##
         // Validacion
         $crud->field_type('precio', 'integer');
         $crud->required_fields('descripcion', 'id_clasificacion', 'precio');
         //-> Renderizar
         $output = $crud->render();
         $data['titulo'] = "PRODUCTOS";
         $this->load->view('include/head', $output);
         $this->load->view('include/header', $data);
         $this->load->view('admin/output');
         $this->load->view('admin/librerias');
         $this->load->view('include/footer', $data);
     } else {
         $this->load->view('admin/login');
     }
 }
开发者ID:Juchiha,项目名称:mandala,代码行数:34,代码来源:productos.php

示例6: index

 public function index()
 {
     //        $data = array(
     //            'main_content' => 'clients_wishlist',
     //            'output' => $this->db->get_where('clients_wishlist', array('wish_user' => $this->ion_auth->get_user_id()))->result(),
     //            'pagetitle' => 'Wishlist',
     //            'pagedesc' => 'Wishlist',
     //            'contenttitle' => 'Wishlist  Records',
     //            'left_menu' => 'clients_menu'
     //        );
     //        $this->load->view('gc_client_wrapper', $data);
     $this->load->library('grocery_CRUD');
     //        $this->upload_path = '../assets/uploads/' . 'packages';
     //        $this->wrapper = 'gc_admin_wrapper';
     $this->load->model('generic_model');
     $crud = new grocery_CRUD();
     $crud->set_theme('flexigrid');
     $crud->set_table('clients_wishlist');
     $crud->set_subject('Client Wishlist');
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_read();
     $crud->where('wish_user', $this->ion_auth->get_user_id());
     $crud->display_as('wish_title', 'Wish Title');
     $crud->display_as('wish_date', 'Wish Date');
     $crud->callback_column('wish_title', array($this, 'set_change_status'));
     $crud->unset_columns('wish_url', 'wish_user');
     $output = $crud->render();
     $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Client Wishlist', 'pagedesc' => 'Client Wishlist', 'contenttitle' => 'Wishlist Records', 'left_menu' => 'clients_menu');
     $this->load->view('gc_admin_wrapper', $data);
 }
开发者ID:beingjungshahi,项目名称:theexcursionnepal,代码行数:31,代码来源:wishlist.php

示例7: transaksi

 function transaksi()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('tb_transaksi');
     $crud->set_subject('Transaksi');
     $crud->set_theme('datatables');
     $crud->display_as('tglTransaksi', 'Tgl');
     $crud->display_as('namaPembeli', 'Pembeli');
     $crud->display_as('namaPenerima', 'Penerima');
     $crud->display_as('no_hp', 'HP');
     $crud->display_as('jenisTransaksi', 'Transaksi');
     $crud->display_as('namaBarang', 'Barang');
     $crud->display_as('jumlahBarang', 'Jumlah');
     //$crud->columns('perihal','tanggal_surat_masuk');
     //$crud->display_as('id_persoalan','persoalan');
     //$crud->add_action('Setting', base_url().'assets/img/tick.png', 'perencanaan/setting','ui-icon-image');
     $output = $crud->render();
     $stat = $this->session->userdata('lvl');
     if ($stat == 1) {
         //admin
         $this->_example_output($output);
     } else {
         //user
         $this->load->view('dashboard_user', $data);
     }
 }
开发者ID:ahmadchoirunnajib,项目名称:Inventory,代码行数:26,代码来源:Dashboard.php

示例8: get_crud

 private function get_crud()
 {
     $this->data['message'] = $this->session->flashdata('message');
     $crud = new grocery_CRUD();
     $crud->set_theme(GROCERY_CRUD_THEME);
     $crud->set_table('usuario');
     $crud->set_subject('Usuário');
     $crud->unset_columns('id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3', 'ultima_troca', 'cadastro');
     $crud->fields('id', 'nome', 'login', 'email', 'grupos', 'tipo_usuario_id', 'situacao_usuario_id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3');
     $crud->unset_texteditor('id', 'senha', 'senha_anterior1', 'senha_anterior2', 'senha_anterior3', 'ultima_troca', 'cadastro');
     $crud->change_field_type('id', 'invisible');
     $crud->change_field_type('senha', 'invisible');
     $crud->change_field_type('senha_anterior1', 'invisible');
     $crud->change_field_type('senha_anterior2', 'invisible');
     $crud->change_field_type('senha_anterior3', 'invisible');
     $crud->set_relation('situacao_usuario_id', 'situacao_usuario', 'descricao');
     $crud->display_as('situacao_usuario_id', 'Situacao');
     $crud->set_relation('tipo_usuario_id', 'tipo_usuario', 'descricao');
     $crud->display_as('tipo_usuario_id', 'Tipo de Usuário');
     $crud->set_relation_n_n('grupos', 'grupo_usuario_x_usuario', 'grupo_usuario', 'usuario_id', 'grupo_usuario_id', 'descricao');
     /* regras e campos obrigatórios */
     $crud->required_fields('login', 'grupos', 'tipo_usuario_id', 'situacao_usuario_id');
     $crud->set_rules('login', 'Login', 'required|min_length[2]');
     $crud->set_rules('grupos', 'Grupos', 'required');
     $crud->set_rules('tipo_usuario_id', 'Tipo de Usuário', 'required');
     $crud->set_rules('situacao_usuario_id', 'Situação do Usuário', 'required');
     $crud->callback_before_insert(array($this, 'checking_new_user'));
     return $crud->render();
 }
开发者ID:riosfernandes,项目名称:sooe,代码行数:29,代码来源:usuario.php

示例9: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('bootstrap');
     $crud->set_table('user');
     $crud->set_subject('Gebruiker');
     // hide fields
     $crud->columns('is_super_user', 'is_active', 'screen_name', 'email', 'gebruikersgroepen');
     // new_password and new_password repeat are needed to make formvalidation work
     // id is needed to make the email unique check work
     $crud->fields('id', 'is_active', 'screen_name', 'email', 'gebruikersgroepen', 'password', 'new_password', 'new_password_repeat');
     $crud->required_fields('email', 'screen_name', 'is_active');
     $crud->set_relation_n_n('gebruikersgroepen', 'user_x_user_group', 'user_group', 'user_id', 'user_group_id', 'name');
     $crud->field_type('id', 'hidden');
     $crud->field_type('new_password_repeat', 'hidden');
     $crud->field_type('password', 'hidden');
     $crud->display_as('is_active', 'Actief');
     $crud->display_as('screen_name', 'Schermnaam');
     $crud->display_as('is_super_user', '');
     $crud->display_as('new_password', 'Wachtwoord');
     if ($crud->getState() == 'read') {
         $crud->field_type('new_password', 'hidden');
     } else {
         $crud->callback_field('new_password', array($this, 'edit_field_callback_new_password'));
     }
     $crud->field_type('is_active', 'dropdown', array('yes' => 'ja', 'no' => 'nee'));
     $crud->callback_column('is_active', array($this, 'callback_list_is_active'));
     $crud->callback_column('is_super_user', array($this, 'callback_list_is_super_user'));
     $crud->callback_before_insert(array($this, 'before_insert_update_callback'));
     $crud->callback_before_update(array($this, 'before_insert_update_callback'));
     $crud->callback_after_insert(array($this, 'after_insert_callback'));
     $crud->callback_after_update(array($this, 'after_update_callback'));
     if ($crud->getState() === 'update_validation' or $crud->getState() === 'insert_validation') {
         $crud->set_rules('email', 'E-mail', 'required|valid_email|callback_email_unique_check');
         $crud->set_rules('screen_name', 'Schermnaam', 'required');
         if ($this->input->post('new_password') != '' or !$this->input->post('id')) {
             $crud->set_rules('new_password', 'Nieuw wachtwoord', 'required|min_length[10]|matches[new_password_repeat]');
             $crud->set_rules('new_password_repeat', 'Herhaal nieuw wachtwoord', '');
         }
         $this->form_validation->set_message('matches', 'De wachtwoorden zijn niet aan elkaar gelijk.');
     }
     // render the crud HTML
     $crud_output = $crud->render();
     //get the needed css and javascript files
     $this->javascript_files = $crud->get_js_files();
     $this->css_files = $crud->get_css_files();
     // put the crud content in the right position
     $this->views['content'] = $crud_output->output;
     $this->css[] = $this->load->view('admin/user/css/index.css', array(), true);
     // add javascript and css to make the password generate and change function possible
     if ($crud->getState() === 'add' or $crud->getState() === 'edit') {
         $this->css[] = $this->load->view('admin/user/css/edit_user.css', array(), true);
         $this->javascript[] = $this->load->view('admin/user/js/edit_user.js', array(), true);
     }
     // create the layout-HTML and show it to the user
     $this->_layout();
 }
开发者ID:BitmanNL,项目名称:traffictower-cms,代码行数:57,代码来源:TT_user.php

示例10: listarNeumonias

 public function listarNeumonias()
 {
     $sub = $this->frontend_model->buscarDiresas();
     $subr = array();
     foreach ($sub as $dato) {
         $subr[$dato->codigo] = $dato->nombre;
     }
     $est = $this->frontend_model->listaEstablec();
     $estab = array();
     foreach ($est as $dato) {
         $estab[$dato->cod_est] = $dato->raz_soc;
     }
     $crud = new grocery_CRUD();
     $crud->set_table('neumonias');
     $crud->columns('diresa', 'e_salud', 'apepat', 'apemat', 'nombres', 'sexo', 'fecha_reg', 'fecha_def', 'usuario');
     $crud->set_subject('Ficha');
     $nivelUsuario = $this->session->userdata("nivel");
     switch ($nivelUsuario) {
         case '8':
             $where = array('e_salud' => $this->session->userdata("establecimiento"));
             $crud->where($where);
             break;
         case '7':
             $where = array('microred' => $this->session->userdata("microred"), 'red' => $this->session->userdata("red"), 'diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '6':
             $where = array('red' => $this->session->userdata("red"), 'diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
         case '5':
             $where = array('diresa' => $this->session->userdata("diresa"));
             $crud->where($where);
             break;
     }
     $crud->field_type('sexo', 'dropdown', array('M' => 'Masculino', 'F' => 'Femenino'));
     $crud->field_type('diresa', 'dropdown', $subr);
     $crud->field_type('e_salud', 'dropdown', $estab);
     $crud->display_as("apepat", "Apellido Paterno");
     $crud->display_as("apemat", "Apellido Materno");
     $crud->display_as("fecha_reg", "Registro");
     $crud->display_as("fecha_def", "Defunci&oacute;n");
     $crud->display_as("e_salud", "Establecimiento");
     $crud->unset_add();
     $crud->unset_edit();
     $crud->unset_read();
     $crud->unset_export();
     //$crud->unset_print();
     $crud->callback_after_delete(array($this, 'log_usuario_before_delete'));
     $crud->add_action_peru('', '', 'RegfichaNeum', 'add-icon');
     $crud->add_action('Modificar Ficha', '', 'modulos3/ModfichaNeum', 'edit-icon');
     $crud->add_action('Ver Ficha', '', 'modulos3/VerfichaNeum', 'read-icon');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:alejandrob1519,项目名称:nwsp,代码行数:55,代码来源:modulos3.php

示例11: index

 public function index()
 {
     //Inisialisasi
     $crud = new grocery_CRUD();
     $crud->set_subject('Pasien');
     $crud->set_table('tbl_pasien');
     //Label Fields
     $crud->display_as('idPasien', 'ID Pasien');
     $crud->display_as('namaPasien', 'Nama');
     $crud->display_as('umur', 'Umur');
     $crud->display_as('tanggalLahir', 'Tanggal Lahir');
     $crud->display_as('jenisKelamin', 'Jenis Kelamin');
     $crud->display_as('status', 'Status');
     $crud->display_as('alamat', 'Alamat');
     $crud->display_as('pekerjaan', 'Pekerjaan');
     $crud->display_as('no_telp', 'Nomor Telepon');
     //Kolom Input dan Callbacks
     $crud->fields('idPasien', 'namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan', 'no_telp');
     $crud->field_type('idPasien', 'invisible');
     $crud->callback_field('jenisKelamin', array($this, 'jenisKelamin_callback'));
     $crud->field_type('status', 'dropdown', array('Menikah' => 'Menikah', 'Belum Menikah' => 'Belum Menikah'));
     $crud->field_type('pekerjaan', 'dropdown', array('Pegawai Negeri' => 'Pegawai Negeri', 'Wiraswasta' => 'Wiraswasta', 'Karyawan Swasta' => 'Karyawan Swasta', 'Mahasiswa' => 'Mahasiswa', 'Ibu Rumah Tangga' => 'Ibu Rumah Tangga', 'Pensiunan' => 'Pensiunan', 'Lainnya' => 'Lainnya'));
     //Aturan Pengisian Form
     $crud->required_fields('namaPasien', 'umur', 'tanggalLahir', 'jenisKelamin', 'status', 'alamat', 'pekerjaan');
     $crud->set_rules('umur', 'Umur', array('required', 'max_length[2]', 'numeric'));
     $crud->set_rules('no_telp', 'Nomor Telepon', 'numeric');
     $crud->set_language("indonesian");
     //Cetak Tabel
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:elraghifary,项目名称:RSIA-Humana-Prima,代码行数:31,代码来源:pasien.php

示例12:

 function shift_management()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('turnos_tipos');
     $crud->set_subject('Trunos');
     $crud->columns('nombre', 'desde', 'hasta');
     $crud->display_as('desde', 'Desde 24 Hrs');
     $crud->display_as('hasta', 'Hasta 24 Hrs');
     $crud->required_fields('nombre', 'desde', 'hasta');
     $crud->unset_delete();
     $output = $crud->render();
     $this->_output_crud($output, 'Turnos');
 }
开发者ID:joercamu,项目名称:indicadores-produccion,代码行数:13,代码来源:shift.php

示例13: index

 public function index()
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('flexigrid');
     $crud->set_table('bookings');
     $crud->set_subject('Bookings');
     //        $agents = $this->ion_auth->get_all_agents();
     //        $user = $this->ion_auth->user()->row();
     //        $agents += array($user->id => $user->first_name . " " . $user->last_name);
     //        $crud->field_type('hotel_agent_id', 'dropdown', $agents);
     $crud->set_relation('booking_agent', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1));
     $crud->set_relation('agent_id', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1));
     $crud->set_relation('booking_to', 'io_users', '{first_name} {last_name} [{email}]', array('active' => 1));
     $crud->display_as('agent_id', 'Agent of Hotel/Package');
     $crud->display_as('booking_company_commission', 'Company Commission');
     $crud->display_as('booking_status', 'Status (Change Status)');
     $crud->display_as('booking_agent', 'Booked By');
     //        $crud->display_as('hotel_name', 'Hotel Name');
     //        $crud->display_as('hotel_rooms', 'Rooms');
     //        $crud->display_as('hotel_tariffs', 'Tariffs');
     $crud->field_type('booking_ref_no', 'readonly');
     $crud->field_type('paypal_transaction_id', 'readonly');
     $crud->field_type('booking_agent_commission', 'readonly');
     $crud->field_type('booking_company_commission', 'readonly');
     $crud->field_type('booking_type', 'readonly');
     $crud->field_type('booking_item_title', 'readonly');
     $crud->field_type('booking_date', 'readonly');
     $crud->field_type('booking_payment_type', 'readonly');
     $crud->field_type('booking_total', 'readonly');
     $crud->field_type('booking_agent', 'readonly');
     $crud->field_type('agent_id', 'readonly');
     $crud->field_type('booking_to', 'readonly');
     $crud->unset_columns('booking_item', 'booking_subitem', 'booking_paymethod_tax', 'ip_address', 'booking_nights');
     $crud->unset_fields('booking_item', 'booking_subitem', 'booking_paymethod_tax', 'ip_address', 'booking_nights');
     $crud->where('agent_id', $this->ion_auth->get_user_id());
     //        $crud->columns('hotel_name', 'hotel_agent_id', 'hotel_phoneNumber', 'hotel_website', 'hotel_facebook' ,'hotel_googleMap', 'hotel_status');
     //        $state = $crud->getState();
     //
     //        if($state =='list' || $state =='ajax_list')
     //        {
     $crud->set_js("assets/frontend/js/custom_functions_sam.js");
     //        }
     $crud->add_action('Conversation', 'http://www.grocerycrud.com/assets/uploads/general/smiley.png', '', 'ui-icon-image', array($this, '_booking_conversation'));
     $crud->callback_column('booking_ref_no', array($this, '_show_invoice'));
     $crud->callback_edit_field('booking_status', array($this, '_edit_field_callback'));
     $crud->callback_column('booking_status', array($this, '_booking_status'));
     $crud->unset_add();
     $output = $crud->render();
     $data = array('main_content' => 'list', 'output' => $output, 'pagetitle' => 'Bookings', 'pagedesc' => 'Bookings', 'contenttitle' => 'Booking List Records', 'left_menu' => 'agents_menu');
     $this->load->view('gc_admin_wrapper', $data);
 }
开发者ID:beingjungshahi,项目名称:theexcursionnepal,代码行数:51,代码来源:bookings.php

示例14: histori

 public function histori()
 {
     $crud = new grocery_CRUD();
     $crud->set_table('voucher');
     $crud->where('voucher.status', '1');
     $crud->columns('nomor', 'id_member', 'created_at', "used_at");
     $crud->set_relation('id_member', 'members', 'username');
     $crud->display_as('nomor', 'Kode Voucher');
     $crud->display_as('id_member', 'Member');
     $crud->unset_operations();
     $output = $crud->render();
     $output->title = 'Data Voucher';
     $this->template->load('template/template_main', 'admin/voucher', $output);
 }
开发者ID:anggakes,项目名称:permatanetwork,代码行数:14,代码来源:Voucher.php

示例15: afficheProduit

 public function afficheProduit()
 {
     $crud = new grocery_CRUD();
     $crud->set_theme('flexigrid');
     $crud->set_table('produit');
     $crud->set_subject('Produits');
     $crud->required_fields('id_Type_Produit', 'prix', 'libelle', 'poids_piece', 'disponibilite');
     $crud->display_as('id_Type_Produit', 'Type du produit');
     $crud->display_as('poids_piece', 'Poids ou Piece');
     $crud->field_type('id_Type_Produit', 'dropdown', array('1' => 'Legumes', '2' => 'Fruits', '3' => 'Epices', '4' => 'Herbes'));
     $crud->field_type('poids_piece', 'set', array('poids', 'piece'));
     $crud->set_field_upload('file_url', 'assets/uploads/files');
     $output = $crud->render();
     $this->_example_output($output);
 }
开发者ID:projettuto90,项目名称:biaupotager,代码行数:15,代码来源:produit_c.php


注:本文中的grocery_CRUD::display_as方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。