Session editor and live sessions!
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
<li class="flex flex-row grow items-center
|
||||
border border-beige rounded
|
||||
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 flex flex-col items-center">
|
||||
{% if logged_in %}
|
||||
<button class="text-beige mt-2"
|
||||
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-center">
|
||||
{% 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"
|
||||
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="ml-auto">
|
||||
<a title="Mostra els temes"
|
||||
class="text-beige"
|
||||
href="/sessio/{{ session_id }}/set/{{ set_id }}">
|
||||
<i class="fa fa-chevron-right" aria-hidden="true"></i>
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
Reference in New Issue
Block a user