Commit 38863a5f40025d0afa2e12aa46f14cce9a8e2ca6
1 parent
0e7b7091
Exists in
master
and in
3 other branches
Ajout des icones dans l'index pour que le responsable puisse éditer
Showing
2 changed files
with
31 additions
and
28 deletions
Show diff stats
bin/cake.bat
1 | -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
2 | -:: | ||
3 | -:: Cake is a Windows batch script for invoking CakePHP shell commands | ||
4 | -:: | ||
5 | -:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||
6 | -:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
7 | -:: | ||
8 | -:: Licensed under The MIT License | ||
9 | -:: Redistributions of files must retain the above copyright notice. | ||
10 | -:: | ||
11 | -:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
12 | -:: @link http://cakephp.org CakePHP(tm) Project | ||
13 | -:: @since 2.0.0 | ||
14 | -:: @license http://www.opensource.org/licenses/mit-license.php MIT License | ||
15 | -:: | ||
16 | -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
17 | - | ||
18 | -@echo off | ||
19 | - | ||
20 | -SET app=%0 | ||
21 | -SET lib=%~dp0 | ||
22 | - | ||
23 | -php "%lib%cake.php" %* | ||
24 | - | ||
25 | -echo. | ||
26 | - | ||
27 | -exit /B %ERRORLEVEL% | 1 | +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
2 | +:: | ||
3 | +:: Cake is a Windows batch script for invoking CakePHP shell commands | ||
4 | +:: | ||
5 | +:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) | ||
6 | +:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
7 | +:: | ||
8 | +:: Licensed under The MIT License | ||
9 | +:: Redistributions of files must retain the above copyright notice. | ||
10 | +:: | ||
11 | +:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) | ||
12 | +:: @link http://cakephp.org CakePHP(tm) Project | ||
13 | +:: @since 2.0.0 | ||
14 | +:: @license http://www.opensource.org/licenses/mit-license.php MIT License | ||
15 | +:: | ||
16 | +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | ||
17 | + | ||
18 | +@echo off | ||
19 | + | ||
20 | +SET app=%0 | ||
21 | +SET lib=%~dp0 | ||
22 | + | ||
23 | +php "%lib%cake.php" %* | ||
24 | + | ||
25 | +echo. | ||
26 | + | ||
27 | +exit /B %ERRORLEVEL% |
src/Template/Materiels/index.ctp
@@ -195,7 +195,10 @@ if (in_array($materiel->status, [ | @@ -195,7 +195,10 @@ if (in_array($materiel->status, [ | ||
195 | 'Administration', | 195 | 'Administration', |
196 | 'Administration Plus', | 196 | 'Administration Plus', |
197 | 'Super Administrateur' | 197 | 'Super Administrateur' |
198 | - ])) || ($role == 'Responsable' && ((isset($priviledgedUser->groupes_metier_id) && $priviledgedUser->groupes_metier_id != $idGmNa && $materiel->groupes_metier_id == $priviledgedUser->groupes_metier_id) || (isset($priviledgedUser->groupe_thematique_id) && $priviledgedUser->groupe_thematique_id != $idGtNa && $materiel->groupes_thematique_id == $priviledgedUser->groupe_thematique_id)))) { | 198 | + ])) || ($role == 'Responsable' && (in_array($username, [ |
199 | + $materiel ->nom_createur, | ||
200 | + $materiel ->nom_responsable | ||
201 | + ]))) ||($role == 'Responsable' && ((isset($priviledgedUser->groupes_metier_id) && $priviledgedUser->groupes_metier_id != $idGmNa && $materiel->groupes_metier_id == $priviledgedUser->groupes_metier_id) || (isset($priviledgedUser->groupe_thematique_id) && $priviledgedUser->groupe_thematique_id != $idGtNa && $materiel->groupes_thematique_id == $priviledgedUser->groupe_thematique_id)))) { | ||
199 | ?> | 202 | ?> |
200 | <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $materiel->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?> | 203 | <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $materiel->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?> |
201 | <?php } endif; ?> | 204 | <?php } endif; ?> |