mirror of
https://github.com/docusealco/docuseal
synced 2026-11-08 23:42:32 -05:00
adjust template dropdown
This commit is contained in:
1 parent
d35538e2ba
commit
188c3a8c84
2 files changed
+3
-3
No files matched your search
@@ -81,7 +81,7 @@ class Template < ApplicationRecord
|
|||||||
scope :active, -> { where(archived_at: nil) }
|
scope :active, -> { where(archived_at: nil) }
|
||||||
scope :archived, -> { where.not(archived_at: nil) }
|
scope :archived, -> { where.not(archived_at: nil) }
|
||||||
|
|
||||||
scope :select_for_list, -> { select(:id, :name, :author_id, :account_id, :created_at, :archived_at, :folder_id, :submitters) }
|
scope :select_for_list, -> { select(:id, :name, :author_id, :account_id, :created_at, :archived_at, :folder_id) }
|
||||||
|
|
||||||
def application_key
|
def application_key
|
||||||
external_id
|
external_id
|
||||||
|
|||||||
@@ -71,13 +71,13 @@
|
|||||||
<% if !template.archived_at? && (can?(:create, Submission) || can?(:update, template) || can?(:create, template) || can?(:destroy, template)) %>
|
<% if !template.archived_at? && (can?(:create, Submission) || can?(:update, template) || can?(:create, template) || can?(:destroy, template)) %>
|
||||||
<native-menu class="<%= 'dropdown dropdown-top dropdown-end has-[:disabled]:dropdown-open' unless turbo_native_app? %> absolute bottom-4 right-4 md:hidden">
|
<native-menu class="<%= 'dropdown dropdown-top dropdown-end has-[:disabled]:dropdown-open' unless turbo_native_app? %> absolute bottom-4 right-4 md:hidden">
|
||||||
<label tabindex="0" aria-label="<%= t('more') %>" class="block cursor-pointer py-2 pl-4 pr-2 -ml-4 -mr-2 -mt-2 -mb-3 text-base-content/70">
|
<label tabindex="0" aria-label="<%= t('more') %>" class="block cursor-pointer py-2 pl-4 pr-2 -ml-4 -mr-2 -mt-2 -mb-3 text-base-content/70">
|
||||||
<%= svg_icon('dots', class: 'w-6 h-6') %>
|
<%= svg_icon('dots', class: 'w-5 h-5') %>
|
||||||
</label>
|
</label>
|
||||||
<ul tabindex="0" class="<%= turbo_native_app? ? 'hidden' : 'z-10 dropdown-content p-2 mb-1 shadow menu text-base bg-base-100 rounded-box min-w-[160px]' %>">
|
<ul tabindex="0" class="<%= turbo_native_app? ? 'hidden' : 'z-10 dropdown-content p-2 mb-1 shadow menu text-base bg-base-100 rounded-box min-w-[160px]' %>">
|
||||||
<% if can?(:create, Submission) %>
|
<% if can?(:create, Submission) %>
|
||||||
<li>
|
<li>
|
||||||
<native-menu-action data-icon="send" data-label="<%= t('send') %>" class="grid-cols-1 p-0">
|
<native-menu-action data-icon="send" data-label="<%= t('send') %>" class="grid-cols-1 p-0">
|
||||||
<%= link_to new_template_submission_path(template), class: 'flex items-center gap-2 px-4 py-2', data: { turbo_frame: :modal, native_modal: ('medium' if template.submitters.size < 3) } do %>
|
<%= link_to new_template_submission_path(template), class: 'flex items-center gap-2 px-4 py-2', data: { turbo_frame: :modal, native_modal: :medium } do %>
|
||||||
<%= svg_icon('send', class: 'w-5 h-5 flex-shrink-0') %>
|
<%= svg_icon('send', class: 'w-5 h-5 flex-shrink-0') %>
|
||||||
<span><%= t('send') %></span>
|
<span><%= t('send') %></span>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in new issue
Block a user