object_type = AVIS_RECORDS;
parent::__construct($object_id);
}
protected function _get_select_query() {
return ", notice_id, niveau_biblio ";
}
protected function _get_join_query() {
return "left join notices on notices.notice_id=avis.num_notice ".self::check_records_read_rights()." ";
}
protected function _get_sort_query() {
return "order by index_serie, tnvol, index_sew ,dateAjout desc ";
}
public function get_display_list() {
global $pmb_javascript_office_editor;
global $begin_result_liste;
$query = $this->get_query();
$result = pmb_mysql_query($query);
$display = '';
if (pmb_mysql_num_rows($result)) {
//affichage des notices
$display .= "";
$display .= "";
$display .= $begin_result_liste;
$notice_id=0;
while ($row = pmb_mysql_fetch_object($result)) {
if ($notice_id!=$row->notice_id) {
if ($notice_id!=0) $display .= "
" ;
$notice_id=$row->notice_id;
if($row->niveau_biblio != 's' && $row->niveau_biblio != 'a') {
// notice de monographie
$link = notice::get_pattern_link();
$link_expl = exemplaire::get_pattern_link();
$link_explnum = explnum::get_pattern_link();
$mono = new mono_display($row->notice_id, 6, $link, 1, $link_expl, '', $link_explnum,1, 0, 1, 1);
$display .= pmb_bidi($mono->result);
} else {
// on a affaire à un périodique
$link_serial = serial::get_pattern_link();
$link_analysis = analysis::get_pattern_link();
$link_bulletin = bulletinage::get_pattern_link();
$link_explnum = "./catalog.php?categ=serials&sub=analysis&action=explnum_form&bul_id=!!bul_id!!&analysis_id=!!analysis_id!!&explnum_id=!!explnum_id!!";
$link_explnum_serial = "./catalog.php?categ=serials&sub=explnum_form&serial_id=!!serial_id!!&explnum_id=!!explnum_id!!";
$serial = new serial_display($row->notice_id, 6, $link_serial, $link_analysis, $link_bulletin, "", $link_explnum_serial, 0, 0, 1, 1, true, 1 );
$display .= pmb_bidi($serial->result);
}
$display .= "