mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Add "Edit" and "Delete" icons to family show page
This commit is contained in:
parent
a3b5210b41
commit
2a85735aee
4 changed files with 8 additions and 4 deletions
1
app/assets/svg/icons/lucide/outline/square-pen.svg
Normal file
1
app/assets/svg/icons/lucide/outline/square-pen.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-square-pen-icon lucide-square-pen"><path d="M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"/></svg>
|
||||
|
After Width: | Height: | Size: 445 B |
1
app/assets/svg/icons/lucide/outline/trash-2.svg
Normal file
1
app/assets/svg/icons/lucide/outline/trash-2.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-trash2-icon lucide-trash-2"><path d="M10 11v6"/><path d="M14 11v6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M3 6h18"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
|
||||
|
After Width: | Height: | Size: 398 B |
|
|
@ -88,7 +88,7 @@
|
|||
<% if policy(@family).destroy? %>
|
||||
<%= link_to family_path(@family),
|
||||
method: :delete,
|
||||
data: { turbo_confirm: 'Are you sure you want to delete this family? This action cannot be undone and will remove all members.' },
|
||||
data: { confirm: 'Are you sure you want to delete this family? This action cannot be undone.', turbo_confirm: 'Are you sure you want to delete this family? This action cannot be undone.' },
|
||||
class: "text-red-600 hover:text-red-800 dark:text-red-400 dark:hover:text-red-300 font-medium" do %>
|
||||
Delete Family
|
||||
<% end %>
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@
|
|||
<% if policy(@family).update? %>
|
||||
<%= link_to edit_family_path(@family),
|
||||
class: "bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 text-white px-4 py-2 rounded-md font-medium transition-colors duration-200" do %>
|
||||
<%= t('families.show.edit', default: 'Edit Family') %>
|
||||
<%= icon 'square-pen', class: "inline-block w-4 h-4 mr-2 -mt-1" %>
|
||||
<%= t('families.show.edit', default: 'Edit') %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
|
|
@ -35,7 +36,8 @@
|
|||
method: :delete,
|
||||
data: { confirm: 'Are you sure you want to delete this family? This action cannot be undone.', turbo_confirm: 'Are you sure you want to delete this family? This action cannot be undone.' },
|
||||
class: "bg-red-600 hover:bg-red-700 dark:bg-red-500 dark:hover:bg-red-600 text-white px-4 py-2 rounded-md font-medium transition-colors duration-200" do %>
|
||||
Delete Family
|
||||
<%= icon 'trash-2', class: "inline-block w-4 h-4 mr-2 -mt-1" %>
|
||||
Delete
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue