Skip to content
Snippets Groups Projects
Commit 86827bbd authored by llaffont's avatar llaffont
Browse files

SIGB Orphee: get site label instead of library label in hold list

parent 06504f51
No related merge requests found
......@@ -30,6 +30,10 @@ class Class_Exemplaire extends Storm_Model_Abstract {
'bib' => ['model' => 'Class_Bib',
'referenced_in' => 'id_bib'],
'site' => ['model' => 'Class_CodifAnnexe',
'referenced_in' => 'annexe'],
'album' => ['model' => 'Class_Album',
'referenced_in' => 'id_origine'],
......@@ -54,6 +58,13 @@ class Class_Exemplaire extends Storm_Model_Abstract {
}
public function getLibelleSite() {
if (!$site = $this->getSite())
return '';
return $site->getLibelle();
}
public function getDateRetour() {
if ($this->hasPret())
return $this->getPret()->getDateRetour();
......
......@@ -87,7 +87,7 @@ class Class_WebService_SIGB_Orphee_GetLstPretResponseReader extends Class_WebSer
$this->_current_emprunt->getExemplaire()->setNoNotice($notice->getId());
$this->_current_emprunt->setTitre($notice->getTitrePrincipal());
$this->_current_emprunt->getExemplaire()->setBibliotheque($exemplaire_opac->getBib()->getLibelle());
$this->_current_emprunt->getExemplaire()->setBibliotheque($exemplaire_opac->getLibelleSite());
$this->_current_emprunt->setAuteur($notice->getAuteurPrincipal());
}
}
......
......@@ -133,6 +133,11 @@ class RechercheControllerAlbumAudioRecordViewNoticeTest extends RechercheControl
$this->assertEquals('unknown',
$this->_notice->getMorceaux()['morceaux'][1][3]['titre']);
}
/** @test */
public function titresFulltextShouldContainsMOONCHILD() {
$this->assertContains('MOONCHILD', $this->_notice->getRawAttributes()['titres']);
}
}
......
......@@ -716,14 +716,16 @@ class OrpheeServiceGetInfoUserCarteHenryDupontTest extends OrpheeServiceTestCase
$ex_potter = Class_Exemplaire::getLoader()
->newInstanceWithId(23)
->setCodeBarres('123456')
->setBib(Class_Bib::getLoader()
->newInstanceWithId(3)
->setLibelle('Annecy Bonlieu'))
->setAnnexe(3)
->setNotice(Class_Notice::getLoader()
->newInstanceWithId(5)
->setTitrePrincipal('Harry Potter')
->setAuteurPrincipal('Rowling'));
Class_CodifAnnexe::getLoader()
->newInstanceWithId(3)
->setLibelle('Annecy Bonlieu');
$ex_chemin = Class_Exemplaire::getLoader()
->newInstanceWithId(32)
......
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