admin: add ?back to everything

This commit is contained in:
Jens Langhammer 2018-11-26 22:29:59 +01:00
parent b656cd1139
commit 5c5c865c0b
6 changed files with 10 additions and 29 deletions

View File

@ -9,6 +9,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h1>{% trans "Applications" %}</h1>
<a href="{% url 'passbook_admin:application-create' %}" class="btn btn-primary"> <a href="{% url 'passbook_admin:application-create' %}" class="btn btn-primary">
{% trans 'Create...' %} {% trans 'Create...' %}
</a> </a>
@ -27,8 +28,8 @@
<tr> <tr>
<td>{{ application.name }}</td> <td>{{ application.name }}</td>
<td>{{ application.provider }}</td> <td>{{ application.provider }}</td>
<td><a href="{% url 'passbook_admin:application-update' pk=application.uuid %}">{% trans 'Edit' %}</a></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 %}">{% trans 'Delete' %}</a></td> <td><a href="{% url 'passbook_admin:application-delete' pk=application.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -1,11 +0,0 @@
{% extends "generic/create.html" %}
{% load i18n %}
{% block title %}
{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}
{% endblock %}
{% block above_form %}
<h1>{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}</h1>
{% endblock %}

View File

@ -9,6 +9,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h1>{% trans "Rules" %}</h1>
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="createDropdown" data-toggle="dropdown"> <button class="btn btn-primary dropdown-toggle" type="button" id="createDropdown" data-toggle="dropdown">
{% trans 'Create...' %} {% trans 'Create...' %}
@ -35,8 +36,8 @@
<tr> <tr>
<td>{{ rule.name }}</td> <td>{{ rule.name }}</td>
<td>{{ rule|fieldtype }}</td> <td>{{ rule|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:rule-update' pk=rule.uuid %}">{% trans 'Edit' %}</a></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 %}">{% trans 'Delete' %}</a></td> <td><a href="{% url 'passbook_admin:rule-delete' pk=rule.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -1,11 +0,0 @@
{% extends "generic/create.html" %}
{% load i18n %}
{% block title %}
{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}
{% endblock %}
{% block above_form %}
<h1>{% blocktrans with type=request.GET.type %}Create {{ type }}{% endblocktrans %}</h1>
{% endblock %}

View File

@ -5,6 +5,7 @@
{% block content %} {% block content %}
<div class="container"> <div class="container">
<h1>{% trans "Sources" %}</h1>
<div class="dropdown"> <div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="createDropdown" data-toggle="dropdown"> <button class="btn btn-primary dropdown-toggle" type="button" id="createDropdown" data-toggle="dropdown">
{% trans 'Create...' %} {% trans 'Create...' %}
@ -31,8 +32,8 @@
<tr> <tr>
<td>{{ source.name }}</td> <td>{{ source.name }}</td>
<td>{{ source.cast|fieldtype }}</td> <td>{{ source.cast|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:source-update' pk=source.uuid %}">{% trans 'Edit' %}</a></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 %}">{% trans 'Delete' %}</a></td> <td><a href="{% url 'passbook_admin:source-delete' pk=source.uuid %}?back={{ request.get_full_path }}">{% trans 'Delete' %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>

View File

@ -20,7 +20,7 @@
<tr> <tr>
<td>{{ source.name }}</td> <td>{{ source.name }}</td>
<td>{{ source.cast|fieldtype }}</td> <td>{{ source.cast|fieldtype }}</td>
<td><a href="{% url 'passbook_admin:source-update' pk=source.pk %}">{% trans 'Edit' %}</a></td> <td><a href="{% url 'passbook_admin:source-update' pk=source.pk %}?back={{ request.get_full_path }}">{% trans 'Edit' %}</a></td>
</tr> </tr>
{% endfor %} {% endfor %}
</tbody> </tbody>