diff --git a/app/views/icons/_archive.html.erb b/app/views/icons/_archive.html.erb new file mode 100644 index 00000000..51ac5900 --- /dev/null +++ b/app/views/icons/_archive.html.erb @@ -0,0 +1 @@ + diff --git a/app/views/templates/_template.html.erb b/app/views/templates/_template.html.erb index bad6bc5f..5a40e982 100644 --- a/app/views/templates/_template.html.erb +++ b/app/views/templates/_template.html.erb @@ -55,7 +55,7 @@ <% if can?(:destroy, template) %> <%= button_to template_path(template), data: { turbo_confirm: template.deleted_at? ? 'Template deletion is irreversible and will permanently remove all associated signed documents with it. Are you sure?' : 'Are you sure?' }, params: { permanently: template.deleted_at? }.compact_blank, method: :delete, class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle', aria_label: 'Restore' do %> - <%= svg_icon('trash', class: 'w-4 h-4 enabled') %> + <%= svg_icon(template.deleted_at? ? 'trash' : 'archive', class: 'w-4 h-4 enabled') %> <%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %> <% end %> diff --git a/app/views/templates/_title.html.erb b/app/views/templates/_title.html.erb index 6026dfab..a7ea796f 100644 --- a/app/views/templates/_title.html.erb +++ b/app/views/templates/_title.html.erb @@ -27,7 +27,7 @@ <%= render 'shared/clipboard_copy', text: start_form_url(slug: @template.slug), class: 'btn btn-sm btn-neutral text-white', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy Link', copied_title: 'Copied', copy_title_md: 'Link', copied_title_md: 'Copied' %> <% end %> <% if !template.deleted_at? && can?(:destroy, template) %> - <%= button_to button_title(title: 'Remove', disabled_with: 'Removing', title_class: 'hidden md:inline', icon: svg_icon('trash', class: 'w-6 h-6')), template_path(template), class: 'btn btn-outline btn-sm', method: :delete, data: { turbo_confirm: 'Are you sure?' } %> + <%= button_to button_title(title: 'Archive', disabled_with: 'Archiving', title_class: 'hidden md:inline', icon: svg_icon('archive', class: 'w-6 h-6')), template_path(template), class: 'btn btn-outline btn-sm', method: :delete, data: { turbo_confirm: 'Are you sure?' } %> <% end %> <% if can?(:create, template) %> <%= link_to new_template_path(base_template_id: template.id), class: 'btn btn-outline btn-sm', data: { turbo_frame: :modal } do %>