Browse Source

replaced request.baseurl with url_for values

joel
Simon Bowie 2 years ago
parent
commit
735996255a
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      web/app/templates/base.html
  2. +2
    -2
      web/app/templates/resources.html

+ 2
- 2
web/app/templates/base.html View File



<div class="flex"> <div class="flex">
<a <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 %}" class="block link flex p-3 gap-2 {% if view != 'list' %} active {% endif %}"
> >
Expanded Expanded
</a> </a>
<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 %}" class="block link flex p-3 gap-2 {% if view == 'list' %} active {% endif %}"
> >
<div class="w-5 h-5 inline-block "> <div class="w-5 h-5 inline-block ">

+ 2
- 2
web/app/templates/resources.html View File

</div> </div>


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


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

Loading…
Cancel
Save