exmr/lib/exmr_web/live/exam_live/show.html.heex

28 lines
786 B
Text
Raw Permalink Normal View History

2024-11-14 23:33:29 +02:00
<.header>
2024-12-12 18:52:36 +02:00
exam №{@exam.id}
<:subtitle>очередная контрольная работа по <strong>{@exam.subject}</strong></:subtitle>
2024-11-14 23:33:29 +02:00
<:actions>
<.link patch={~p"/exams/#{@exam}/show/edit"} phx-click={JS.push_focus()}>
<.button>изменить</.button>
</.link>
</:actions>
</.header>
<.list>
2024-12-12 18:52:36 +02:00
<:item title="Description">{@exam.description}</:item>
<:item title="Date">{@exam.date}</:item>
2024-11-14 23:33:29 +02:00
</.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>