18 lines
497 B
Text
18 lines
497 B
Text
<.simple_form :let={f} for={@changeset} action={@action}>
|
|
<.input field={f[:title]} type="text" label="Заголовок" />
|
|
<.input field={f[:markdown]} type="textarea" label="Содержание (markdown)" />
|
|
|
|
<:actions>
|
|
<.button>Сохранить</.button>
|
|
</:actions>
|
|
</.simple_form>
|
|
|
|
<%= if @changeset.data.id do %>
|
|
<.link
|
|
href={~p"/admin/notes/#{@changeset.data}"}
|
|
method="DELETE"
|
|
data-confirm="Вы уверены?"
|
|
>
|
|
Удалить
|
|
</.link>
|
|
<% end %>
|