Commit 9ae9f624 by Bach Dániel

Merge branch 'feature-template-acl-names' into 'master'

Feature Template Acl Names

Add full names to the ACL table in templates

Also a minor fix

Also partially fixing #172
parents c11bddba 20413d14
...@@ -705,6 +705,7 @@ textarea[name="list-new-namelist"] { ...@@ -705,6 +705,7 @@ textarea[name="list-new-namelist"] {
#group-detail-user-table td:nth-child(2) a, #group-detail-user-table td:nth-child(2) a,
#group-detail-perm-table td:nth-child(2) a, #group-detail-perm-table td:nth-child(2) a,
#template-access-table td:nth-child(2) a,
#vm-access-table td:nth-child(2) a, #vm-access-table td:nth-child(2) a,
.no-style-link, .no-style-link:hover { .no-style-link, .no-style-link:hover {
color: #555 !important; color: #555 !important;
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<div id="dashboard-template-list"> <div id="dashboard-template-list">
{% for t in templates %} {% for t in templates %}
<a href="{% url "dashboard.views.template-detail" pk=t.pk %}" class="list-group-item <a href="{% url "dashboard.views.template-detail" pk=t.pk %}" class="list-group-item
{% if forloop.last and nodes|length < 5 %} list-group-item-last{% endif %}"> {% if forloop.last and templates|length < 5 %} list-group-item-last{% endif %}">
<span class="index-template-list-name"> <span class="index-template-list-name">
<i class="icon-{{ t.os_type }}"></i> {{ t.name }} <i class="icon-{{ t.os_type }}"></i> {{ t.name }}
</span> </span>
......
...@@ -37,11 +37,20 @@ ...@@ -37,11 +37,20 @@
<th>{% trans "Who" %}</th> <th>{% trans "Who" %}</th>
<th>{% trans "What" %}</th> <th>{% trans "What" %}</th>
<th><i class="icon-remove"></i></th> <th><i class="icon-remove"></i></th>
</tr></thead> </tr>
</thead>
<tbody> <tbody>
{% for i in acl.users %} {% for i in acl.users %}
<tr> <tr>
<td><i class="icon-user"></i></td><td>{{i.user}}</td> <td>
<i class="icon-user"></i>
</td>
<td>
<a href="{% url "dashboard.views.profile" username=i.user.username %}"
title="{{ i.user.username }}">
{% include "dashboard/_display-name.html" with user=i.user show_org=True %}
</a>
</td>
<td> <td>
<select class="form-control" name="perm-u-{{i.user.id}}"> <select class="form-control" name="perm-u-{{i.user.id}}">
{% for id, name in acl.levels %} {% for id, name in acl.levels %}
...@@ -56,7 +65,12 @@ ...@@ -56,7 +65,12 @@
{% endfor %} {% endfor %}
{% for i in acl.groups %} {% for i in acl.groups %}
<tr> <tr>
<td><i class="icon-group"></i></td><td>{{i.group}}</td> <td><i class="icon-group"></i></td>
<td>
<a href="{% url "dashboard.views.group-detail" pk=i.group.pk %}">
{{i.group}}
</a>
</td>
<td> <td>
<select class="form-control" name="perm-g-{{i.group.id}}"> <select class="form-control" name="perm-g-{{i.group.id}}">
{% for id, name in acl.levels %} {% for id, name in acl.levels %}
......
...@@ -915,7 +915,9 @@ class TemplateAclUpdateView(AclUpdateView): ...@@ -915,7 +915,9 @@ class TemplateAclUpdateView(AclUpdateView):
post_for_disk['perm-new'] = 'user' post_for_disk['perm-new'] = 'user'
request.POST = post_for_disk request.POST = post_for_disk
for d in template.disks.all(): for d in template.disks.all():
self.set_levels(request, d)
self.add_levels(request, d) self.add_levels(request, d)
self.remove_levels(request, d)
return redirect(template) return redirect(template)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment