Files
volleyball_miniapp/templates/partials/player_row.html
2026-07-01 17:58:05 +03:00

28 lines
1.2 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div
class="player-row glass glass-hover rounded-2xl p-4 flex items-center justify-between gap-3 transition"
data-player-id="{{ player.id }}"
data-player-name="{{ player.name|lower }}"
>
<div class="min-w-0">
<div class="text-base font-medium truncate">{{ player.name }}</div>
<div class="text-xs text-slate-400">Нажмите, чтобы {% if present %}снять отметку{% else %}отметиться{% endif %}</div>
</div>
<form class="attendance-form flex items-center gap-3" method="post" action="/api/attendance/toggle">
<input type="hidden" name="player_id" value="{{ player.id }}" />
<input type="hidden" name="session_date" value="{{ session_date if session_date is defined else selected_date }}" />
<button
type="submit"
class="min-w-[120px] sm:min-w-[140px] px-4 py-2 rounded-xl text-sm font-semibold border transition
{% if present %}
bg-emerald-600 border-emerald-500 text-white
{% else %}
bg-slate-950/50 border-slate-800 text-slate-200 hover:border-slate-600
{% endif %}"
>
{% if present %}Пришёл{% else %}Не пришёл{% endif %}
</button>
</form>
</div>