exmr/lib/exmr_web/live/exam_live/show.html.heex
2024-11-14 23:33:29 +02:00

27 lines
806 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>