mirror of
https://github.com/docusealco/docuseal
synced 2026-11-10 15:42:32 -05:00
archived nav
This commit is contained in:
1 parent
a4ca0abba1
commit
8259ebdb6c
9 files changed
+42
-20
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<div class="h-36 relative group min-w-0">
|
||||
<a href="<%= template_path(template) %>" class="flex h-full flex-col justify-between rounded-2xl pt-6 px-7 w-full bg-base-200 before:border-2 before:border-base-300 before:border-dashed before:absolute before:left-0 before:right-0 before:top-0 before:bottom-0 before:hidden before:rounded-2xl" data-targets="dashboard-dropzone.templateCards">
|
||||
<a href="<%= template_path(template) %>" class="flex h-full flex-col justify-between rounded-2xl pt-6 px-7 w-full bg-base-200 before:border-2 before:border-base-300 before:border-dashed before:absolute before:left-0 before:right-0 before:top-0 before:bottom-0 before:hidden before:rounded-2xl" data-targets="dashboard-dropzone.templateCards" data-native-actions="<%= 'pencil,menu' if turbo_native_app? && !template.archived_at? && can?(:update, template) %>">
|
||||
<div class="text-xl font-semibold" style="line-height: 1.6rem; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;">
|
||||
<% if template.template_accesses.present? %>
|
||||
<%= svg_icon('lock', class: 'w-6 h-6 inline -translate-y-[4px]') %>
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
<% end %>
|
||||
<% if template.archived_at? || (!can?(:update, template) && can?(:read, template)) %>
|
||||
<native-action data-section="edit" data-icon="file_text" data-label="<%= t('preview') %>">
|
||||
<a href="<%= template_preview_path(template) %>"></a>
|
||||
<a href="<%= template_preview_path(template) %>" data-native-title="<%= template.name %>"></a>
|
||||
</native-action>
|
||||
<% end %>
|
||||
<% if local_assigns[:with_export] %>
|
||||
@@ -117,11 +117,14 @@
|
||||
<% end %>
|
||||
<% if can?(:destroy, template) %>
|
||||
<% if template.archived_at? %>
|
||||
<native-action data-section="archive" data-icon="rotate" data-label="<%= t('restore') %>">
|
||||
<native-action data-section="edit" data-icon="rotate" data-label="<%= t('restore') %>">
|
||||
<%= button_to '', template_restore_index_path(template) %>
|
||||
</native-action>
|
||||
<native-action data-icon="trash" data-label="<%= t('delete') %>" data-destructive="true">
|
||||
<%= button_to '', template_path(template), method: :delete, params: { permanently: true }, data: { turbo_confirm: t('template_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } %>
|
||||
</native-action>
|
||||
<% else %>
|
||||
<native-action data-section="archive" data-icon="archive" data-label="<%= t('archive') %>">
|
||||
<native-action data-section="edit" data-icon="archive" data-label="<%= t('archive') %>">
|
||||
<%= button_to '', template_path(template), method: :delete %>
|
||||
</native-action>
|
||||
<% end %>
|
||||
|
||||
@@ -133,7 +133,9 @@
|
||||
<% view_archived_html = capture do %>
|
||||
<% if (can?(:manage, :countless) || @template.submissions.where.not(archived_at: nil).exists?) && !@template.archived_at? %>
|
||||
<div>
|
||||
<a href="<%= template_archived_index_path(@template) %>" class="link text-sm"><%= t('view_archived') %></a>
|
||||
<native-action data-placement="menu" data-label="<%= t('archived_submissions') %>">
|
||||
<a href="<%= template_archived_index_path(@template) %>" class="link text-sm" data-native-title="<%= t('archived') %>"><%= t('view_archived') %></a>
|
||||
</native-action>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user