mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 23:42:32 -05:00
adjust ui
This commit is contained in:
1 parent
7e8375aee8
commit
f5dad673de
12 files changed
+172
-73
No files matched your search
@@ -28,48 +28,50 @@
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
<div class="absolute top-0 bottom-0 w-0 items-center hidden md:group-hover:flex" style="right: 37px" data-targets="dashboard-dropzone.hiddenOnDrag">
|
||||
<div class="space-y-1">
|
||||
<% if can?(:update, template) && !template.archived_at? && template.account_id == current_account.id %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= t('move') %>">
|
||||
<a href="<%= edit_template_folder_path(template.id) %>" data-turbo-frame="modal" data-native-modal="medium" class="btn btn-xs hover:btn-outline bg-base-200 btn-circle">
|
||||
<%= svg_icon('folder_share', class: 'w-4 h-4') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if template.archived_at? && can?(:destroy, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" 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 !template.archived_at? && can?(:update, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" 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') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if can?(:create, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= t('clone') %>">
|
||||
<a href="<%= new_template_clone_path(template) %>" data-turbo-frame="modal" data-native-modal="medium" class="btn btn-xs hover:btn-outline bg-base-200 btn-circle">
|
||||
<%= svg_icon('copy', class: 'w-4 h-4') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if can?(:destroy, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= template.archived_at? ? t('delete') : t('archive') %>">
|
||||
<%= button_to template_path(template), data: template.archived_at? ? { turbo_confirm: t('template_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } : {}, params: { permanently: template.archived_at? }.compact_blank, method: :delete, class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle', aria: { label: template.archived_at? ? t('delete') : t('archive') } do %>
|
||||
<%= svg_icon(template.archived_at? ? 'trash' : 'archive', class: 'w-4 h-4 enabled') %>
|
||||
<%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
<% unless turbo_native_app? %>
|
||||
<div class="absolute top-0 bottom-0 w-0 items-center hidden md:group-hover:flex" style="right: 37px" data-targets="dashboard-dropzone.hiddenOnDrag">
|
||||
<div class="space-y-1">
|
||||
<% if can?(:update, template) && !template.archived_at? && template.account_id == current_account.id %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= t('move') %>">
|
||||
<a href="<%= edit_template_folder_path(template.id) %>" data-turbo-frame="modal" data-native-modal="medium" class="btn btn-xs hover:btn-outline bg-base-200 btn-circle">
|
||||
<%= svg_icon('folder_share', class: 'w-4 h-4') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if template.archived_at? && can?(:destroy, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" 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 !template.archived_at? && can?(:update, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" 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') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if can?(:create, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= t('clone') %>">
|
||||
<a href="<%= new_template_clone_path(template) %>" data-turbo-frame="modal" data-native-modal="medium" class="btn btn-xs hover:btn-outline bg-base-200 btn-circle">
|
||||
<%= svg_icon('copy', class: 'w-4 h-4') %>
|
||||
</a>
|
||||
</span>
|
||||
<% end %>
|
||||
<% if can?(:destroy, template) %>
|
||||
<span class="tooltip tooltip-left tooltip-no-touch" data-tip="<%= template.archived_at? ? t('delete') : t('archive') %>">
|
||||
<%= button_to template_path(template), data: template.archived_at? ? { turbo_confirm: t('template_deletion_is_irreversible_and_will_permanently_remove_all_associated_signed_documents_with_it_are_you_sure_') } : {}, params: { permanently: template.archived_at? }.compact_blank, method: :delete, class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle', aria: { label: template.archived_at? ? t('delete') : t('archive') } do %>
|
||||
<%= svg_icon(template.archived_at? ? 'trash' : 'archive', class: 'w-4 h-4 enabled') %>
|
||||
<%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% 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 md:hidden' unless turbo_native_app? %> absolute bottom-4 right-4">
|
||||
<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-5 h-5') %>
|
||||
</label>
|
||||
@@ -77,40 +79,40 @@
|
||||
<% if can?(:create, Submission) %>
|
||||
<li>
|
||||
<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 } do %>
|
||||
<a href="<%= new_template_submission_path(template) %>" class="flex items-center gap-2 px-4 py-2" data-turbo-frame="modal" data-native-modal="medium">
|
||||
<%= svg_icon('send', class: 'w-5 h-5 flex-shrink-0') %>
|
||||
<span><%= t('send') %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
</native-menu-action>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:update, template) %>
|
||||
<li>
|
||||
<native-menu-action data-icon="pencil" data-label="<%= t('edit') %>" class="grid-cols-1 p-0">
|
||||
<%= link_to edit_template_path(template), class: 'flex items-center gap-2 px-4 py-2', data: { native_title: template.name } do %>
|
||||
<a href="<%= edit_template_path(template) %>" class="flex items-center gap-2 px-4 py-2" data-native-title="<%= template.name %>" data-native-actions="<%= 'check,menu' if turbo_native_app? %>">
|
||||
<%= svg_icon('pencil', class: 'w-5 h-5 flex-shrink-0') %>
|
||||
<span><%= t('edit') %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
</native-menu-action>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:update, template) && template.account_id == current_account.id %>
|
||||
<li>
|
||||
<native-menu-action data-icon="folder" data-label="<%= t('move') %>" class="grid-cols-1 p-0">
|
||||
<%= link_to edit_template_folder_path(template.id), class: 'flex items-center gap-2 px-4 py-2', data: { turbo_frame: :modal, native_title: t('move_into_folder'), native_modal: :medium } do %>
|
||||
<a href="<%= edit_template_folder_path(template.id) %>" class="flex items-center gap-2 px-4 py-2" data-turbo-frame="modal" data-native-title="<%= t('move_into_folder') %>" data-native-modal="medium">
|
||||
<%= svg_icon('folder_share', class: 'w-5 h-5 flex-shrink-0') %>
|
||||
<span><%= t('move') %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
</native-menu-action>
|
||||
</li>
|
||||
<% end %>
|
||||
<% if can?(:create, template) %>
|
||||
<li>
|
||||
<native-menu-action data-icon="copy" data-label="<%= t('clone') %>" class="grid-cols-1 p-0">
|
||||
<%= link_to new_template_clone_path(template), class: 'flex items-center gap-2 px-4 py-2', data: { turbo_frame: :modal, native_title: t('clone_template'), native_modal: :medium } do %>
|
||||
<a href="<%= new_template_clone_path(template) %>" class="flex items-center gap-2 px-4 py-2" data-turbo-frame="modal" data-native-title="<%= t('clone_template') %>" data-native-modal="medium">
|
||||
<%= svg_icon('copy', class: 'w-5 h-5 flex-shrink-0') %>
|
||||
<span><%= t('clone') %></span>
|
||||
<% end %>
|
||||
</a>
|
||||
</native-menu-action>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
Reference in new issue
Block a user