filters['empr_location_id'] = ''; } /** * Initialisation des colonnes disponibles */ protected function init_available_columns() { parent::init_available_columns(); $this->available_columns['main_fields']['nb_ouvrages'] = 'relance_recouvrement_nb_ouvrages'; $this->available_columns['main_fields']['somme_totale'] = 'relance_recouvrement_somme_totale'; } protected function init_default_columns() { global $pmb_lecteurs_localises; $this->add_column('cb', 'relance_recouvrement_cb'); $this->add_column('empr_name', 'relance_recouvrement_name'); if($pmb_lecteurs_localises) { $this->add_column('location', 'empr_location'); } $this->add_column('nb_ouvrages'); $this->add_column('somme_totale'); } protected function init_default_settings() { parent::init_default_settings(); $this->set_setting_display('search_form', 'visible', false); $this->set_setting_display('search_form', 'export_icons', false); $this->set_setting_display('query', 'human', false); $this->set_setting_column('default', 'align', 'left'); $this->set_setting_column('nb_ouvrages', 'align', 'center'); $this->set_setting_column('somme_totale', 'align', 'right'); } /** * Affichage d'une colonne * @param object $object * @param string $property */ protected function get_display_cell($object, $property) { $attributes = array( 'onclick' => "document.location=\"".$this->get_controller_url_base()."&act=recouvr_reader&id_empr=".$object->id_empr."\";" ); $content = $this->get_cell_content($object, $property); $display = $this->get_display_format_cell($content, $property, $attributes); return $display; } protected function get_cell_content($object, $property) { $content = ''; switch($property) { case 'cb': $content .= $object->empr_cb; break; case 'empr_name': $content .= $object->empr_nom." ".$object->empr_prenom; break; case 'location': $content .= $object->location_libelle; break; case 'somme_totale': $content .= comptes::format_simple($object->somme); break; default: $content .= parent::get_cell_content($object, $property); break; } return $content; } protected function get_selection_actions() { if(!isset($this->selection_actions)) { $this->selection_actions = array(); } return $this->selection_actions; } }