Simplify {%if x%} to just {{x or ''}.

This commit is contained in:
voussoir 2020-09-09 13:13:04 -07:00
parent 6d5cd11612
commit edca32e81c

View file

@ -200,9 +200,7 @@
<div id="search_builder_expression" {% if not search_kwargs["tag_expression"]%}style="display:none"{%endif%}>
<span>Tag Expression:</span>
<input id="search_builder_expression_input" name="tag_expression" type="text"
{% if search_kwargs["tag_expression"] %}
value="{{search_kwargs["tag_expression"]}}"
{% endif %}
value="{{search_kwargs['tag_expression'] or ''}}"
>
</div>
<div id="search_builder_orderby">
@ -255,7 +253,7 @@
<span>Other filters</span>
<input type="text" class="basic_param"
{%if search_kwargs['filename']%} value="{{search_kwargs['filename']}}" {%endif%}
value="{{search_kwargs['filename'] or ''}}"
name="filename" placeholder="Filename">
<input type="text" class="basic_param"