Skip to content
Snippets Groups Projects
Commit a75664f2 authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

Merge branch 'hotline' into 'master'

Hotline

See merge request !3718
parents 09224a15 9928a4da
Branches
Tags
1 merge request!3718Hotline
Pipeline #11551 failed with stage
in 58 minutes and 37 seconds
Showing
with 101 additions and 22 deletions
- ticket #118258 : Moteur de recherche : correction d'une erreur SQL sur la recherche des notices similaires lorsque l'éditeur contient un apostrophe suivi d'un espace
\ No newline at end of file
- ticket #118865 : Magasin de thèmes : Les carrousels sont améliorés, vous pouvez maintenant configurer la taille de la description des documents affichés.
\ No newline at end of file
- ticket #120102 : Magasin de thèmes : Vérification du profil de test avant l'essai d'un thème
\ No newline at end of file
- ticket #120180 : Export JSON : refonte de la balise "keyword" pour pouvoir renseigner les noms des champs personnalisés dans les articles
\ No newline at end of file
- ticket #120225 : Export JSON : export de l'URL absolue des images dans les balises "html" et "description" pour le contenu des articles
\ No newline at end of file
- ticket #120623 : Correction d'une faille XSS sur la page notice
\ No newline at end of file
- ticket #120776 : Magasin de thèmes : amélioration du comportement des badges quand on ajoute la class no_truncate. Celle-ci ajoute un retour à la ligne automatique au badge.
\ No newline at end of file
- ticket #120781 : Magasin de thèmes : Gestion des badges d'horaires des articles.
\ No newline at end of file
- ticket #120921 : SIGB Orphée : Correction prise en compte de la disponibilité des exemplaires selon la configuration du SIGB
\ No newline at end of file
- ticket #121056 : le formulaire de contact prend correctement en compte la configuration de selection de la bibliothèque
\ No newline at end of file
......@@ -45,19 +45,50 @@ class Admin_TemplateController extends ZendAfi_Controller_Action {
}
public function tryAction() {
if(!$template = (new Class_Template_Loader)->find($this->_getParam('template'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite. Vous ne pouvez pas tester le thème'));
public function checkBeforeTryAction(){
if (!$params = $this->_checkTryParams())
return $this->_redirectToIndex();
}
if(!$profile = Class_Profil::find($this->_getParam('on'))) {
$this->_helper->notify($this->_('Une erreur c\'est produite. Vous ne pouvez pas tester le thème'));
$this->view->template = $params->getTemplate();
$this->view->titre = $this->_('Veuillez choisir le profil qui sera utilisé pour tester le thème %s',
$this->view->template->getTitle());
$control_key = $this->view->template->getControlKey($params->getProfile());
if ($this->view->profile = Class_Profil::findFirstBy(['commentaire' => $control_key]))
return;
$this->_forward('try');
}
protected function _checkTryParams(){
if(($profile = Class_Profil::find($this->_getParam('on')))
&& ($template = (new Class_Template_Loader)->find($this->_getParam('template'))))
return new Class_Entity([ 'Profile' => $profile, 'Template' => $template] );
$this->_helper->notify($this->_('Une erreur s\'est produite. Vous ne pouvez pas tester le thème'));
return null;
}
public function tryOnNewProfileAction(){
if (!$params = $this->_checkTryParams())
return $this->_redirectToIndex();
}
if(!$id_profile = $template->tryOn($profile)) {
$this->_helper->notify($this->_('Une erreur c\'est produite. Vous ne pouvez pas tester le thème'));
$params->getTemplate()->removeControlKeys($params->getProfile());
$this->_forward('try');
}
public function tryAction() {
if (!$params = $this->_checkTryParams())
return $this->_redirectToIndex();
if(!$id_profile = $params->getTemplate()->tryOn($params->getProfile())) {
$this->_helper->notify($this->_('Une erreur s\'est produite. Vous ne pouvez pas tester le thème'));
return $this->_redirectToIndex();
}
......
<?php
$html = [
$this->tagAnchor($this->template->getTryOnNewProfileUrl(),
$this->_('Nouveau profil'),
['class'=> 'admin-button']),
$this->tagAnchor($this->template->getTryUrl(),
$this->_('Continuer avec %d : %s',
$this->profile->getId(),
$this->profile->getLibelle()),
['class'=> 'admin-button'])
];
echo implode($html);
......@@ -81,8 +81,6 @@ class FormulaireController extends ZendAfi_Controller_Action {
->setView($this->view)
->initForm();
$this->view->form->displayBibSelector();
if (! $this->_request->isPost())
return;
......
......@@ -397,7 +397,9 @@ class RechercheController extends ZendAfi_Controller_Action {
$this->view->url_panier = $this->view->url(['controller' => 'panier',
'action' => 'add-record-ajax',
'id_notice' => $id_notice]);
'id_notice' => $id_notice],
null,
true);
$this->_helper->trackEvent('recherche',
'notice',
......
......@@ -23,6 +23,7 @@
class WidgetController extends ZendAfi_Controller_Action {
public function renderAction() {
$callback = function() {
if (!$id = $this->_getParam('widget_id'))
return '';
......@@ -34,8 +35,9 @@ class WidgetController extends ZendAfi_Controller_Action {
if ($widget = ((new Class_Systeme_Widget_Widget)
->setId($id)
->setProfileId($profile_id)
->load()))
->load())) {
return Class_Template::current()->renderWidget($widget, $this->view);
}
};
return $this->_helper->iframe($callback);
......
......@@ -13,10 +13,10 @@
// Combo des profils pour les admins
if(Class_Users::getLoader()->isCurrentUserCanAccesBackend()) {
echo '<td style="text-align:center; white-space: nowrap">';
echo $this->tagAnchor(['module' => 'admin',
'controller' => 'profil',
'action' => 'accueil',
'id_profil' => $profil->getId()],
echo $this->tagAnchor($this->url(['module' => 'admin',
'controller' => 'profil',
'action' => 'accueil',
'id_profil' => $profil->getId()], null, true),
$this->tagImg(URL_ADMIN_IMG.'ico/edit.gif',
['alt' => $this->_("Paramétrer cette page"),
......
......@@ -14,7 +14,7 @@ echo $this->toolbar($this->_("Recherche"),
<p><?php echo $this->notice->getAuteurPrincipal();?></p>
<p><?php if ($annee = $this->notice->getAnnee())
echo $this->_('Année')," : ", $annee;?></p>
<p><?php if ($editeur = $this->notice->getEditeur())
<p><?php if ($editeur = $this->notice->getFirstEditeur())
echo $this->_('Editeur(s)')," : ", $editeur;
......
......@@ -98,6 +98,12 @@ class KohaRecordIntegrationBdMilleniumTest extends KohaRecordIntegrationTestCase
}
/** @test */
public function editorDupuisShouldBeIndexedOnSave() {
$this->assertEquals('DUPUIS DUPUI', $this->notice_integration->noticeToDBEnreg()['editeur']);
}
/** @test */
public function firstItemIdDataProfileShouldBe45() {
$this->assertEquals(45, Class_Exemplaire::find(1)->getIdDataProfile());
......
......@@ -57,6 +57,10 @@ class Class_Article_Openagenda {
$this->_datas = $this->_applyMapping($this->_field_map, $attributes, true);
$this->_datas['updatedAt'] = date('c', strtotime($this->_datas['updatedAt']));
$transformer = new Class_CmsUrlTransformer();
$this->_datas['html'] = $transformer->imgUrlRelativeToAbsolute($this->_datas['html']);
$this->_datas['description'] = $transformer->imgUrlRelativeToAbsolute($this->_datas['description']);
$this
->_applyLocation()
->_applyTimings()
......@@ -82,17 +86,26 @@ class Class_Article_Openagenda {
protected function _applyCustomFields() {
if (!isset($this->_datas['keywords']))
$this->_datas['keywords'] = '';
$this->_datas['keywords'] = isset($this->_datas['keywords'])
? $this->_datas['keywords'].';'
: '';
$custom_values = Class_CustomField_Value::findAllByInstance($this->_article);
$values = array_map(function($custom_value)
{
return implode(';', $custom_value->getValueAsArray());
},
Class_CustomField_Value::findAllByInstance($this->_article));
$custom_values);
$this->_datas['keywords'] .= implode (';', array_filter($values));
$this->_datas['tagGroups'] = [];
foreach($custom_values as $custom_value)
$this->_datas['tagGroups'][] = ['uid' => $custom_value->getFieldId(),
'name' => $custom_value->getLabel(),
'tags' => $custom_value->getValueAsArray() ];
return $this;
}
......
......@@ -121,7 +121,9 @@ class Class_CompareUrl {
public static function getRequestPath() {
return static::getRequest()->getPathInfo();
return ($request = static::getRequest())
? $request->getPathInfo()
: '';
}
......
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