show archived shared templates
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<%= svg_icon('calendar', class: 'w-4 h-4') %>
|
||||
<span><%= l(template.created_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) %></span>
|
||||
</span>
|
||||
<% if template.archived_at? %>
|
||||
<% if local_assigns[:with_folder] %>
|
||||
<span class="flex items-center space-x-1 w-1/2">
|
||||
<%= svg_icon('folder', class: 'w-4 h-4 flex-shrink-0') %>
|
||||
<span class="truncate"><%= template.folder.full_name %></span>
|
||||
@@ -37,14 +37,14 @@
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if template.archived_at? && can?(:update, template) %>
|
||||
<% if template.archived_at? && can?(:destroy, template) %>
|
||||
<span class="tooltip tooltip-left" data-tip="<%= t('restore') %>">
|
||||
<%= button_to template_restore_index_path(template), class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle' do %>
|
||||
<%= svg_icon('rotate', class: 'w-4 h-4 enabled') %>
|
||||
<%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% elsif can?(:update, template) %>
|
||||
<% elsif !template.archived_at? && can?(:update, template) %>
|
||||
<span class="tooltip tooltip-left" data-tip="<%= t('edit') %>">
|
||||
<a href="<%= edit_template_path(template) %>" class="btn btn-xs hover:btn-outline bg-base-200 btn-circle">
|
||||
<%= svg_icon('pencil', class: 'w-4 h-4') %>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if template.archived_at? %>
|
||||
<% if can?(:create, template) %>
|
||||
<% if can?(:destroy, template) %>
|
||||
<%= button_to button_title(title: t('restore'), disabled_with: t('restoring')[..-4], icon: svg_icon('rotate', class: 'w-6 h-6')), template_restore_index_path(template), class: 'btn btn-outline btn-sm flex-1' %>
|
||||
<% end %>
|
||||
<%= link_to template_preview_path(template), class: 'btn btn-outline btn-sm flex-1' do %>
|
||||
|
||||
Reference in New Issue
Block a user