available_filters['main_fields']['type'] = 'dsi_bannette_type';
}
protected function init_default_columns() {
$this->columns = array();
$this->add_column_selection();
$this->add_column('name', 'dsi_ban_form_nom');
$this->add_column('send_last_date');
$this->add_column('number_records');
$this->add_column('number_subscribed');
}
protected function _get_label_cell_header($name) {
global $msg, $charset;
switch ($name) {
case 'dsi_ban_form_nom':
return
"".htmlentities($msg['dsi_ban_form_nom'],ENT_QUOTES, $charset)."
".htmlentities($msg['dsi_ban_form_com_public'],ENT_QUOTES, $charset);
default:
return "".parent::_get_label_cell_header($name)."";
}
}
protected function get_cell_content($object, $property) {
global $charset;
$content = '';
switch($property) {
case 'name':
if ($object->proprio_bannette) {
$nom_bannette = "".htmlentities($object->nom_bannette,ENT_QUOTES, $charset)."" ;
} else {
$nom_bannette = htmlentities($object->nom_bannette,ENT_QUOTES, $charset) ;
}
$content .= "".$nom_bannette."
(".htmlentities($object->comment_public,ENT_QUOTES, $charset).")";
break;
case 'send_last_date':
$content .= "".htmlentities($object->aff_date_last_envoi,ENT_QUOTES, $charset)."";
if ($object->alert_diff) {
$content .= "
(".htmlentities($object->aff_date_last_remplissage,ENT_QUOTES, $charset).")";
} else {
$content .= "
(".htmlentities($object->aff_date_last_remplissage,ENT_QUOTES, $charset).")" ;
}
break;
case 'number_records':
$content .= "".$object->nb_notices."";
break;
case 'number_subscribed':
$content .= "".$object->nb_abonnes."";
break;
default :
$content .= parent::get_cell_content($object, $property);
break;
}
return $content;
}
/**
* Header de la liste
*/
public function get_display_header_list() {
$display = "