56 lines
1.8 KiB
HTML
56 lines
1.8 KiB
HTML
<li class="flex flex-row grow items-center
|
|
m-4 rounded-lg bg-white
|
|
px-2 py-1 my-1"
|
|
id="set-entry-{{ set_id }}"
|
|
hx-get="/api/sessio/{{ session_id }}/set/{{ set_id }}"
|
|
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>
|
|
</li>
|