Exemplo n.º 1
0
 function dataset()
 {
     //dataset//
     $this->rapyd->load("dataset");
     $dataset = new DataSet($this->data);
     $dataset->per_page = 5;
     $dataset->build();
     $data["items"] = $dataset->data;
     $data["navigator"] = $dataset->navigator;
     //enddataset//
     $content["content"] = $this->load->view('rapyd/dataset', $data, true);
     $content["rapyd_head"] = "";
     $content["code"] = highlight_code_file(THISFILE, "//dataset//", "//enddataset//");
     $this->load->view('rapyd/template', $content);
 }
Exemplo n.º 2
0
 /**
  * build , main build method
  *
  * @access   public
  * @return   string  datagrid output
  */
 function build()
 {
     parent::build();
     if ($this->systemError != "") {
         //gestire l'errore in CI
     }
     return $this->output = $this->_buildGrid();
 }
Exemplo n.º 3
0
 /**
  * build , main build method
  *
  * @access   public
  * @return   string  datatable output
  */
 function build()
 {
     parent::build();
     if ($this->systemError != "") {
         // ci logerror
     }
     $mypointer = 0;
     $output = "";
     $data["title"] = "";
     $data["container_tr"] = "";
     $data["container_bl"] = "";
     $data["container_br"] = "";
     $data["pager"] = "";
     $data["trs"] = array();
     $trs = array();
     $this->rapyd->set_view_path();
     //title
     $data["title"] = $this->_title;
     //buttons
     if (count($this->_button_container["TR"]) > 0) {
         $data["container_tr"] = join(" ", $this->_button_container["TR"]);
     }
     if (count($this->_button_container["BL"]) > 0) {
         $data["container_bl"] = join(" ", $this->_button_container["BL"]);
     }
     if (count($this->_button_container["BR"]) > 0) {
         $data["container_br"] = join(" ", $this->_button_container["BR"]);
     }
     $dataset = $this->data;
     $numRows = ceil(count($dataset) / $this->per_row);
     $itrations = $this->per_row;
     //table rows
     for ($i = 0; $i < $numRows; $i++) {
         unset($tds);
         //table-cells
         for ($j = 1; $j <= $itrations; $j++) {
             if (isset($dataset[0])) {
                 if (!is_array($dataset[0])) {
                     $this->cell_template = "&nbsp;";
                 }
             } else {
                 $this->cell_template = "&nbsp;";
             }
             $cell = new DataTableCell($this->cell_template);
             if (isset($dataset[0])) {
                 $cell->setValue($dataset[0]);
             } else {
                 $cell->setValue("");
             }
             $td["attributes"] = $this->cell_attributes;
             $td["content"] = $cell->getValue();
             $tds[] = $td;
             array_shift($dataset);
         }
         $trs[] = $tds;
     }
     $data["trs"] = $trs;
     //pager
     if ($this->paged) {
         $data["pager"] = $this->navigator;
     }
     $this->output = $this->ci->load->view('datatable', $data, true);
     $this->rapyd->reset_view_path();
     return $this->output;
 }
Exemplo n.º 4
0
 /**
  * build , main build method
  *
  * @access   public
  * @return   string  datagrid output
  */
 function build($mivista = 'datagrid')
 {
     parent::build();
     if ($this->systemError != '') {
         //gestire l'errore in CI
     }
     return $this->output = $this->_buildGrid($mivista);
 }