filters['id_entity'], false, array('id' => 'accounts_search_form_entities', 'name' => 'accounts_search_form_entities', 'onchange'=>'account_load_exercices(this.value);')), $search_form); $search_form = str_replace('!!selector_exercices!!', static::gen_selector_exercices($this->filters['id_entity'], 'accounts', $this->filters['id_exercice']), $search_form); $request_types = new marc_select('rent_request_type', 'accounts_search_form_request_types', $this->filters['id_request_type'], '', 0, $msg['acquisition_account_type_select_all']); $search_form = str_replace('!!selector_types!!', $request_types->display, $search_form); $search_form = str_replace('!!num_publisher!!', $this->filters['num_publisher'], $search_form); if($this->filters['num_publisher']) { $publisher = new editeur($this->filters['num_publisher']); $search_form = str_replace('!!publisher!!', $publisher->display, $search_form); } else { $search_form = str_replace('!!publisher!!', '', $search_form); } $search_form = str_replace('!!num_supplier!!', $this->filters['num_supplier'], $search_form); if($this->filters['num_supplier']) { $supplier = new entites($this->filters['num_supplier']); $search_form = str_replace('!!supplier!!', $supplier->raison_sociale, $search_form); } else { $search_form = str_replace('!!supplier!!', '', $search_form); } $search_form = str_replace('!!num_author!!', $this->filters['num_author'], $search_form); if($this->filters['num_author']) { $author = new auteur($this->filters['num_author']); $search_form = str_replace('!!author!!', $author->display, $search_form); } else { $search_form = str_replace('!!author!!', '', $search_form); } $search_form = str_replace('!!event_date_start!!', $this->filters['event_date_start'], $search_form); $search_form = str_replace('!!event_date_end!!', $this->filters['event_date_end'], $search_form); $search_form = str_replace('!!date_start!!', $this->filters['date_start'], $search_form); $search_form = str_replace('!!date_end!!', $this->filters['date_end'], $search_form); $search_form = str_replace('!!selector_request_status!!', $this->get_selector_request_status(), $search_form); $search_form = str_replace('!!link_add_request!!', './acquisition.php?categ=rent&sub=requests&action=edit&id=0', $search_form); $search_form = str_replace('!!json_filters!!', json_encode($this->filters), $search_form); $search_form = str_replace('!!page!!', $this->pager['page'], $search_form); $search_form = str_replace('!!nb_per_page!!', $this->pager['nb_per_page'], $search_form); $search_form = str_replace('!!pager!!', json_encode($this->pager), $search_form); $search_form = str_replace('!!messages!!', $this->get_messages(), $search_form); return $search_form; } /** * Liste des demandes */ public function get_display_content_list() { global $id_bibli; $display = ''; $parity=1; foreach ($this->objects as $account) { if ($parity % 2) { $pair_impair = "even"; } else { $pair_impair = "odd"; } $parity++; $td_javascript = " onmouseover=\"this.className='surbrillance'\" onmouseout=\"this.className='$pair_impair'\" "; $tr_css_style = ""; if($account->is_editable()) { $td_javascript .= " onmousedown=\"document.location='./acquisition.php?categ=rent&sub=requests&action=edit&id_bibli=".$id_bibli."&id=".$account->get_id()."';\" "; $tr_css_style = "style='cursor: pointer;'"; } $publisher_diplay = ''; if(isset($account->get_publisher()->display)) $publisher_diplay = $account->get_publisher()->display; $supplier_diplay = ''; if(isset($account->get_supplier()->raison_sociale)) $supplier_diplay = $account->get_supplier()->raison_sociale; $author_diplay = ''; if(isset($account->get_author()->display)) $author_diplay = $account->get_author()->display; $display .= ""; $display .= ''; $display .= ''.$account->get_id().''; $display .= ''.$account->get_user()->prenom.' '.$account->get_user()->nom.''; $display .= ''.$account->get_request_type_name().''; $display .= ''.formatdate($account->get_date()).''; $display .= ''.$account->get_title().''; $display .= ''.$publisher_diplay.''; $display .= ''.$supplier_diplay.''; $display .= ''.$author_diplay.''; $display .= ''.$account->get_formatted_event_date().''; $display .= ''.formatdate($account->get_receipt_limit_date()).''; $display .= ''.formatdate($account->get_receipt_effective_date()).''; $display .= ''.formatdate($account->get_return_date()).''; $display .= ''.$account->get_request_status_label().''; $display .= ''; } return $display; } /** * Header de la liste */ public function get_display_header_list() { global $msg; $display = " ".$this->_get_cell_header('id')." ".$this->_get_cell_header('num_user')." ".$this->_get_cell_header('request_type_name')." ".$this->_get_cell_header('date')." ".$this->_get_cell_header('title')." ".$this->_get_cell_header('num_publisher')." ".$this->_get_cell_header('num_supplier')." ".$this->_get_cell_header('num_author')." ".$this->_get_cell_header('event_date')." ".$this->_get_cell_header('receipt_limit_date')." ".$this->_get_cell_header('receipt_effective_date')." ".$this->_get_cell_header('return_date')." ".$this->_get_cell_header('request_status')." "; return $display; } /** * Affiche la recherche + la liste des demandes */ public function get_display_list() { global $msg, $charset; // Affichage du formulaire de recherche $display = $this->get_search_form(); // Affichage de la human_query $display .= $this->_get_query_human(); //Affichage de la liste des décomptes $display .= ""; $display .= $this->get_display_header_list(); if(count($this->objects)) { $display .= $this->get_display_content_list(); } $display .= "
"; $display .= $this->pager(); $display .= "
 
"; return $display; } }