<%= template.name %> <% if template.deleted_at? %> Archived <% end %>

<% if !template.deleted_at? %> <%= 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?' } %> <% 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 %> <%= svg_icon('copy', class: 'w-6 h-6') %> <% end %> <% end %> <% if !template.deleted_at? && can?(:update, template) %> <%= link_to edit_template_path(template), class: 'btn btn-outline btn-sm' do %> <%= svg_icon('pencil', class: 'w-6 h-6') %> Edit <% end %> <% end %> <% if template.deleted_at? && can?(:create, template) %> <%= button_to button_title(title: 'Restore', disabled_with: 'Restoring', icon: svg_icon('rotate', class: 'w-6 h-6')), template_restore_index_path(template), class: 'btn btn-outline btn-sm' %> <% end %>