Commit ab124b2c authored by Ghislain Loas's avatar Ghislain Loas
Browse files

wip on bootstrap

parent 801edd13
Pipeline #9272 passed with stage
in 45 minutes and 12 seconds
......@@ -52,6 +52,10 @@ class AbonneController extends ZendAfi_Controller_Action {
$this->_request->setDispatched();
return;
}
$this->view->_current_module['controller'] = 'abonne';
$this->view->_current_module['action'] = 'fiche';
$this->view->_current_module['action2'] = '';
}
......
......@@ -28,6 +28,10 @@ class AuthorController extends ZendAfi_Controller_Action {
parent::preDispatch();
if (!$this->_author = $this->view->author = $this->_findAuthor())
throw new Zend_Controller_Action_Exception($this->view->_('Désolé, cette page n\'existe pas'), 404);
$this->view->_current_module['controller'] = 'author';
$this->view->_current_module['action'] = 'view';
$this->view->_current_module['action2'] = '';
}
......
......@@ -25,6 +25,10 @@ class BibController extends ZendAfi_Controller_Action {
public function preDispatch() {
parent::preDispatch();
$this->_helper->librarySelection();
$this->view->_current_module['controller'] = 'bib';
$this->view->_current_module['action'] = 'en-lire-plus';
$this->view->_current_module['action2'] = '';
}
......
......@@ -29,6 +29,15 @@ class RecordController extends ZendAfi_Controller_Action {
$this->_helper->notify($this->_('Impossible d\'afficher les donnés. Le document est introuvable'));
$this->_redirectToIndex();
}
$this->view->_current_module['controller'] = 'recherche';
$this->view->_current_module['action'] = 'viewnotice';
$this->view->_current_module['action2'] = $this->view->record->getTypeDoc();
$this->view->notice_navigation =
new Class_Notice_NavigationRecherche((new Class_CriteresRecherche)->setParams($this->_request->getParams()),
Class_MoteurRecherche::getInstance(),
$this->view->record);
}
......
......@@ -92,4 +92,11 @@ class Class_Notice_NavigationRecherche {
public function hasCriteria() {
return !empty($this->_criteres_recherche->getCriteres());
}
public function getBackToListUrl() {
return Class_Url::absolute($this->_criteres_recherche->getUrlRetourListe(), null, true)
. '#'
. $this->_current_notice->getId();
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2017, 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 Class_Systeme_ModulesAccueil_Action_Author extends Class_Systeme_ModulesAccueil_Action {
public function __construct() {
parent::__construct();
$this->_form = 'ZendAfi_Form_Configuration_Widget_Action_Author';
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2017, 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 Class_Systeme_ModulesAccueil_Action_Library extends Class_Systeme_ModulesAccueil_Action {
public function __construct() {
parent::__construct();
$this->_form = 'ZendAfi_Form_Configuration_Widget_Action_Library';
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2017, 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 Class_Systeme_ModulesAccueil_Action_Record extends Class_Systeme_ModulesAccueil_Action {
public function __construct() {
parent::__construct();
$this->_form = 'ZendAfi_Form_Configuration_Widget_Action_Record';
}
}
\ No newline at end of file
......@@ -23,6 +23,8 @@ class Class_Systeme_ModulesAccueil_Action_SearchResult extends Class_Systeme_Mod
public function __construct() {
parent::__construct();
$this->_libelle = $this->_('Configuration du résultat de recherche');
$this->_defaultValues['titre'] = $this->_libelle;
$this->_form = 'ZendAfi_Form_Configuration_Widget_Action_SearchResult';
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2017, 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 Class_Systeme_ModulesAccueil_Action_User extends Class_Systeme_ModulesAccueil_Action {
public function __construct() {
parent::__construct();
$this->_form = 'ZendAfi_Form_Configuration_Widget_Action_User';
}
}
\ No newline at end of file
......@@ -116,11 +116,6 @@ class Class_Systeme_Widget_Action extends Class_Systeme_Widget_Abstract {
}
protected function _getTitle() {
return $this->getLabel();
}
public function getWidgets() {
return [];
}
......
<?php
/**
* Copyright (c) 2012-2018, Agence Française Informatique (AFI). All rights reserved.
* Copyright (c) 2012-2017, 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
......@@ -20,21 +20,13 @@
*/
class Intonation_View_RenderRecord_Summary extends Intonation_View_RenderRecord {
public function RenderRecord_Summary($record) {
$html = $this->renderRecord($record);
$this->view->titre = $this->_('%s : Résumé', $this->view->titre);
return $html;
class Class_Systeme_Widget_Action_Author extends Class_Systeme_Widget_Action {
public function getResourcesDefinition() {
return (new Class_Systeme_ModulesAccueil_Action_Author);
}
protected function _showSections($sections) {
foreach($sections as $section)
if ('summary' == $section->getClass())
return $section
->beActive()
->beVisible();
public function _getTitle() {
return $this->_('Configuration de la page auteur');
}
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, 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 Class_Systeme_Widget_Action_Library extends Class_Systeme_Widget_Action {
public function getResourcesDefinition() {
return (new Class_Systeme_ModulesAccueil_Action_Library);
}
public function _getTitle() {
return $this->_('Configuration de la page bibliothèque');
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, 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 Class_Systeme_Widget_Action_Record extends Class_Systeme_Widget_Action {
public function getResourcesDefinition() {
return (new Class_Systeme_ModulesAccueil_Action_Record);
}
public function _getTitle() {
$id = $this->getId();
$id = explode('_' , $id);
$id = array_pop($id);
$doc_type = Class_TypeDoc::find($id);
return $doc_type
? $this->_('Configuration de la page des documents de type %s', strtolower($doc_type->getLabel()))
: $this->_('Configuration de la page des documents');
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, 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 Class_Systeme_Widget_Action_User extends Class_Systeme_Widget_Action {
public function getResourcesDefinition() {
return (new Class_Systeme_ModulesAccueil_Action_User);
}
public function _getTitle() {
return $this->_('Configuration de la page compte');
}
}
\ No newline at end of file
......@@ -32,6 +32,17 @@ class Class_Systeme_Widget_ActionLoader {
protected function _getActions() {
return ['recherche_resultat_simple' => 'Class_Systeme_Widget_Action_SearchResult'];
$record_action = 'Class_Systeme_Widget_Action_Record';
$actions = ['recherche_resultat_simple' => 'Class_Systeme_Widget_Action_SearchResult',
'recherche_viewnotice' => 'Class_Systeme_Widget_Action_Record',
'abonne_fiche' => 'Class_Systeme_Widget_Action_User',
'author_view' => 'Class_Systeme_Widget_Action_Author',
'bib_en-lire-plus' => 'Class_Systeme_Widget_Action_Library'];
foreach (Class_TypeDoc::findAll() as $doc_type)
$actions ['recherche_viewnotice_' . $doc_type->getId()] = $record_action;
return $actions;
}
}
\ No newline at end of file
......@@ -28,7 +28,8 @@ class Class_Template_Loader {
return [new Historic_Template,
new Intonation_Template,
new MyBibApp_Template,
new TerreDuMilieu_Template
new TerreDuMilieu_Template,
new Muscle_Template
];
}
......
......@@ -77,6 +77,9 @@ class ZendAfi_Controller_Plugin_DefineURLs extends Zend_Controller_Plugin_Abstra
if(!in_array($request->getModuleName(), [static::OPAC, static::PHONE]))
return;
if (($template = Class_Template::current()->getId()) != $profil->getTemplate())
$this->_setCurrentProfileUsing($template);
$request->setModuleName($profil->getBrowser());
return $this->_userCanAccessProfil($profil)
......@@ -85,6 +88,22 @@ class ZendAfi_Controller_Plugin_DefineURLs extends Zend_Controller_Plugin_Abstra
}
protected function _setCurrentProfileUsing($template) {
if (($template == (new Historic_Template)->getId())
&& (!Class_Profil::getCurrentProfil()->getTemplate()))
return;
if (! $profile = Class_Profil::findFirstBy(['template' => $template])) {
Class_Template::current()->tryOn(Class_Profil::getCurrentProfil());
$profile = Class_Profil::getCurrentProfil();
}
Class_Profil::clearCache();
Class_Profil::setCurrentProfil($profile);
}
protected function authRequest($detector) {
$profil = Class_Profil::getCurrentProfil();
......
<?php
/**
* Copyright (c) 2012-2017, 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 ZendAfi_Form_Configuration_Widget_Action_Author extends ZendAfi_Form_Configuration_Widget_Action_Tabs {
protected function _getRichContentInstance() {
return (new Intonation_Library_View_Wrapper_Author_RichContent)
->setView(new Class_Entity)
->setModel(new Class_CodifAuteur);
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, 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 ZendAfi_Form_Configuration_Widget_Action_Library extends ZendAfi_Form_Configuration_Widget_Action_Tabs {
protected function _getRichContentInstance() {
return (new Intonation_Library_View_Wrapper_Library_RichContent)
->setView(new Class_Entity)
->setModel(new Class_Bib);
}
}
\ No newline at end of file
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