Projet

Général

Profil

0001-wip.patch

Benjamin Dauvergne, 03 août 2021 10:38

Télécharger (3,98 ko)

Voir les différences:

Subject: [PATCH] wip

 .../authentic2/manager/role_members.html      | 82 +++++++++++++------
 1 file changed, 56 insertions(+), 26 deletions(-)
src/authentic2/manager/templates/authentic2/manager/role_members.html
71 71
           <button>{% trans "Add" %}</button>
72 72
   </form>
73 73
 {% endif %}
74
<style>
75
 .icon-edit-sign::before {
76
     content: "\f14b";
77
     font-family: FontAwesome;
78
     padding-left: 1ex;
79
 }
80
 .role-list--container {
81
     display: block;
82
 }
83
 .role-list--element {
84
     display: inline;
85
     list-style: none;
86
     /* border: 1px solid grey; */
87
     margin-top: 0.5ex;
88
 }
89
 .role-list--element + .role-list--element::before {
90
     content: " − ";
91
 }
92

  
93
</style>
94
 <div class="section">
95
   <h3>{% trans "Child roles" %}
96
   <a
97
  {% if view.can_manage_members %}
98
    title="{% trans "Edit child roles" %}" href="{% url "a2-manager-role-add-child" pk=object.pk %}" class="button"
99
  {% else %}
100
    title="{% trans "Permission denied" %}" class="disabled button"
101
    {% endif %} >{% trans "Edit" %}</a></h3>
102
   {% if children %}
103
   <ul class="role-list--container">
104
   {% for child in children %}
105
     <li class="role-list--element"><a href="{% url "a2-manager-role-members" pk=child.pk %}">{{ child }}</a></li>
106
   {% endfor %}
107
   <ul>
108
   {% else %}
109
   <p>{% trans "None" %}</p>
110
   {% endif %}
111
 </div>
112
 <div class="section">
113
   <h3>{% trans "Parent roles" %}
114
   <a
115
   {% if not object.is_internal %}
116
     title="{% trans "Edit parent roles" %}" href="{% url "a2-manager-role-add-parent" pk=object.pk %}" class="button"
117
   {% else %}
118
     title="{% trans "This role is technical, you cannot modify its permissions." %}" class="disabled button"
119
   {% endif %}>{% trans "Edit" %}</a></h3>
120
   {% if children %}
121
   <ul class="role-list--container">
122
   {% for parent in parents %}
123
     <li class="role-list--element"><a href="{% url "a2-manager-role-members" pk=parent.pk %}">{{ parent }}</a></li>
124
   {% endfor %}
125
   <ul>
126
   {% else %}
127
   <p>{% trans "None" %}</p>
128
   {% endif %}
129
 </div>
74 130
 <fieldset class="gadjo-foldable gadjo-folded" id="other-properties">
75 131
 <legend class="gadjo-foldable-widget">{% trans "Advanced parameters" %}</legend>
76 132
 <div class="role-inheritance gadjo-folding">
......
105 161
    <a title="{% trans "Permission denied" %}" class="disabled role-add icon-add-sign"></a>
106 162
  {% endif %}
107 163
 </div>
108
 <div class="role-inheritance gadjo-folding">
109
   {% trans "Child roles:" %}
110
   {% for child in children %}
111
     <a href="{% url "a2-manager-role-members" pk=child.pk %}">{{ child }}</a>
112
     {% if not forloop.last %} − {% endif %}
113
   {% endfor %}
114
  {% if view.can_manage_members %}
115
    <a href="{% url "a2-manager-role-add-child" pk=object.pk %}" class="role-add icon-add-sign"></a>
116
  {% else %}
117
    <a title="{% trans "Permission denied" %}" class="disabled role-add icon-add-sign"></a>
118
  {% endif %}
119
 </div>
120
 <div class="role-inheritance gadjo-folding">
121
   {% trans "Parent roles:" %}
122
   {% for parent in parents %}
123
     <a class="role" href="{% url "a2-manager-role-members" pk=parent.pk %}">
124
       {% if parent.ou and has_multiple_ou %}{{ parent.ou }} - {% endif %}{{ parent }}
125
     </a>
126
    {% if not forloop.last %} − {% endif %}
127
   {% endfor %}
128
   {% if not object.is_internal %}
129
     <a href="{% url "a2-manager-role-add-parent" pk=object.pk %}" class="role-add icon-add-sign"></a>
130
   {% else %}
131
     <a title="{% trans "This role is technical, you cannot modify its permissions." %}" class="disabled role-add icon-add-sign"></a>
132
   {% endif %}
133
 </div>
134 164
 </fieldset>
135 165
{% endblock %}
136
-