make Admin UI more consistent, better show when provider has no application assigned

This commit is contained in:
Jens Langhammer
2019-02-27 14:47:11 +01:00
parent 95de6a14fd
commit 2db1738e4a
8 changed files with 30 additions and 10 deletions

View File

@ -21,6 +21,7 @@
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Provider' %}</th>
<th>{% trans 'Provider Type' %}</th>
<th></th>
</tr>
</thead>
@ -28,7 +29,8 @@
{% for application in object_list %}
<tr>
<td>{{ application.name }}</td>
<td>{{ application.provider }}</td>
<td>{{ application.get_provider }}</td>
<td>{{ application.get_provider|verbose_name }}</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>

View File

@ -40,7 +40,7 @@
{% for factor in object_list %}
<tr>
<td>{{ factor.name }} ({{ factor.slug }})</td>
<td>{{ factor.type }}</td>
<td>{{ factor|verbose_name }}</td>
<td>{{ factor.order }}</td>
<td>{{ factor.enabled }}</td>
<td>

View File

@ -29,7 +29,7 @@
<thead>
<tr>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Class' %}</th>
<th>{% trans 'Type' %}</th>
<th></th>
</tr>
</thead>
@ -37,7 +37,7 @@
{% for policy in object_list %}
<tr>
<td>{{ policy.name }}</td>
<td>{{ policy|fieldtype }}</td>
<td>{{ policy|verbose_name }}</td>
<td>
<a class="btn btn-default btn-sm"
href="{% url 'passbook_admin:policy-update' pk=policy.uuid %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>

View File

@ -29,16 +29,24 @@
<table class="table table-striped table-bordered">
<thead>
<tr>
<th></th>
<th>{% trans 'Name' %}</th>
<th>{% trans 'Class' %}</th>
<th>{% trans 'Type' %}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for provider in object_list %}
<tr>
<tr {% if not provider.application %} class="warning" {% endif %}>
<th>
{% if not provider.application %}
<span class="pficon-warning-triangle-o" data-toggle="tooltip" data-placement="right" title="{% trans 'Warning: Provider has no application assigned.' %}"></span>
{% else %}
<span class="pficon-ok" data-toggle="tooltip" data-placement="right" title="{% blocktrans with app=provider.application %}Assigned to Application {{ app }}{% endblocktrans %}"></span>
{% endif %}
</th>
<td>{{ provider.name }}</td>
<td>{{ provider|fieldtype }}</td>
<td>{{ provider|verbose_name }}</td>
<td>
<a class="btn btn-default btn-sm"
href="{% url 'passbook_admin:provider-update' pk=provider.pk %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a>