Commit 172a0d93 authored by Patrick Barroca's avatar Patrick Barroca 😁
Browse files

Merge remote-tracking branch 'refs/remotes/origin/master' into dev#93553_federation_des_avis

Conflicts:
	cosmogramme/sql/patch/patch_377.php
	doc/extern_libs.org
	library/ZendAfi/View/Helper/Admin/HelpLink.php
	tests/db/UpgradeDBTest.php
parents 89526f39 a473cf1b
Pipeline #8310 passed with stage
in 78 minutes and 4 seconds
'55588' =>
['Label' => $this->_('Indexation en texte intégral des documents liés (pdf, html)'),
'Desc' => $this->_('Bokeh permet d\'indexer les fichiers décrits dans une zone des notices et présents dans sur le serveur d\'hébergement'),
'Image' => '',
'Video' => '',
'Category' => '',
'Right' => function($feature_description, $user) {return true;},
'Wiki' => 'http://wiki.bokeh-library-portal.org/index.php?title=Indexation_de_fichiers_li%C3%A9s_aux_notices',
'Test' => '',
'Date' => '2019-07-19'],
\ No newline at end of file
'86039' =>
['Label' => $this->_('SIGB Koha : réservation calendaire de lots d\'exemplaires'),
'Desc' => $this->_('Vous pouvez configurer Bokeh pour utiliser un autre formulaire de réservation sur les exemplaires considérés comme des malles. Ce formulaire affichera les réservations déjà enregistrées, ainsi que la saisie de dates de début et de fin de prêt souhaitées'),
'Image' => '',
'Video' => 'https://youtu.be/Wtg53t7dsGs',
'Category' => $this->('Circulation'),
'Right' => function($feature_description, $user) {return true;},
'Wiki' => 'http://wiki.bokeh-library-portal.org/index.php?title=R%C3%A9servation_calendaire_de_lots',
'Test' => '',
'Date' => '2019-07-26'],
\ No newline at end of file
......@@ -271,7 +271,10 @@ Edit /etc/mysql/my.cnf and add to the [mysqld] section the following line (in or
```
ft_min_word_len = 1
ft_stopword_list = /dev/null
```
The stopword list can be set to a file in which you can define any word to be ignored.
Restart mysql.
......
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 #55588 : Intégration : Indexation en texte intégral des documents liés aux notices (pdf, html)
\ No newline at end of file
- ticket #78968 : Intégration : Ajout de la possibilité de différencier les minuscules et majuscules dans les paramétrage des sections, genres et emplacements
\ No newline at end of file
- ticket #86039 : SIGB Koha : ajout de la réservation calendaire de lots d'exemplaires (malles)
\ No newline at end of file
- ticket #92386 : Import périodiques PMB
\ No newline at end of file
- ticket #94469 : Notices autorité : Ajout d'un écran de recherche / parcours des autorités
\ No newline at end of file
- ticket #95747 : Bokeh supporte l'extension PHP memcached
\ No newline at end of file
- ticket #96423 : SIGB Orphée : ajout d'une option pour activer les réservations à l'exemplaire
\ 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']);
......
......@@ -54,15 +54,9 @@ class AuthorController extends ZendAfi_Controller_Action {
protected function _addInspectorGadget($author) {
if (!$ig = Zend_Controller_Front::getInstance()
->getPlugin('ZendAfi_Controller_Plugin_InspectorGadget'))
return;
if(!$ig->isEnabled())
return;
$ig->addButton(new Class_Entity(['Label' => $this->_('Auteur Bokeh'),
'Content' => $this->view->renderAuthorMetadata($author)]));
if ($this->_isInspecting())
$this->_inspectorButton(new Class_Entity(['Label' => $this->_('Auteur Bokeh'),
'Content' => $this->view->renderAuthorMetadata($author)]));
}
......
<?php
/**
* Copyright (c) 2012-2019, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class AuthoritySearchController extends ZendAfi_Controller_Action {
public function indexAction() {
$criteres = (new Class_CriteresRecherche_Authority)->setParams($this->_request->getParams());
if ($this->_request->isPost()) {
$redirect_params = $criteres->getUrlCriteres();
return $this->_redirect($this->view->url($redirect_params, null, true),
['prependBase' => false]);
}
$prefs = $this->_getActionPreferences();
$this->view->titre = $prefs['titre'];
$this->view->tree_roots = $criteres->getParam('tree_roots');
$action_params = $criteres->getUrlWithoutExpression();
$this->view->form = (new ZendAfi_Form_AuthoritySearch())
->setAction($this->view->url($action_params, null, true));
$this->view->form->populate($this->_request->getParams());
if (($record_id = (int)$this->_getParam('record_id'))
&& ($record = Class_Notice::find($record_id)))
return $this->_handleRecord($record);
if ($criteres->isEmpty())
return; // do not search without criteria
$search_start_time = microtime(true);
$this->view->search_result = $search_result = Class_MoteurRecherche::getInstance()->lancerRecherche($criteres);
$search_result
->setDuration(microtime(true) - $search_start_time)
->setSettings(['liste_format' => Class_Systeme_ModulesAppli::LISTE_FORMAT_LINKS]);
if ($this->_isInspecting())
$this->_inspectorButton(new Class_Entity(['Label' => $this->_('Configuration de la recherche'),
'Content' => $this->view->searchInspector($search_result)]));
}
protected function _handleRecord($record) {
if ($this->_isInspecting())
$this->_inspectorButton(new Class_Entity(['Label' => $this->_('Notice Bokeh'),
'Content' => $this->view->notice_Unimarc($record)]));
return $this->view->record = $record;
}
}
......@@ -248,4 +248,74 @@ class BibController extends ZendAfi_Controller_Action {
$this->view->titre = $this->_('Carte des bibliothèques');
$this->view->libraries = Class_Bib::findAllWithCoordinates();
}
public function enLirePlusAction() {
$this->_initLibrary();
}
public function ouverturesAction() {
$this->_initLibrary();
}
public function informationsAction() {
$this->_initLibrary();
}
public function carteAction() {
$this->_initLibrary();
}
public function equipeAction() {
$this->_initLibrary();
}
public function agendaAction() {
$this->_initLibrary();
}
public function avisProAction() {
$this->_initProUser();
}
public function articlesProAction() {
$this->_initProUser();
}
public function selectionsProAction() {
$this->_initProUser();
}
protected function _initProUser() {
$this->_initLibrary();
if (!$pro = Class_Users::find($this->_getParam('pro_id'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'), ['status' => 'error']);
return $this->_redirectClose($this->_getReferer());
}
if (!$pro->canAccessBackend()) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'), ['status' => 'error']);
return $this->_redirectClose($this->_getReferer());
}
$this->view->pro = $pro;
}
protected function _initLibrary() {
if (!$this->view->library = Class_Bib::find($this->_getParam('id'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite.'), ['status' => 'error']);
return $this->_redirectClose($this->_getReferer());
}
}
}
\ No newline at end of file
......@@ -226,15 +226,34 @@ class CmsController extends ZendAfi_Controller_Action {
public function calendarAction() {
$viewRenderer = $this->getHelper('ViewRenderer');
if ($this->_getParam('render') === 'ajax')
$viewRenderer->setLayoutScript('empty.phtml');
$this->_initCalendarAndPreferences();
$id_module = $this->_getParam("id_module");
if ($this->_getParam('render') === 'ajax') {
$content = $this->view->calendarContent($this->view->calendar,
$this->view->preferences);
$script_loader = Class_ScriptLoader::getInstance();
$scripts = $script_loader
->addAdminScript('onload_utils')
->addJQueryReady('setupAnchorsTarget();')
->html();
$this->_helper->HTMLAjaxResponse($scripts . $content);
}
}
protected function _initCalendarAndPreferences() {
$id_module = $this->_getParam('id_module');
if (false !== strpos($id_module, 'library'))
return $this->_loadLibraryAgenda((int) filter_var($id_module, FILTER_SANITIZE_NUMBER_INT));
$module = Class_Profil::getCurrentProfil()->getModuleAccueilPreferences($id_module, 'CALENDAR');
$module_calendrier = new Class_Systeme_ModulesAccueil_Calendrier();
$preferences = array_merge($module_calendrier->getDefaultValues(),
Class_Profil::getCurrentProfil()->getModuleAccueilPreferences($id_module, 'CALENDAR'));
$module);
$preferences['ID_MODULE'] = $id_module;
$preferences['SELECT_ID_CAT'] = $preferences['display_cat_select']
? $this->_getParam('select_id_categorie')
......@@ -249,6 +268,16 @@ class CmsController extends ZendAfi_Controller_Action {
}
protected function _loadLibraryAgenda($id) {
$wrapper = new Intonation_Library_View_Wrapper_Library_RichContent_Agenda;
$wrapper
->setModel(Class_Bib::find($id))
->setView($this->view);
$this->view->preferences = $wrapper->getPreferences();
$this->view->calendar = $wrapper->getCalendar($this->_request->getParams());
}
/**
* @param int $id_module
......
......@@ -34,11 +34,8 @@ class ErrorController extends ZendAfi_Controller_Action {
$this->_response->clearBody();
if (($this->_request->getServer('HTTP_HOST') == 'localhost')
|| (($ig = Zend_Controller_Front::getInstance()
->getPlugin('ZendAfi_Controller_Plugin_InspectorGadget'))
&& $ig->isEnabled())
|| ((null != ($user = Class_Users::getLoader()->getIdentity()))
&& $user->isAdmin())) {
|| $this->_isInspecting()
|| Class_Users::isCurrentUserAdmin()) {
$this->view->errors = $errors;
return;
}
......
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