Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
No results found
Show changes
Commits on Source (21)
Showing
with 1505 additions and 1218 deletions
10/09/2019 - v8.0.24
- ticket #96451 : Mail : correction de l'encodage des mails dont les sujets dépassent 78 caractères
- ticket #95613 : Redmine : accès aux pièces jointes de la forge via Bokeh
20/08/2019 - v8.0.23
- ticket #94332 : WebService : amélioration de l'affichage des sites de retraits des reservations.
- ticket #95190 : Administration : Export CSV des médias
- ticket #68507 : WebService Koha : Correction du format de la date de naissance dans le formulaire de pré-inscription.
- ticket #93504 : Bibliothèque numérique : pouvoir ouvrir/télécharger des images avec l'extension JPG
- ticket #94528 : Arte VOD : Maintenance du connecteur
- ticket #93542 : Affichage des vignettes : prise en compte des champs unimarc spécifiés dans la configuration du profil
- ticket #95885 : Version Mobile : Affichage des horaires d'ouvertures dans la fiche bibliothèque.
29/07/2019 - v8.0.22
- ticket #80976 : Page notice : connecté en tant qu'administrateur, l'outil "Inspector Gadget" permet de supprimer un exemplaire
......
- ticket #93504 : Bibliothèque numérique : pouvoir ouvrir/télécharger des images avec l'extension JPG
\ No newline at end of file
- ticket #93542 : Affichage des vignettes : prise en compte des champs unimarc spécifiés dans la configuration du profil
\ No newline at end of file
- ticket #94528 : Arte VOD : Maintenance du connecteur
\ No newline at end of file
- ticket #94530 : connecteur Philharmonie Paris : nouvelle url de moissonnage prise en compte
\ No newline at end of file
- ticket #95747 : Bokeh supporte l'extension PHP memcached
\ No newline at end of file
......@@ -119,7 +119,8 @@ class Admin_AlbumController extends ZendAfi_Controller_Action {
$form = $this->_formImportEAD();
$this->view->form_import_ead = $form;
$this->view->form_export_ead = $this->_formExportEad();
$this->view->form_export_ead = $this->_formExport();
$this->view->form_export_csv = $this->_formExport('csv');
if (!$this->_request->isPost())
return;
......@@ -159,12 +160,12 @@ class Admin_AlbumController extends ZendAfi_Controller_Action {
}
protected function _formExportEAD() {
protected function _formExport($type='ead') {
return $this->view
->newForm(['id' => 'export_ead', 'class' => 'form'])
->setMethod('post')
->setAttrib('enctype', 'multipart/form-data')
->setAction($this->view->url(['action' => 'export-ead']))
->setAction($this->view->url(['action' => 'export-'.$type]))
->addElement('select',
'cat_id',
['style' => 'max-width:445px;',
......@@ -172,12 +173,34 @@ class Admin_AlbumController extends ZendAfi_Controller_Action {
'required' => true,
'multiOptions' => ['' => $this->_('Choisissez une catégorie')]
+ Class_AlbumCategorie::getAllLibelles()])
->addElement('submit', 'submit', ['label' => 'Exporter en EAD']);
->addElement('submit', 'submit', ['label' => 'Exporter en ' . strtoupper($type)]);
}
public function exportCsvAction() {
$description = (new Class_TableDescription('ressources'))
->addColumn($this->_('Categorie'), 'album_category_absolute_path')
->addColumn($this->_('Titre Album'), 'titre_album')
->addColumn($this->_('Description Album'), 'description_album')
->addColumn($this->_('Date'), 'annee')
->addColumn($this->_('Créateur'), 'auteur')
->addColumn($this->_('Editeur'), 'editeur')
->addColumn($this->_('Titre'), 'titre')
->addColumn($this->_('Description'), 'description')
->addColumn($this->_('Ressource'), 'play_ressource_url');
$categories = [Class_AlbumCategorie::find($this->_getParam('cat_id',1))];
$datas = [];
foreach(Class_AlbumCategorie::getAlbumsFromCategories([$this->_getParam('cat_id',1)]) as $album)
$datas = array_merge($album->getRessources(),$datas);
return $this->_helper->csv('export.csv',
$this->view->renderCsv($description, $datas));
}
public function exportEadAction() {
$form = $this->_formExportEAD();
$form = $this->_formExport();
if ($form->isValid($this->_request->getPost())) {
$this->getHelper('ViewRenderer')->setNoRender();
$response = $this->_response;
......
......@@ -175,6 +175,21 @@ class Admin_RedmineController extends ZendAfi_Controller_Action {
}
public function downloadFileAction() {
$library = Class_Bib::find($this->_getParam('id_lib', 0));
$service = new Class_WebService_Redmine($library);
$fileid = $this->_getParam('fileid');
if (!$content = $service->downloadFile($fileid)) {
$this->_helper->notify($this->_('Impossible de télécharger cette pièce jointe'));
$this->_redirectToReferer();
return;
}
$this->_helper->binaryDownload($content, $this->_getParam('filename'));
}
public function uploadFileAction() {
if (!$this->_request->isPost())
return $this->_jsonError($this->_('La requête doit être de type POST'));
......
......@@ -3,4 +3,5 @@ echo $this->tag('h2', $this->_('Import'));
echo $this->renderForm($this->form_import_ead);
echo $this->tag('h2', $this->_('Export'));
echo $this->renderForm($this->form_export_ead);
echo $this->renderForm($this->form_export_csv);
?>
......@@ -557,11 +557,8 @@ class AuthController extends ZendAfi_Controller_Action {
if ('' != $this->_getParam('emailCheck'))
return $this->_redirect('/');
$form = $pre_registration
->getForm()
->populate(ZendAfi_Filters_Post::filterStatic($this->_request->getParams()));
$this->view->form = $form;
$this->view->form =
$form->populate(ZendAfi_Filters_Post::filterStatic($this->_request->getParams()));
$data = ZendAfi_Filters_Post::filterStatic($this->_request->getPost());
unset($data['emailCheck']);
......
......@@ -743,8 +743,11 @@ class RechercheController extends ZendAfi_Controller_Action {
'class' => 'zend_form reservation_pickup',
'action' => $this->view->url(['controller' => 'recherche',
'action' => $action])])
->addElement('Radio', 'code_annexe', ['required' => true,
'allowEmpty' => false])
->addElement('Radio',
'code_annexe',
['required' => true,
'allowEmpty' => false,
'escape' => false])
->addDisplayGroup(['code_annexe'], 'group', ['legend' => 'Site de retrait']);
}
......
<?php echo $this->toolbar($this->_("Bib"));?>
<h1><?php echo $this->escape($this->bib->getLibelle());?></h1>
<ul data-role="listview">
<li data-role="list-divider"><?php echo $this->_('Coordonnées')?></li>
<li>
<div style="float:left"><?php echo $this->mapForLieu($this->bib->answersLocation(),
array('size' => '100x100')); ?></div>
<address>
<?php echo nl2br($this->bib->getAdresse());?><br>
<?php echo $this->bib->getCp();?> <?php echo $this->bib->getVille();?>
</address>
<div class="clear"></div>
</li>
<?php if ($this->bib->getTelephone()) { ?>
<li><?php echo $this->bib->getTelephone();?></li>
<?php } ?>
<?php if ($this->bib->getMail()) { ?>
<li><a href="mailto:<?php echo $this->bib->getMail();?>"><?php echo $this->bib->getMail();?></a></li>
<?php } ?>
<?php if ($this->bib->getHoraire()) { ?>
<li data-role="list-divider"><?php echo $this->_('Horaires')?></li>
<li>
<?php echo nl2br(urldecode($this->bib->getHoraire()));?>
</li>
<?php } ?>
</lu>
<?php
echo $this->renderLibrary($this->bib);
- ticket #96549 : SIGB Orphée : les exemplaires avec la situation "en réserve" sont réservables
\ No newline at end of file
......@@ -50,6 +50,7 @@ class notice_unimarc extends iso2709_record {
private $id_genre_documentaire; // Identifiant pour le genre "documentaire"
private $controle_codes_barres; // Exception de filtrage des codes-barres
protected $_id_bib; // Bibliotheque d'intégration
protected $_fluent; // Class_NoticeUnimarc_Fluent
public function __construct($id_bib=null) {
......@@ -94,10 +95,18 @@ class notice_unimarc extends iso2709_record {
}
$this->setNotice($data, $this->profil['accents']);
$this->_fluent = null;
return true;
}
protected function _getFluent() {
return $this->_fluent
? $this->_fluent
: $this->_fluent = Class_NoticeUnimarc_Fluent::fromLegacy($this);
}
public function updateItemsWithUrl(&$exemplaires) {
if (!$champ_url = $this->profil['attributs'][Class_IntProfilDonnees::FT_RECORDS][Class_IntProfilDonnees::FIELD_ITEM_URL])
return $this;
......@@ -187,7 +196,7 @@ class notice_unimarc extends iso2709_record {
$notice["dewey"] = $this->getDewey();
$notice["thesauri"] = $this->getThesauri($notice);
$notice["thesauri"] = $this->getThesauri();
$notice["pcdm4"] = $this->getPcdm4();
......@@ -1258,7 +1267,7 @@ class notice_unimarc extends iso2709_record {
}
public function getThesauri($notice) {
public function getThesauri() {
return array_merge($this->_findThesauriIn686(),
$this->_findOtherThesauri());
......@@ -1271,27 +1280,34 @@ class notice_unimarc extends iso2709_record {
}
/** @return array thesaurus list */
protected function _findThesauriIn686() {
$thesaurus = [];
$data = $this->get_subfield('686');
$thesauri = $this
->_getFluent()
->zonesCollect(function($zone)
{
return $this->_findThesauriIn686Zone($zone);
});
foreach($data as $items) {
$sous_champs = $this->decoupe_bloc_champ($items);
$code_thesaurus = null;
$id_origine = null;
foreach($sous_champs as $item) {
if ($item["code"] == "a")
$id_origine = $item['valeur'];
if ($item["code"] == "2")
$code_thesaurus = trim($item['valeur']);
if ($code_thesaurus && $id_origine ) {
$thesaurus[] = Class_CodifThesaurus::findByIdOrigineAndCode($id_origine,
$code_thesaurus);
}
}
}
return $thesaurus;
return array_filter($thesauri->getArrayCopy());
}
/**
* @param $zone Class_NoticeUnimarc_Zone
* @return Class_CodifThesaurus
*/
protected function _findThesauriIn686Zone($zone) {
if (!$zone->isLabel('686'))
return;
$id_field = $zone->detectFieldByCode('a');
$code_field = $zone->detectFieldByCode('2');
return $id_field && $code_field
? Class_CodifThesaurus::findByIdOrigineAndCode($id_field->getValue(),
trim($code_field->getValue()))
: null;
}
......
01762njm0 2200313 450 00100060000001000110000610000450001720000220006221000260008422500320011041000230014246400540016546400610021946401950028060600110047560600220048668600760050868600390058470000310062370200200065470200230067471200670069771200280076480100170079290003240080999300150113399501370114899601630128511785 d41,5 F a20110812u u u0frey50 1 aSuites de ballets cPolydordRééd. 19932 aPanorama classique9id:2999 0tPanorama classique tLe Lac des cygnes:suite extraite du ballet op. 20 tLa belle au bois dormant:suite extraite du ballet op. 66 tCasse-noisette:suite extraite du ballet op. 71/ Piotr Ilyich Tchaïkovski, Witold Rowicki, dir., Ferdinand Leitner, dir., Orchestre Symphonique de la Philharmonie Nationale de Varsovie, Berl 1aballet amusique classique a3tMusique classique (Musique savante de tradition occidentale)2Cestas aAdultestAdultes2Code stat Cestas 1aTchaïkovskibPiotr Ilyich 1aRowickibWitold 1aLeitnerbFerdinand02aOrchestre Symphonique de la Philharmonie Nationale de Varsovie 1aBerliner Philharmoniker 2aFrc20190726 aLe Lac des cygnes:suite extraite du ballet op. 20 ; La belle au bois dormant:suite extraite du ballet op. 66 ; Casse-noisette:suite extraite du ballet op. 71/ Piotr Ilyich Tchaïkovski, Witold Rowicki, dir., Ferdinand Leitner, dir., Orchestre Symphonique de la Philharmonie Nationale de Varsovie, BerllContientntracks 41a0-4 ans aMédiathèque de Cestasf35025224k3 TCH 28m20190726qdrjeopv12[DISPO][Disponible][0][1][En rayon][0][0][0][0]50641758191  f35025224k3 TCH 28m00000000n00000000aFonds propreb2vMédiathèque MunicipalexCompact disques adulteeCompact disque adulterCD1Document en bon état31
\ No newline at end of file
......@@ -138,6 +138,14 @@ class Class_AlbumRessource extends Storm_Model_Abstract {
}
/**
* @return String
*/
public function getDescriptionAlbum() {
return $this->getAlbum()->getDescription();
}
/**
* @return string
*/
......@@ -146,6 +154,14 @@ class Class_AlbumRessource extends Storm_Model_Abstract {
}
/**
* @return string
*/
public function getAlbumCategoryAbsolutePath() {
return $this->getAlbum()->getCategorie()->getAbsolutePath();
}
/**
* @return String
*/
......
......@@ -278,11 +278,9 @@ class CodifThesaurusLoader extends Storm_Model_Loader {
* @param int
* $return Class_CodifThesaurus
*/
public function findByIdOrigineAndCode($id_origine,$code_thesaurus) {
if ($thesaurus = Class_CodifThesaurus::findFirstBy(['id_origine' => $id_origine,
'code' => $code_thesaurus ]))
return $thesaurus;
return Class_CodifThesaurus::findFirstBy(['id_origine' => $id_origine]);
public function findByIdOrigineAndCode($id_origine, $code_thesaurus) {
return Class_CodifThesaurus::findFirstBy(['id_origine' => $id_origine,
'code' => $code_thesaurus ]);
}
......
......@@ -25,6 +25,13 @@ class Class_NoticeUnimarc_Fluent {
$_label,
$_zones;
/** @param $reader Class_NoticeUnimarc */
public static function fromLegacy($reader) {
return (new Class_NoticeUnimarc_LegacyVisitor())
->legacyToFluent($reader);
}
public function __construct() {
$this->_label = new Class_NoticeUnimarc_BibliographicLabel();
$this->_zones = new Storm_Collection();
......@@ -65,20 +72,26 @@ class Class_NoticeUnimarc_Fluent {
}
public function zonesCollect($callback) {
return $this->_zones->collect($callback);
}
public function render() {
$address = 0;
$directory = '';
$zones = implode($this->_zones
->collect(
function($zone) use(&$address, &$directory) {
$marc = $zone->render();
$length = strlen($marc);
$directory .= $zone->directoryWith($length, $address);
$address += $length;
return $marc;
})
->getArrayCopy());
$zones = $this
->zonesCollect(function($zone) use(&$address, &$directory)
{
$marc = $zone->render();
$length = strlen($marc);
$directory .= $zone->directoryWith($length, $address);
$address += $length;
return $marc;
});
$zones = implode($zones->getArrayCopy());
$zones .= chr(0x1d);
$directory .= chr(0x1e);
......@@ -183,6 +196,11 @@ class Class_NoticeUnimarc_Zone {
}
public function isLabel($label) {
return $label == $this->_label;
}
public function content($content) {
$this->_content = $content;
$this->_sub_zones = new Storm_Collection();
......@@ -192,9 +210,17 @@ class Class_NoticeUnimarc_Zone {
public function children($children) {
foreach($children as $code => $value)
$this->_sub_zones->append((new Class_NoticeUnimarc_SubZone)->code($code)->value($value));
$this->_content = null;
$this->addChild($code, $value);
return $this;
}
public function addChild($code, $value) {
$this->_sub_zones
->append((new Class_NoticeUnimarc_SubZone)->code($code)->value($value));
$this->_content = null;
return $this;
}
......@@ -205,6 +231,19 @@ class Class_NoticeUnimarc_Zone {
}
public function detectFieldByCode($code) {
return $this->detectField(function($field) use($code)
{
return $field->isCode($code);
});
}
public function detectField($callback) {
return $this->_sub_zones->detect($callback);
}
public function render() {
$content = $this->_content
? $this->_content
......@@ -234,13 +273,60 @@ class Class_NoticeUnimarc_SubZone {
}
public function isCode($code) {
return $code == $this->_code;
}
public function value($value) {
$this->_value = $value;
return $this;
}
public function getValue() {
return $this->_value;
}
public function render() {
return chr(0x1f) . $this->_code . $this->_value;
}
}
class Class_NoticeUnimarc_LegacyVisitor {
protected $_fluent;
public function __call($name, $args) {
if ('visit' === substr($name, 0, 5))
return $this;
throw new RuntimeException('Call to undefine method Class_NoticeUnimarc_LegacyVisitor::' . $name);
}
public function legacyToFluent($reader) {
$this->_fluent = new Class_NoticeUnimarc_Fluent;
$reader->acceptVisitor($this);
return $this->_fluent;
}
public function visitZone($label, $definition) {
$zone = $this->_fluent->newZone()->label($label);
$fields = $definition['champs'];
if (1 == count($fields) && '' === $fields[0]['code']) {
$zone->content($fields[0]['valeur']);
return $this;
}
foreach($fields as $field)
$zone->addChild(substr($field['code'], 1, 1), $field['valeur']);
return $this;
}
}
\ No newline at end of file