exmr/lib/exmr_web/live/exam_live/show.html.heex
Vladimir Rubin 65308f8bda
All checks were successful
Checks / check (pull_request) Successful in -6m26s
style: mix format
2024-12-12 18:52:36 +02:00

27 lines
786 B
Text

<.header>
exam №{@exam.id}
<:subtitle>очередная контрольная работа по <strong>{@exam.subject}</strong></:subtitle>
<:actions>
<.link patch={~p"/exams/#{@exam}/show/edit"} phx-click={JS.push_focus()}>
<.button>изменить</.button>
</.link>
</:actions>
</.header>
<.list>
<:item title="Description">{@exam.description}</:item>
<:item title="Date">{@exam.date}</:item>
</.list>
<.back navigate={~p"/exams"}>Back to exams</.back>
<.modal :if={@live_action == :edit} id="exam-modal" show on_cancel={JS.patch(~p"/exams/#{@exam}")}>
<.live_component
module={ExmrWeb.ExamLive.FormComponent}
id={@exam.id}
title={@page_title}
action={@live_action}
exam={@exam}
patch={~p"/exams/#{@exam}"}
/>
</.modal>