admin: update list templates to show buttons in one column

This commit is contained in:
Jens Langhammer 2018-11-30 15:50:45 +01:00
parent 520e991393
commit 4b3959787e
5 changed files with 20 additions and 14 deletions

View File

@ -20,7 +20,6 @@
<th>{% trans 'Name' %}</th>
<th>{% trans 'Provider' %}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@ -28,8 +27,10 @@
<tr>
<td>{{ application.name }}</td>
<td>{{ application.provider }}</td>
<td><a href="{% url 'passbook_admin:application-update' pk=application.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a></td>
<td><a href="{% url 'passbook_admin:application-delete' pk=application.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
<td>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:application-update' pk=application.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:application-delete' pk=application.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -28,7 +28,6 @@
<th>{% trans 'Name' %}</th>
<th>{% trans 'Class' %}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@ -36,8 +35,10 @@
<tr>
<td>{{ provider.name }}</td>
<td>{{ provider|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:provider-update' pk=provider.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a></td>
<td><a href="{% url 'passbook_admin:provider-delete' pk=provider.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
<td>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:provider-update' pk=provider.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:provider-delete' pk=provider.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -28,7 +28,6 @@
<th>{% trans 'Name' %}</th>
<th>{% trans 'Class' %}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@ -36,8 +35,11 @@
<tr>
<td>{{ rule.name }}</td>
<td>{{ rule|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:rule-update' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a></td>
<td><a href="{% url 'passbook_admin:rule-delete' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
<td>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:rule-update' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:rule-test' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Test' %}</a>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:rule-delete' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -24,16 +24,17 @@
<th>{% trans 'Name' %}</th>
<th>{% trans 'Class' %}</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
{% for source in object_list %}
<tr>
<td>{{ source.name }}</td>
<td>{{ source.cast|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:source-update' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a></td>
<td><a href="{% url 'passbook_admin:source-delete' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
<td>{{ source|fieldtype }}</td>
<td>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:source-update' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>
<a class="btn btn-default btn-sm" href="{% url 'passbook_admin:source-delete' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -13,7 +13,8 @@ class LDAPSourceForm(forms.ModelForm):
model = LDAPSource
fields = SOURCE_FORM_FIELDS + ['server_uri', 'bind_cn', 'bind_password',
'type', 'domain', 'base_dn', 'create_user', 'reset_password']
'type', 'domain', 'base_dn', 'create_user',
'reset_password', 'rules']
widgets = {
'name': forms.TextInput(),
'server_uri': forms.TextInput(),