Przeglądaj źródła

replaced request.baseurl with url_for values

joel
Simon Bowie 1 rok temu
rodzic
commit
735996255a
2 zmienionych plików z 4 dodań i 4 usunięć
  1. +2
    -2
      web/app/templates/base.html
  2. +2
    -2
      web/app/templates/resources.html

+ 2
- 2
web/app/templates/base.html Wyświetl plik

@@ -16,7 +16,7 @@

<div class="flex">
<a
href="{{ request.base_url }}?view=regular{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
href="{{ url_for(request.endpoint) }}?view=regular{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
class="block link flex p-3 gap-2 {% if view != 'list' %} active {% endif %}"
>
@@ -32,7 +32,7 @@
Expanded
</a>
<a
href="{{ request.base_url }}?view=list{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
href="{{ url_for(request.endpoint) }}?view=list{% for key in request.args %}{% if key != 'view' %}&{{ key }}={{ request.args.get(key) }}{% endif %}{% endfor %}"
class="block link flex p-3 gap-2 {% if view == 'list' %} active {% endif %}"
>
<div class="w-5 h-5 inline-block ">

+ 2
- 2
web/app/templates/resources.html Wyświetl plik

@@ -79,7 +79,7 @@
</div>

<form
action="{{request.base_url}}"
action="{{ url_for(request.endpoint )}}"
method="GET"

hx-trigger="change"
@@ -111,7 +111,7 @@
{{ filter_dropdown_nokey('status', status_filter, 'Maintenance status') }}
{% endif %}
<a href="{{ request.base_url }}?view={{ view }}">Reset</a>
<a href="{{ url_for(request.endpoint) }}?view={{ view }}">Reset</a>
</div>

Ładowanie…
Anuluj
Zapisz