Commit 3b8f7ad4 authored by Laurent's avatar Laurent
Browse files

dev #92386 PMB serial articles : fix RT

parent 48c9cc96
Pipeline #8203 failed with stage
in 30 minutes and 13 seconds
'92386' =>
['Label' => $this->_('Import périodiques PMB'),
'Desc' => '',
'Image' => '',
'Video' => '',
'Category' => '',
'Right' => function($feature_description, $user) {return true;},
'Wiki' => '',
'Test' => '',
'Date' => '2019-05-15'],
\ No newline at end of file
......@@ -115,8 +115,8 @@ class NoticeAjaxController extends ZendAfi_Controller_Action {
public function exemplairesAction() {
if (($first_item = $this->notice->getFirstExemplaire()) && $first_item->isTypeSerialArticle())
$this->notice = $first_item->getPMBSerialRecord();
if ($this->notice->isFirstItemTypeSerialArticle())
$this->notice = $this->notice->getFirstExemplaire()->getPMBSerialRecord();
$nb_notices_oeuvre = Class_Notice::countBy(['clef_oeuvre' => $this->notice->getClefOeuvre(),
'id_notice not' => $this->notice->getId()]);
......
......@@ -271,7 +271,7 @@ class Class_Codification {
if (!$notice->isPeriodique())
return $me->_('Voir tous les tomes');
if (($first_item = $notice->getFirstExemplaire()) && $first_item->isTypeSerialArticle())
if ($notice->isFirstItemTypeSerialArticle())
return $me->_('Voir tous les articles de ce numéro');
return $me->_('Voir tous les numéros');
......
......@@ -1705,6 +1705,12 @@ class Class_Notice extends Storm_Model_Abstract {
return $type_doc->isSonore();
}
public function isFirstItemTypeSerialArticle() {
return ($first_item = $this->getFirstExemplaire()) && $first_item->isTypeSerialArticle();
}
public function toUnimarcISO2709() {
$unimarc = new Class_NoticeUnimarc_Writer();
$unimarc->setNotice($this->getUnimarc());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment