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