mirror of
https://github.com/krateng/maloja.git
synced 2025-04-12 07:00:02 +03:00
Restrict shown artists in cells
This commit is contained in:
parent
915808a020
commit
33ed2abdea
@ -20,11 +20,11 @@
|
||||
<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) }}
|
||||
<span class='artist_in_trackcolumn'>{{ links.links(entity.artists, restrict_amount=True) }}</span> – {{ links.link(entity) }}
|
||||
</td>
|
||||
{% elif entity is mapping and 'albumtitle' in entity %}
|
||||
<td class='album'>
|
||||
<span class='artist_in_albumcolumn'>{{ links.links(entity.artists) }}</span> – {{ links.link(entity) }}
|
||||
<span class='artist_in_albumcolumn'>{{ links.links(entity.artists, restrict_amount=True) }}</span> – {{ links.link(entity) }}
|
||||
</td>
|
||||
{% else %}
|
||||
<td class='artist'>{{ links.link(entity) }}
|
||||
|
@ -8,9 +8,11 @@
|
||||
<a href="{{ url(entity) }}">{{ name | e }}</a>
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro links(entities) -%}
|
||||
{% macro links(entities, restrict_amount=False) -%}
|
||||
{% if entities is none or entities == [] %}
|
||||
{{ settings["DEFAULT_ALBUM_ARTIST"] }}
|
||||
{% elif entities.__len__() > 3 and restrict_amount %}
|
||||
{{ link(entities[0]) }} et al.
|
||||
{% else %}
|
||||
{% for entity in entities -%}
|
||||
{{ link(entity) }}{{ ", " if not loop.last }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user