Tota la set entry ara linka o bé al set o al tema
This commit is contained in:
@@ -6,50 +6,50 @@
|
||||
hx-target="#set-entry-{{ set_id }}"
|
||||
hx-swap="outerHTML"
|
||||
hx-trigger="reload-set-{{ set_id }}">
|
||||
<div class="flex-1"></div>
|
||||
<div class="flex flex-col
|
||||
items-start
|
||||
py-2 mx-2
|
||||
w-full max-w-[655px]">
|
||||
{% if logged_in %}
|
||||
<button class="text-beige w-full"
|
||||
hx-delete="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
Esborra el set
|
||||
</button>
|
||||
{% endif %}
|
||||
<ol id="set-entry-{{ set_id }}-list"
|
||||
class="flex flex-col items-start w-full">
|
||||
{% for tema_entry in set_entry.temes %}
|
||||
{% if new_entry %}
|
||||
{% include "fragments/sessio/tema_editor.html" %}
|
||||
{% else %}
|
||||
{% include "fragments/sessio/tema_entry.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% if logged_in %}
|
||||
<button class="text-beige mt-2 w-full"
|
||||
hx-post="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}-list"
|
||||
hx-swap="beforeend transition:true">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
Afegeix un tema
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<a title="Mostra els temes"
|
||||
class="text-beige"
|
||||
{% if set_entry.temes | length > 1 or not set_entry.temes[0] %}
|
||||
href="/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
{% else %}
|
||||
href="/tema/{{ set_entry.temes[0].tema_id }}"
|
||||
{% endif %}
|
||||
>
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
{% if set_entry.temes | length > 1 or not set_entry.temes[0] %}
|
||||
{% set set_url = "/sessio/%d/set/%d" | format(session_id, set_id) %}
|
||||
{% else %}
|
||||
{% set set_url = "/tema/%d" | format(set_entry.temes[0].tema_id) %}
|
||||
{% endif %}
|
||||
<a href="{{ set_url }}"
|
||||
class="flex flex-row grow items-center cursor-pointer"
|
||||
title="Mostra els temes">
|
||||
<div class="flex-1"></div>
|
||||
<div class="flex flex-col
|
||||
items-start
|
||||
py-2 mx-2
|
||||
w-full max-w-[655px]">
|
||||
{% if logged_in %}
|
||||
<button class="text-beige w-full"
|
||||
hx-delete="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}"
|
||||
hx-swap="outerHTML">
|
||||
<i class="fa fa-times" aria-hidden="true"></i>
|
||||
Esborra el set
|
||||
</button>
|
||||
{% endif %}
|
||||
<ol id="set-entry-{{ set_id }}-list"
|
||||
class="flex flex-col items-start w-full">
|
||||
{% for tema_entry in set_entry.temes %}
|
||||
{% if new_entry %}
|
||||
{% include "fragments/sessio/tema_editor.html" %}
|
||||
{% else %}
|
||||
{% include "fragments/sessio/tema_entry.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% if logged_in %}
|
||||
<button class="text-beige mt-2 w-full"
|
||||
hx-post="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
||||
hx-target="#set-entry-{{ set_id }}-list"
|
||||
hx-swap="beforeend transition:true">
|
||||
<i class="fa fa-plus" aria-hidden="true"></i>
|
||||
Afegeix un tema
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex-1 text-beige">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<li id="tune-entry-{{ tema_entry.id }}"
|
||||
class="flex flex-col w-full">
|
||||
<div class="flex flex-row my-1 w-full">
|
||||
<div class="flex-1 min-w-0 text-black font-bold">
|
||||
<div class="flex-1 min-w-0
|
||||
text-black font-bold
|
||||
break-words block">
|
||||
{% if tema_entry.tema %}
|
||||
<a href="/tema/{{ tema_entry.tema_id }}"
|
||||
class="break-words block">
|
||||
{{ tema_entry.tema.title }}
|
||||
</a>
|
||||
{% else %}
|
||||
<i class="fa fa-question" aria-hidden="true"></i>
|
||||
<i>(Desconegut)</i>
|
||||
@@ -33,10 +32,8 @@
|
||||
</div>
|
||||
<div class="my-1 w-full">
|
||||
{% if tema_entry.tema and tema_entry.tema.main_score() and tema_entry.tema.main_score().preview_url %}
|
||||
<a href="/tema/{{ tema_entry.tema.id }}">
|
||||
<img class="px-4 pb-2"
|
||||
<img class="pb-2"
|
||||
src="{{ tema_entry.tema.main_score().preview_url }}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user