public function listAction()
 {
     $resul = Grupos::find(array('baja_logica=1', 'order' => 'id ASC'));
     $this->view->disable();
     foreach ($resul as $v) {
         $customers[] = array('id' => $v->id, 'grupo' => $v->grupo, 'sigla' => $v->sigla, 'descripcion' => $v->descripcion);
     }
     echo json_encode($customers);
 }
 public function indexAction($opcion = '')
 {
     $this->assets->addCss('/jqwidgets/styles/jqx.base.css')->addCss('/jqwidgets/styles/jqx.custom.css');
     $this->assets->addJs('/jqwidgets/jqxcore.js')->addJs('/jqwidgets/jqxmenu.js')->addJs('/jqwidgets/jqxdropdownlist.js')->addJs('/jqwidgets/jqxlistbox.js')->addJs('/jqwidgets/jqxcheckbox.js')->addJs('/jqwidgets/jqxscrollbar.js')->addJs('/jqwidgets/jqxgrid.js')->addJs('/jqwidgets/jqxdata.js')->addJs('/jqwidgets/jqxpanel.js')->addJs('/jqwidgets/jqxgrid.sort.js')->addJs('/jqwidgets/jqxgrid.pager.js')->addJs('/jqwidgets/jqxgrid.filter.js')->addJs('/jqwidgets/jqxgrid.selection.js')->addJs('/jqwidgets/jqxgrid.grouping.js')->addJs('/jqwidgets/jqxgrid.columnsreorder.js')->addJs('/jqwidgets/jqxgrid.columnsresize.js')->addJs('/jqwidgets/jqxdatetimeinput.js')->addJs('/jqwidgets/jqxcalendar.js')->addJs('/jqwidgets/jqxbuttons.js')->addJs('/jqwidgets/jqxdata.export.js')->addJs('/jqwidgets/jqxgrid.export.js')->addJs('/jqwidgets/globalization/globalize.js')->addJs('/jqwidgets/jqxgrid.aggregates.js')->addJs('/scripts/productos/index.js')->addJs('/media/plugins/bootbox/bootbox.min.js');
     $this->view->setVar('opcion', $opcion);
     $linea = $this->tag->select(array('linea_id', Lineas::find(array('baja_logica=1', 'order' => 'id ASC')), 'using' => array('id', "linea"), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required', 'title' => 'Campo requerido'));
     $this->view->setVar('linea', $linea);
     $grupo = $this->tag->select(array('grupo_id', Grupos::find(array('baja_logica=1', 'order' => 'id ASC')), 'using' => array('id', "grupo"), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required', 'title' => 'Campo requerido'));
     $this->view->setVar('grupo', $grupo);
     $tiempo = $this->tag->selectStatic(array("tiempo", array("Hora" => "Hora", "Dia" => "Dia", "Mensual" => "Mensual"), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required', 'title' => 'Campo requerido'));
     $this->view->setVar('tiempo', $tiempo);
 }
示例#3
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function update($id)
 {
     $grupo = Grupos::find($id);
     $grupo->update(Input::all());
     return Redirect::action('GruposController@index')->with('message', 'Grupo actualizado');
 }