Skip to content
Snippets Groups Projects

Hotline master

Merged Ghislain Loas requested to merge hotline-master into master
Compare and
+ 37
22
Preferences
Compare changes
Files
@@ -18,9 +18,9 @@
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class Admin_PremierChapitreController extends Zend_Controller_Action {
use Trait_Translator;
protected $_baseUrlOptions = ['module' => 'admin', 'controller' => 'premier-chapitre'];
class Admin_PremierChapitreController extends ZendAfi_Controller_Action {
protected $_baseUrlOptions = ['module' => 'admin', 'controller' => 'premier-chapitre'],
$_back_to_index;
private $active;
private $pc_bib_id;
@@ -35,6 +35,7 @@ class Admin_PremierChapitreController extends Zend_Controller_Action {
$this->pc_bmid = Class_AdminVar::get('PREMIERCHAPITRE_BMID');
$this->pc_bmkey = Class_AdminVar::get('PREMIERCHAPITRE_BMKEY');
$this->active = (!empty($this->pc_bib_id) && !empty($this->pc_bmid) && !empty($this->pc_bmkey));
$this->_back_to_index = $this->view->tagAnchor(['action' => 'index'] , $this->_('Retour à l\'index du service Premier-chapitre'));
}
public function preDispatch() {
@@ -73,11 +74,11 @@ class Admin_PremierChapitreController extends Zend_Controller_Action {
$data = $pc_ws->getDatafile();
if ($data){
$contenu = date('H:i:s')." Le référentiel a bien été téléchargé sur le serveur\nIl est possible de procéder à la mise à jour de la base\n";
$contenu .= '<a href="/admin/premier-chapitre/maj-db/">Mise à jour de la base</a>';
$contenu .= $this->view->tagAnchor(['action' => 'maj-db'], $this->_('Mise à jour de la base'));
}
else $contenu = "Une erreur est survenue\nle référentiel n'a pas pu être téléchargé\nVeuillez réessayer ultérieurement";
$this->view->contenu = '<pre>'.$contenu.'</pre>';
$this->view->contenu .= "<br/><a href='/admin/premier-chapitre/'>Retour à l'index du service Premier-chapitre</a>";
$this->view->contenu .= "<br/>" . $this->back_to_index;
$this->view->titre .= ' :: Téléchargement du référentiel';
}
@@ -92,11 +93,11 @@ class Admin_PremierChapitreController extends Zend_Controller_Action {
if ($data['new']) $contenu .= '* '.$data['new'].(($data['new']>1)?" ont été ajoutées":" a été ajoutée")."\n";
if ($data['maj']) $contenu .= '* '.$data['maj'].(($data['maj']>1)?" ont été mises":" a été mise")." à jour\n";
if ($data['err']) $contenu .= '* '.$data['err'].(($data['err']>1)?" erreurs n'ont pas été traitées":" erreur n'a pas été traitée")."\n";
$contenu .= '<a href="/admin/premier-chapitre/link-notices/">Lier les notices</a>';
$contenu .= $this->view->tagAnchor(['action' => 'link-notices'], $this->_('Lier les notices'));
}
else $contenu = "Une erreur est survenue\nLa base n'a pu être mise à jour\nVeuillez réessayer ultérieurement";
$this->view->contenu = '<pre>'.$contenu.'</pre>';
$this->view->contenu .= "<br/><a href='/admin/premier-chapitre/'>Retour à l'index du service Premier-chapitre</a>";
$this->view->contenu .= "<br/>" . $this->_back_to_index;
$this->view->titre .= ' :: Mise à jour de la base';
}
@@ -111,7 +112,7 @@ class Admin_PremierChapitreController extends Zend_Controller_Action {
}
else $contenu = "Une erreur est survenue\nLes liaisons n'ont pu être faites\nVeuillez réessayer ultérieurement";
$this->view->contenu = '<pre>'.$contenu.'</pre>';
$this->view->contenu .= "<br/><a href='/admin/premier-chapitre/'>Retour à l'index du service Premier-chapitre</a>";
$this->view->contenu .= "<br/>" . $this->_back_to_index;
$this->view->titre .= ' :: Liaison aux notices';
}