diff --git a/frontends/etiquette_flask/templates/search.html b/frontends/etiquette_flask/templates/search.html
index a0c0432..fa04d60 100644
--- a/frontends/etiquette_flask/templates/search.html
+++ b/frontends/etiquette_flask/templates/search.html
@@ -193,12 +193,12 @@
{% for tagtype in ["musts", "mays", "forbids"] %}
-
+
Tag {{tagtype}}:
{% set key="tag_" + tagtype %}
- {% if search_kwargs[key] %}
- {% for tag in search_kwargs[key] %}
+ {% if search_kwargs|attr(key) %}
+ {% for tag in search_kwargs|attr(key) %}
{{cards.create_tag_card(tag, link='info', with_alt_description=True)}}
{% endfor %}
-
+
Tag Expression:
Order by
- {% if "orderby" in search_kwargs and search_kwargs["orderby"] %}
- {% for orderby in search_kwargs["orderby"] %}
+ {% if search_kwargs.orderby %}
+ {% for orderby in search_kwargs.orderby %}
{% set column, sorter=orderby.split("-") %}
{{ create_orderby_li(selected_column=column, selected_sorter=sorter) }}
{% endfor %}
@@ -235,97 +235,98 @@
Min-max values
Other filters
{% set limit_options = [20, 50, 100, 200, 500, 1000] %}
- {% if search_kwargs['limit'] not in limit_options %}
- {% do limit_options.append(search_kwargs['limit']) %}
+ {% if search_kwargs.limit not in limit_options %}
+ {% do limit_options.append(search_kwargs.limit) %}
{% do limit_options.sort() %}
{% endif %}
{% for limit_option in limit_options %}
-
+
{{- limit_option }} items{{''-}}
{% endfor %}
- Album or no album
- Photos contained in albums
- Photos not in albums
+ Album or no album
+ Photos contained in albums
+ Photos not in albums
- Tagged or untagged
- Tagged only
- Untagged only
+ Tagged or untagged
+ Tagged only
+ Untagged only
- Thumbnail or no thumbnail
- Has thumbnail
- No thumbnail
+ Thumbnail or no thumbnail
+ Has thumbnail
+ No thumbnail
- Include albums
- Don't include albums
+ Include albums
+ Don't include albums
- Include photos
- Don't include photos
+ Include photos
+ Don't include photos
- Grid view
- List view
+ Grid view
+ List view
Search
Swipe UI
+
{% if total_tags %}
Tags on this page:
@@ -381,9 +382,9 @@
{% for result in results %}
{% if result.__class__.__name__ == 'Photo' %}
- {{cards.create_photo_card(result, view=search_kwargs["view"])}}
+ {{cards.create_photo_card(result, view=search_kwargs.view)}}
{% elif result.__class__.__name__ == 'Album' %}
- {{cards.create_album_card(result, view=search_kwargs["view"])}}
+ {{cards.create_album_card(result, view=search_kwargs.view)}}
{% endif %}
{% endfor %}
@@ -403,7 +404,7 @@ selected form values are these.
const PARAM_DEFAULTS = {
'limit': 50,
'view': 'grid',
- 'yield_albums': 'yes',
+ 'yield_albums': 'no',
'yield_photos': 'yes'
}
@@ -731,8 +732,8 @@ const inputted_mays = [];
const inputted_forbids = [];
{% for tagtype in ["musts", "mays", "forbids"] %}
{% set key="tag_" + tagtype %}
- {% if search_kwargs[key] %}
- {% for tag in search_kwargs[key] %}
+ {% if search_kwargs|attr(key) %}
+ {% for tag in search_kwargs|attr(key) %}
inputted_{{tagtype}}.push("{{tag.name|safe}}");
{% endfor %}
{% endif %}