Filtres i ordres als resultats de cerca
This commit is contained in:
@@ -12,38 +12,14 @@
|
||||
<i>{{ query }}</i>
|
||||
</button>
|
||||
{% endif %}
|
||||
<ul class="flex flex-wrap justify-center my-4">
|
||||
{% for property in properties %}
|
||||
<li>
|
||||
<button class="bg-beige rounded
|
||||
text-white
|
||||
m-1 px-2"
|
||||
hx-get="/api/content/temes"
|
||||
hx-target="#content"
|
||||
hx-include="[name=query]"
|
||||
hx-vars="properties:{{ remove_property_str(property) }}"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
{{ property }}
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% for property in property_results %}
|
||||
<li>
|
||||
<button class="border border-beige rounded
|
||||
text-white
|
||||
m-1 px-2"
|
||||
hx-get="/api/content/temes"
|
||||
hx-target="#content"
|
||||
hx-vars="properties:{{ add_property_str(property) }}"
|
||||
hx-swap="innerHTML"
|
||||
>
|
||||
{{ property }}
|
||||
</button>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<hr class="h-px mt-1 mb-3 bg-beige border-0">
|
||||
|
||||
<div class="mx-4 flex flex-col">
|
||||
{% include "fragments/temes/search_params/order_by.html" %}
|
||||
{% include "fragments/temes/search_params/filter.html" %}
|
||||
</div>
|
||||
|
||||
<hr class="h-px mt-3 mb-3 bg-beige border-0">
|
||||
<ul class="min-w-full w-full">
|
||||
{% for tema in temes %}
|
||||
{% include "fragments/temes/result.html" %}
|
||||
@@ -52,20 +28,22 @@
|
||||
{% if prev_offset is not none or next_offset is not none %}
|
||||
<div class="py-2">
|
||||
{% if prev_offset is not none %}
|
||||
{% set hx_vars = build_hx_vars({"properties": properties_str, "offset": prev_offset}, order_params_dict) %}
|
||||
<button class="text-beige mx-2"
|
||||
hx-get="/api/temes/busca"
|
||||
hx-include="[name=query]"
|
||||
hx-vars="properties:{{ properties_str }},offset:{{ prev_offset }}"
|
||||
hx-vars="{{ hx_vars }}"
|
||||
hx-target="#search-results"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-chevron-left" aria-hidden="true"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if next_offset is not none %}
|
||||
{% set hx_vars = build_hx_vars({"properties": properties_str, "offset": next_offset}, order_params_dict) %}
|
||||
<button class="text-beige mx-2"
|
||||
hx-get="/api/temes/busca"
|
||||
hx-include="[name=query]"
|
||||
hx-vars="properties:{{ properties_str }},offset:{{ next_offset }}"
|
||||
hx-vars="{{ hx_vars }}"
|
||||
hx-target="#search-results"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
|
||||
Reference in New Issue
Block a user