25 lines
867 B
Text
25 lines
867 B
Text
<.header>
|
|
<.icon name="hero-document-text" /> Comments
|
|
<:subtitle>Comments are attached to notes</:subtitle>
|
|
</.header>
|
|
|
|
<.table id="comments" rows={@comments} row_click={&JS.navigate(~p"/admin/comments/#{&1}")}>
|
|
<:col :let={comment} label="Author"><%= comment.author_name %></:col>
|
|
<:col :let={comment} label="Inserted at"><%= from_now(comment.inserted_at) %></:col>
|
|
<:col :let={comment} label="Approved at"><%= from_now(comment.approved_at) %></:col>
|
|
<:action :let={comment}>
|
|
<div class="sr-only">
|
|
<.link navigate={~p"/admin/comments/#{comment}"}>Show</.link>
|
|
</div>
|
|
</:action>
|
|
<:action :let={_comment}>
|
|
<.link href="#" method="delete" data-confirm="Are you sure?">
|
|
Delete
|
|
</.link>
|
|
</:action>
|
|
<:action :let={_comment}>
|
|
<div class="sr-only">
|
|
<.link href="#">Approve</.link>
|
|
</div>
|
|
</:action>
|
|
</.table>
|