2023-03-05 17:23:16 +01:00
|
|
|
<.header>
|
|
|
|
Listing Notes
|
|
|
|
<:actions>
|
2023-03-06 19:57:19 +01:00
|
|
|
<.link href={~p"/admin/notes/new"}>
|
2023-03-05 17:23:16 +01:00
|
|
|
<.button>New Note</.button>
|
|
|
|
</.link>
|
|
|
|
</:actions>
|
|
|
|
</.header>
|
|
|
|
|
2023-03-06 19:57:19 +01:00
|
|
|
<.table id="notes" rows={@notes} row_click={&JS.navigate(~p"/admin/notes/#{&1}")}>
|
2023-03-05 17:23:16 +01:00
|
|
|
<:col :let={note} label="Name"><%= note.name %></:col>
|
2023-03-13 03:27:17 +01:00
|
|
|
<:col :let={note} label="Published at"><%= from_now(note.published_at) %></:col>
|
2023-03-05 17:23:16 +01:00
|
|
|
<:col :let={note} label="Kind"><%= note.kind %></:col>
|
|
|
|
<:action :let={note}>
|
|
|
|
<div class="sr-only">
|
2023-03-06 19:57:19 +01:00
|
|
|
<.link navigate={~p"/admin/notes/#{note}"}>Show</.link>
|
2023-03-05 17:23:16 +01:00
|
|
|
</div>
|
2023-03-06 19:57:19 +01:00
|
|
|
<.link navigate={~p"/admin/notes/#{note}/edit"}>Edit</.link>
|
2023-03-05 17:23:16 +01:00
|
|
|
</:action>
|
|
|
|
<:action :let={note}>
|
2023-03-06 19:57:19 +01:00
|
|
|
<.link href={~p"/admin/notes/#{note}"} method="delete" data-confirm="Are you sure?">
|
2023-03-05 17:23:16 +01:00
|
|
|
Delete
|
|
|
|
</.link>
|
|
|
|
</:action>
|
|
|
|
</.table>
|