29 lines
1 KiB
Text
29 lines
1 KiB
Text
<.header>
|
|
<.icon name="hero-speaker-wave" /> Channels
|
|
<:subtitle>Channels are collections for your notes.</:subtitle>
|
|
<:actions>
|
|
<.link href={~p"/admin/channels/new"}>
|
|
<.button>New Channel</.button>
|
|
</.link>
|
|
</:actions>
|
|
</.header>
|
|
|
|
<.table id="channels" rows={@channels} row_click={&JS.navigate(~p"/admin/channels/#{&1}")}>
|
|
<:col :let={channel} label="Name"><%= channel.name %></:col>
|
|
<:col :let={channel} label="Visibility">
|
|
<%= Chiya.Channels.Channel.icon(channel) %> <%= channel.visibility %>
|
|
</:col>
|
|
<:col :let={channel} label="Notes"><%= Enum.count(channel.notes) %></:col>
|
|
<:col :let={channel} label="Slug"><%= channel.slug %></:col>
|
|
<:action :let={channel}>
|
|
<div class="sr-only">
|
|
<.link navigate={~p"/admin/channels/#{channel}"}>Show</.link>
|
|
</div>
|
|
<.link navigate={~p"/admin/channels/#{channel}/edit"}>Edit</.link>
|
|
</:action>
|
|
<:action :let={channel}>
|
|
<.link href={~p"/admin/channels/#{channel}"} method="delete" data-confirm="Are you sure?">
|
|
Delete
|
|
</.link>
|
|
</:action>
|
|
</.table>
|