Profil utilisateur et minuscule pour les droits
This commit is contained in:
parent
3132291304
commit
1aac43d005
@ -26,8 +26,8 @@ class DashboardController extends Zend_Controller_Action
|
||||
'url' => $this->view->url(array('action'=>'clients')),
|
||||
),
|
||||
1 => array(
|
||||
'libelle' => 'Créer un client',
|
||||
'url' => $this->view->url(array('action'=>'client')),
|
||||
'libelle' => 'Créer un client',
|
||||
'url' => $this->view->url(array('action'=>'client')),
|
||||
),
|
||||
2 => array(
|
||||
'libelle' => 'Gestion des commandes',
|
||||
|
@ -156,9 +156,15 @@ class UserController extends Zend_Controller_Action
|
||||
|| $identity->profil == 'SuperAdministrateur') {
|
||||
$isAdmin = true;
|
||||
}
|
||||
|
||||
$this->view->assign('isAdmin', $isAdmin);
|
||||
|
||||
$isSuperAdmin = false;
|
||||
if ($identity->profil == 'SuperAdministrateur') {
|
||||
$isSuperAdmin = true;
|
||||
}
|
||||
$this->view->assign('isSuperAdmin', $isSuperAdmin);
|
||||
Zend_Registry::get('firebug')->info('LOG:'.$isSuperAdmin);
|
||||
|
||||
Zend_Registry::get('firebug')->info('action'.$action);
|
||||
if ($op=='new'){
|
||||
Zend_Registry::get('firebug')->info('Gestion first user SD');
|
||||
|
@ -20,7 +20,7 @@ div.submit{
|
||||
var droits = new Array();
|
||||
droits = {<?php
|
||||
foreach($this->wsdroits as $droit){
|
||||
echo '"'.$droit->code.'": "'.$droit->desc.'", ';
|
||||
echo '"'.strtolower($droit->code).'": "'.$droit->desc.'", ';
|
||||
}
|
||||
?>}
|
||||
|
||||
@ -374,11 +374,13 @@ if (!empty($text_droit)){
|
||||
}
|
||||
?>
|
||||
</span><br/>
|
||||
|
||||
|
||||
<select name="selectdroit">
|
||||
<option value="">-</option>
|
||||
<?php
|
||||
foreach($this->wsdroits as $droit){
|
||||
$value = $droit->code;
|
||||
$value = strtolower($droit->code);
|
||||
$text = $droit->desc;
|
||||
?>
|
||||
<option value="<?php echo $value?>"><?php echo $text?></option>
|
||||
|
@ -85,7 +85,6 @@ if (in_array($this->options->profil, array('Administrateur', 'SuperAdministrateu
|
||||
echo $this->action('conso', 'user');
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Moteur de recherche</h2>
|
||||
@ -94,9 +93,8 @@ if (in_array($this->options->profil, array('Administrateur', 'SuperAdministrateu
|
||||
<div class="infoTitle StyleInfoLib">Résultats par page</div>
|
||||
<div class="infoData">
|
||||
<select name="frmOptions[rech_nbrep]">
|
||||
<?
|
||||
<?php
|
||||
$opts = array(10, 20, 30, 40, 50, 100, 150, 200);
|
||||
|
||||
foreach($opts as $opt)
|
||||
{
|
||||
$selected = '';
|
||||
@ -134,7 +132,23 @@ foreach($opts as $opt)
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Type de profil</div>
|
||||
<div class="infoData">
|
||||
<?php if ($this->isSuperAdmin){ ?>
|
||||
<select name="frmOptions[profil]">
|
||||
<?php
|
||||
$profil = array('Utilisateur', 'Administrateur');
|
||||
foreach ($profil as $item){
|
||||
$select = '';
|
||||
if ($this->options->profil == $profil){
|
||||
$select = ' selected';
|
||||
}
|
||||
?>
|
||||
<option value="<?=$item?>"<?=$select?>><?=$item?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
|
||||
<?php } else { ?>
|
||||
<?=$this->options->profil?>
|
||||
<?php }?>
|
||||
</div>
|
||||
|
||||
<div class="infoTitle StyleInfoLib">Droits d'accès</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user