Files
sure/app/views/chats/_chat.html.erb
Alex Hatzenbuhler c022e862aa Add ability to delete all tags (#2200)
* Add ability to delete all tags

* Downcase resource for confirmation

* Clean up deletion resource names

* titleize button
2025-05-05 12:43:46 -04:00

23 lines
765 B
Plaintext

<%# locals: (chat:) %>
<%= tag.div class: "flex items-center justify-between px-4 py-3 bg-container shadow-border-xs rounded-lg" do %>
<div class="grow">
<%= render "chats/chat_title", chat: chat, ctx: "list" %>
<p class="text-sm text-secondary">
<%= time_ago_in_words(chat.updated_at) %> ago
</p>
</div>
<%= render MenuComponent.new(icon_vertical: true) do |menu| %>
<% menu.with_item(variant: "link", text: "Edit chat", href: edit_chat_path(chat), icon: "pencil", frame: dom_id(chat, "title")) %>
<% menu.with_item(
variant: "button",
text: "Delete chat",
href: chat_path(chat),
icon: "trash-2",
method: :delete,
confirm: CustomConfirm.for_resource_deletion("chat")) %>
<% end %>
<% end %>