maloja/maloja/web/jinja/snippets/entityrow.jinja

29 lines
846 B
Django/Jinja
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% macro row(entity,counting=[]) %}
{% import 'snippets/links.jinja' as links %}
{% if 'artists' in entity %}
{% set img = utilities.getTrackImage(artists=entity.artists,title=entity.title,fast=True) %}
{% else %}
{% set img = utilities.getArtistImage(entity,fast=True) %}
{% endif %}
<td class='icon'><div style="background-image:url('{{ img }}')"></div></td>
{% if "artists" in entity %}
{% if settings['TRACK_SEARCH_PROVIDER'] %}
<td class='searchProvider'>{{ links.link_search(entity) }}</td>
{% endif %}
<td class='track'>
<span class='artist_in_trackcolumn'>{{ links.links(entity.artists) }}</span> {{ links.link(entity) }}
</td>
{% else %}
<td class='artist'>{{ links.link(entity) }}
{% if counting != [] %}
<span class='extra'>incl. {{ links.links(counting) }}</span>
{% endif %}
</td>
{% endif %}
{% endmacro %}