Commit 63d2be02 authored by Ghislain Loas's avatar Ghislain Loas

hotline #71669 improve dashboard

parent 2c977634
......@@ -108,6 +108,9 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
protected function _renderRights() {
if (!$this->_config->isEnabled())
return '';
$html = [$this->_tag('h3',$this->_('Gestion des droits'))];
$groups = new Storm_Collection(Class_UserGroup::findAll());
......@@ -157,15 +160,13 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
protected function _renderSso() {
if(!$this->_permitted_groups)
return '';
$html = [$this->_tag('h3', $this->_('Diagnostique SSO'))];
if(!$this->_config->getSsoAction()) {
$html [] = $this->_tag('p', $this->_('Pas de connexion SSO pour cette ressource'), ['class' => 'erro']) ;
return implode($html);
}
if(!$this->_permitted_groups) {
$html [] = $this->_tag('p', $this->_('Aucun groupe utilisateur n\'a de droit pour cette ressource'), ['class' => 'erro']);
$html [] = $this->_tag('p', $this->_('Pas de connexion SSO pour cette ressource'), ['class' => 'error']) ;
return implode($html);
}
......@@ -244,7 +245,7 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
$html = [$this->_tag('h3', $this->_('Diagnostique moissonnage'))];
if(!$batch = Class_Batch::findFirstBy(['type' => $batch_name])) {
$html [] = $this->_tag('p', $this->_('Le moissonnage n\'a pas été programmé'), ['class' => 'error'])
$html [] = $this->_tag('p', $this->_('Le moissonnage n\'est pas programmé'), ['class' => 'error'])
. $this->view->button((new Class_Entity())
->setText($this->_('Activer le moissonnage'))
->setUrl($this->view->absoluteUrl(['module' => 'admin',
......@@ -253,7 +254,6 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
'id' => $batch_name],
null,
true)));
return implode($html);
}
$description = (new Class_TableDescription('batchs'))
......@@ -290,8 +290,8 @@ class ZendAfi_View_Helper_DigitalResource_Dashboard extends ZendAfi_View_Helper_
},
'anchorOptions' => ['data-popup' => 'true']],]);
});
$html [] = $this->view->renderTable($description, [new Class_Batch_Definition($this->_config->getBatchInstance())]);
if($batch)
$html [] = $this->view->renderTable($description, [new Class_Batch_Definition($this->_config->getBatchInstance())]);
$html [] = $this->_tag('p',
$this->_('Nombre d\'albums présents : %d', Class_Album::countBy(['type_doc_id' => $this->_config->getDocType()])));
......
<?php
/**
* Copyright (c) 2012-2014, 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 Omeka_Plugin_IndexController extends Class_DigitalResource_Controller {}
\ 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