{% extends 'base.html.twig' %} {% block title %}Album Search{% endblock %} {% block body %} {% set query_value = query|default('') %} {% set album_value = album|default('') %} {% set artist_value = artist|default('') %} {% set year_from_value = year_from|default('') %} {% set year_to_value = year_to|default('') %} {% set genre_value = genre|default('') %} {% set source_value = source|default('all') %} {% set user_only_value = source_value == 'user' %} {% set has_search = (query_value is not empty) or (album_value is not empty) or (artist_value is not empty) or (genre_value is not empty) or (year_from_value is not empty) or (year_to_value is not empty) or (source_value != 'all') %} {% set advanced_open = (album_value is not empty) or (artist_value is not empty) or (genre_value is not empty) or (year_from_value is not empty) or (year_to_value is not empty) or (source_value != 'all') %} {% set landing_view = not has_search %} {% if landing_view %} {% endif %}

Search Albums

{% if source_value != 'user' and externalConfigured is defined and not externalConfigured %}
Last.fm is not configured yet. Results will only include user-created albums. {% if is_granted('ROLE_ADMIN') %} Enter Last.fm API key. {% endif %}
{% endif %}
{% if landing_view %}
{% else %}
{% endif %}
{% if albums is defined and albums|length > 0 %}
{% for album in albums %} {% include 'album/_search_card.html.twig' with { album: album, stats: stats, savedIds: savedIds } %} {% endfor %}
{% if has_search %}
{% endif %} {% elseif query or album or artist or genre or year_from or year_to %}

No albums found.

{% endif %} {% if albums is defined and albums|length > 0 %} {% set card_data_url_template = path('album_card_data', {id: '__ALBUM_ID__'}) %} {% set show_url_template = path('album_show', {id: '__ALBUM_ID__'}) %} {% set batch_url = path('album_search_batch') %} {% endif %} {% endblock %}