|
|
|
@ -19,7 +19,7 @@
|
|
|
|
<%= svg_icon('calendar', class: 'w-4 h-4') %>
|
|
|
|
<%= 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><%= l(template.created_at.in_time_zone(current_account.timezone), format: :short, locale: current_account.locale) %></span>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<% if template.archived_at? %>
|
|
|
|
<% if local_assigns[:with_folder] %>
|
|
|
|
<span class="flex items-center space-x-1 w-1/2">
|
|
|
|
<span class="flex items-center space-x-1 w-1/2">
|
|
|
|
<%= svg_icon('folder', class: 'w-4 h-4 flex-shrink-0') %>
|
|
|
|
<%= svg_icon('folder', class: 'w-4 h-4 flex-shrink-0') %>
|
|
|
|
<span class="truncate"><%= template.folder.full_name %></span>
|
|
|
|
<span class="truncate"><%= template.folder.full_name %></span>
|
|
|
|
@ -37,14 +37,14 @@
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if template.archived_at? && can?(:update, template) %>
|
|
|
|
<% if template.archived_at? && can?(:destroy, template) %>
|
|
|
|
<span class="tooltip tooltip-left" data-tip="<%= t('restore') %>">
|
|
|
|
<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 %>
|
|
|
|
<%= 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('rotate', class: 'w-4 h-4 enabled') %>
|
|
|
|
<%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
|
|
|
|
<%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
<% elsif can?(:update, template) %>
|
|
|
|
<% elsif !template.archived_at? && can?(:update, template) %>
|
|
|
|
<span class="tooltip tooltip-left" data-tip="<%= t('edit') %>">
|
|
|
|
<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">
|
|
|
|
<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') %>
|
|
|
|
<%= svg_icon('pencil', class: 'w-4 h-4') %>
|
|
|
|
|