This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
File tree 2 files changed +18
-6
lines changed
app/Resources/views/admin
2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change 1
1
{% extends ' SonataAdminBundle:CRUD:base_list_field.html.twig' %}
2
2
3
3
{% block field %}
4
- {% if object .isReferent %}
5
- <span class =" label label-primary" >Référent</span >
6
- {% elseif object .isProcurationManager %}
7
- <span class =" label label-primary" >Procuration</span >
8
- {% elseif object .isHost %}
9
- <span class =" label label-primary" style =" background-color: #90ade6 !important;" >Animateur</span >
4
+ {% if object .hasAdvancedPrivileges %}
5
+ {% if object .isReferent %}
6
+ <span class =" label label-primary" style =" padding: 2px;" >Référent</span ><br />
7
+ {% endif %}
8
+
9
+ {% if object .isProcurationManager %}
10
+ <span class =" label label-primary" style =" padding: 2px;" >Procuration</span ><br />
11
+ {% endif %}
12
+
13
+ {% if object .isHost %}
14
+ <span class =" label label-primary" style =" background-color: #90ade6 !important; padding: 2px;" >Animateur</span ><br />
15
+ {% endif %}
16
+
10
17
{% else %}
11
18
<span class =" label label-default" >Adhérent</span >
12
19
{% endif %}
Original file line number Diff line number Diff line change @@ -202,6 +202,11 @@ public function getType(): string
202
202
return 'ADHERENT ' ;
203
203
}
204
204
205
+ public function hasAdvancedPrivileges (): bool
206
+ {
207
+ return $ this ->isReferent () || $ this ->isProcurationManager () || $ this ->isHost ();
208
+ }
209
+
205
210
public function getPassword (): string
206
211
{
207
212
return !$ this ->password ? $ this ->oldPassword : $ this ->password ;
You can’t perform that action at this time.
0 commit comments