mirror of
https://github.com/krateng/maloja.git
synced 2025-06-06 02:13:37 +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>
|
<td class='searchProvider'>{{ links.link_search(entity) }}</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<td class='track'>
|
<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>
|
</td>
|
||||||
{% elif entity is mapping and 'albumtitle' in entity %}
|
{% elif entity is mapping and 'albumtitle' in entity %}
|
||||||
<td class='album'>
|
<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>
|
</td>
|
||||||
{% else %}
|
{% else %}
|
||||||
<td class='artist'>{{ links.link(entity) }}
|
<td class='artist'>{{ links.link(entity) }}
|
||||||
|
@ -8,9 +8,11 @@
|
|||||||
<a href="{{ url(entity) }}">{{ name | e }}</a>
|
<a href="{{ url(entity) }}">{{ name | e }}</a>
|
||||||
{%- endmacro %}
|
{%- endmacro %}
|
||||||
|
|
||||||
{% macro links(entities) -%}
|
{% macro links(entities, restrict_amount=False) -%}
|
||||||
{% if entities is none or entities == [] %}
|
{% if entities is none or entities == [] %}
|
||||||
{{ settings["DEFAULT_ALBUM_ARTIST"] }}
|
{{ settings["DEFAULT_ALBUM_ARTIST"] }}
|
||||||
|
{% elif entities.__len__() > 3 and restrict_amount %}
|
||||||
|
{{ link(entities[0]) }} et al.
|
||||||
{% else %}
|
{% else %}
|
||||||
{% for entity in entities -%}
|
{% for entity in entities -%}
|
||||||
{{ link(entity) }}{{ ", " if not loop.last }}
|
{{ link(entity) }}{{ ", " if not loop.last }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user