Projet

Général

Profil

0001-manager-increase-click-zone-of-delete-icons-in-table.patch

Frédéric Péters, 28 juillet 2020 21:25

Télécharger (6,25 ko)

Voir les différences:

Subject: [PATCH] manager: increase click zone of delete icons in tables
 (#45093)

 .../static/authentic2/manager/css/style.css   | 21 +++++++++++++++++++
 .../manager/role_members_table.html           |  2 +-
 .../manager/role_permissions_table.html       |  2 +-
 .../manager/service_roles_table.html          |  2 +-
 .../authentic2/manager/user_roles_table.html  |  4 ++--
 5 files changed, 26 insertions(+), 5 deletions(-)
src/authentic2/manager/static/authentic2/manager/css/style.css
66 66
	text-align: left;
67 67
}
68 68

  
69
table.main {
70
	height: 100%;
71
}
72

  
73
table.main td.remove-icon-column {
74
	padding: 0;
75
	height: 100%;
76
}
77

  
78
table.main td.remove-icon-column a {
79
	height: 100%;
80
	display: flex;
81
	border: none;
82
}
83

  
84
table.main td.remove-icon-column a span {
85
	display: block;
86
	margin: auto;
87
	padding: 0 0.5em;
88
}
89

  
69 90
table.feeds td.url {
70 91
	text-align: left;
71 92
	padding-left: 1em;
src/authentic2/manager/templates/authentic2/manager/role_members_table.html
7 7
    <th></th>
8 8
  {% endblock %}
9 9
  {% block table.tbody.last.column %}
10
  <td>{% if table.context.view.can_manage_members and row.record.direct %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=table.context.object %}Do you really want to remove user &quot;{{ username }}&quot; from role &quot;{{ role }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="user"></a>{% endif %}</td>
10
  <td class="remove-icon-column">{% if table.context.view.can_manage_members and row.record.direct %}<a class="js-remove-object" data-confirm="{% blocktrans with username=row.record.get_full_name role=table.context.object %}Do you really want to remove user &quot;{{ username }}&quot; from role &quot;{{ role }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="user"><span class="icon-remove-sign"></span></a>{% endif %}</td>
11 11
  {% endblock %}
12 12
{% endif %}
src/authentic2/manager/templates/authentic2/manager/role_permissions_table.html
7 7
    <th></th>
8 8
  {% endblock %}
9 9
  {% block table.tbody.last.column %}
10
    <td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" href="#" data-pk-arg="permission"></a>{% endif %}</td>
10
    <td class="remove-icon-column">{% if table.context.view.can_change %}<a class="js-remove-object" href="#" data-pk-arg="permission"><span class="icon-remove-sign"></span></a>{% endif %}</td>
11 11
  {% endblock %}
12 12
{% endif %}
src/authentic2/manager/templates/authentic2/manager/service_roles_table.html
7 7
    <th></th>
8 8
  {% endblock %}
9 9
  {% block table.tbody.last.column %}
10
    <td>{% if table.context.view.can_change %}<a class="icon-remove-sign js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=table.context.object %}Do you really want to remove role &quot;{{ name }}&quot; from service &quot;{{ slug }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="role"></a>{% endif %}</td>
10
    <td class="remove-icon-column">{% if table.context.view.can_change %}<a class="js-remove-object" data-confirm="{% blocktrans with name=row.record.name slug=table.context.object %}Do you really want to remove role &quot;{{ name }}&quot; from service &quot;{{ slug }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="role"><span class="icon-remove-sign"></span></a>{% endif %}</td>
11 11
  {% endblock %}
12 12
{% endif %}
src/authentic2/manager/templates/authentic2/manager/user_roles_table.html
7 7
    <th></th>
8 8
  {% endblock %}
9 9
  {% block table.tbody.last.column %}
10
  <td>
10
  <td class="remove-icon-column">
11 11
    {% if table.context.view.can_change and row.record.member %}
12
      <a class="icon-remove-sign {% if not row.record.can_manage_members %} disabled {% else %} js-remove-object {% endif %}" data-confirm="{% blocktrans with name=row.record.name username=table.context.object.get_full_name %}Do you really want to remove role &quot;{{ name }}&quot; from user &quot;{{ username }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="role" title="{% if not row.record.can_manage_members %}{% trans "This role is synchronised from LDAP, changing members is not allowed." %}{% endif %}"></a>
12
      <a class="{% if not row.record.can_manage_members %} disabled {% else %} js-remove-object {% endif %}" data-confirm="{% blocktrans with name=row.record.name username=table.context.object.get_full_name %}Do you really want to remove role &quot;{{ name }}&quot; from user &quot;{{ username }}&quot;&nbsp;?{% endblocktrans %}" href="#" data-pk-arg="role" title="{% if not row.record.can_manage_members %}{% trans "This role is synchronised from LDAP, changing members is not allowed." %}{% endif %}"><span class="icon-remove-sign"></span></a>
13 13
    {% endif %}
14 14
  </td>
15 15
  {% endblock %}
16
-