Skip to content
Snippets Groups Projects
Commit 17a20d0c authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

first block cleaning and error display in cosmo status

parent 35238a98
Branches
Tags
6 merge requests!2080Sandbox detach zf from storm,!1922Master,!1921Hotline master,!1920Master,!1910Dev bloc info integration,!1905Dev bloc info integration
<h2><?php echo $this->_('Paramètres du site');?>&nbsp;:</h2>
<?php
$profil = Class_Profil::getCurrentProfil();
$lien_edit_site = $lien = $edit_domain_name = '';
$lien = $edit_domain_name = '';
if ($this->user->isAdmin()) {
$lien = sprintf('<a href="admin?setsiteok=%s" style="margin-left:30px">&raquo;&nbsp;%s&nbsp;&laquo;</a>',
$this->href_site, $this->lien_site);
$lien_edit_site = sprintf('<a href="%s" style="margin-left:30px" >&raquo;&nbsp;Paramétrer&nbsp;&laquo;</a>',
$this->url(['controller' => 'profil',
'action' => 'accueil',
'id_profil' => $profil->getId()]));
$edit_domain_name = $this->tagAnchor($this->url(['module' => 'admin',
'controller' => 'index',
......@@ -20,8 +15,6 @@ if ($this->user->isAdmin()) {
}
echo $this->ligneInfos($this->_('Etat du site'), $this->etat_site . $lien)
. $this->ligneInfos($this->_('Profil'), $profil->getLibelle() . $lien_edit_site)
. $this->ligneInfos($this->_('Thème'), $profil->getSkin())
. $this->ligneInfos($this->_('Nom du domaine'), Class_AdminVar::get('NOM_DOMAINE') . $edit_domain_name);
?>
......
......@@ -58,7 +58,7 @@ class ZendAfi_View_Helper_Admin_CosmoStatus extends ZendAfi_View_Helper_BaseHelp
$frequence = (int)Class_CosmoVar::getValueOf('integration_frequence');
return 0 < $frequence && $frequence < $ecart
? $this->info($this->_('Les traitements d\'intégration n\'ont pas été effectués depuis'),
? $this->error($this->_('Les traitements d\'intégration n\'ont pas été effectués depuis'),
$this->_('%s jours', $ecart))
: '';
}
......@@ -72,6 +72,11 @@ class ZendAfi_View_Helper_Admin_CosmoStatus extends ZendAfi_View_Helper_BaseHelp
}
protected function error($label, $value) {
return $this->view->ligneInfos($label, $value, 'error');
}
protected function info($label, $value) {
return $this->view->ligneInfos($label, $value);
}
......
......@@ -16,16 +16,29 @@
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
//////////////////////////////////////////////////////////////////////////////////////////
// OPAC3 : Affichage d'une information dans la page admin index
//////////////////////////////////////////////////////////////////////////////////////////
class ZendAfi_View_Helper_Admin_LigneInfos extends ZendAfi_View_Helper_BaseHelper {
public function LigneInfos($masque,$valeur) {
$html = '<div class="ligne_info">';
if($masque) $html .= $masque.'&nbsp;:&nbsp;';
if($valeur) $html .= '<b>'.$valeur.'</b>';
return $html .= '</div>';
public function ligneInfos($label, $value, $class='') {
return $this
->_tag('div',
$this->label($label) . $this->value($value),
['class' => 'ligne_info ' . $class]);
}
protected function label($label) {
return $label
? ($label.'&nbsp;:&nbsp;')
: '';
}
protected function value($value) {
return $value
? $this->_tag('b', $value)
: '';
}
}
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