Added the back button to the transaction views in the accounting application.

This commit is contained in:
依瑪貓 2020-07-23 22:22:04 +08:00
parent 334292e6e8
commit cafa927c07
4 changed files with 22 additions and 1 deletions

View File

@ -39,6 +39,13 @@ First written: 2020/7/23
</div> </div>
{% endif %} {% endif %}
<div class="btn-group btn-actions">
<a class="btn btn-primary" role="button" href="{{ request.GET.r }}">
<i class="fas fa-chevron-circle-left"></i>
{{ _("Back") }}
</a>
</div>
<div class="row"> <div class="row">
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div> <div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>

View File

@ -39,6 +39,13 @@ First written: 2020/7/23
</div> </div>
{% endif %} {% endif %}
<div class="btn-group btn-actions">
<a class="btn btn-primary" role="button" href="{{ request.GET.r }}">
<i class="fas fa-chevron-circle-left"></i>
{{ _("Back") }}
</a>
</div>
<div class="row"> <div class="row">
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div> <div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>

View File

@ -39,6 +39,13 @@ First written: 2020/7/23
</div> </div>
{% endif %} {% endif %}
<div class="btn-group btn-actions">
<a class="btn btn-primary" role="button" href="{{ request.GET.r }}">
<i class="fas fa-chevron-circle-left"></i>
{{ _("Back") }}
</a>
</div>
<div class="row"> <div class="row">
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div> <div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
<div class="col-sm-10">{{ item.date|smart_date }}</div> <div class="col-sm-10">{{ item.date|smart_date }}</div>

View File

@ -59,4 +59,4 @@ def url_with_return(context, view_name, *args):
""" """
url = reverse(view_name, args=args) url = reverse(view_name, args=args)
return_to = context.request.get_full_path() return_to = context.request.get_full_path()
return str(UrlBuilder(url).set_param("return-to", return_to)) return str(UrlBuilder(url).set_param("r", return_to))