adjust template preview

This commit is contained in:
Pete Matsyburka committed 2026-09-23 10:59:54 +03:00
1 parent 27e5c2c81e
commit d59776e8f5
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -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" data-native-actions="<%= 'pencil,menu' if turbo_native_app? && !template.archived_at? && can?(:update, template) %>">
<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="<%= (!template.archived_at? && can?(:update, template) ? 'pencil,menu' : 'file_text,menu') if turbo_native_app? %>">
<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]') %>
+1 -1
View File
@@ -106,7 +106,7 @@
</native-action>
<% end %>
<% if template.archived_at? || (!can?(:update, template) && can?(:read, template)) %>
<native-action data-section="edit" data-icon="file_text" data-label="<%= t('preview') %>">
<native-action data-placement="bar" data-icon="file_text" data-label="<%= t('preview') %>">
<a href="<%= template_preview_path(template) %>" data-native-title="<%= template.name %>"></a>
</native-action>
<% end %>