mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
fix folder nav
This commit is contained in:
1 parent
5de334522c
commit
1232dfb248
3 files changed
+12
-6
No files matched your search
@@ -6,16 +6,17 @@
|
|||||||
<%= link_to t('settings'), settings_path %>
|
<%= link_to t('settings'), settings_path %>
|
||||||
</native-action>
|
</native-action>
|
||||||
<native-action data-placement="profile" data-icon="logout" data-native="sign_out" data-label="<%= t('sign_out') %>" data-destructive="true"></native-action>
|
<native-action data-placement="profile" data-icon="logout" data-native="sign_out" data-label="<%= t('sign_out') %>" data-destructive="true"></native-action>
|
||||||
<% if can?(:create, ::Template) %>
|
<% if can?(:create, ::Template) && controller_name.in?(%w[templates_dashboard submissions_dashboard template_folders]) %>
|
||||||
<native-action data-placement="create" data-icon="upload" data-native="upload" data-label="<%= t('upload') %>" data-url="<%= templates_upload_path %>" data-accept="image/*, application/pdf, application/zip, application/json<%= ", #{Templates::CreateAttachments::DOCUMENT_EXTENSIONS.join(', ')}" if Docuseal.advanced_formats? %>"></native-action>
|
<% folder_name = @template_folder&.full_name %>
|
||||||
<native-action data-placement="create" data-icon="scan" data-native="scan" data-label="Scan" data-url="<%= templates_upload_path %>"></native-action>
|
<native-action data-placement="create" data-icon="upload" data-native="upload" data-label="<%= t('upload') %>" data-url="<%= templates_upload_path(folder_name: folder_name) %>" data-accept="image/*, application/pdf, application/zip, application/json<%= ", #{Templates::CreateAttachments::DOCUMENT_EXTENSIONS.join(', ')}" if Docuseal.advanced_formats? %>"></native-action>
|
||||||
|
<native-action data-placement="create" data-icon="scan" data-native="scan" data-label="Scan" data-url="<%= templates_upload_path(folder_name: folder_name) %>"></native-action>
|
||||||
<% if Docuseal.multitenant? %>
|
<% if Docuseal.multitenant? %>
|
||||||
<native-action data-placement="create" data-icon="brand_gdrive">
|
<native-action data-placement="create" data-icon="brand_gdrive">
|
||||||
<%= link_to 'Google Drive', new_template_path(modal_tab: 'google_drive'), data: { turbo_frame: :modal } %>
|
<%= link_to 'Google Drive', new_template_path(modal_tab: 'google_drive', folder_name: folder_name), data: { turbo_frame: :modal } %>
|
||||||
</native-action>
|
</native-action>
|
||||||
<% end %>
|
<% end %>
|
||||||
<native-action data-placement="create" data-icon="pencil_plus">
|
<native-action data-placement="create" data-icon="pencil_plus">
|
||||||
<%= link_to t('create'), new_template_path, data: { turbo_frame: :modal } %>
|
<%= link_to t('create'), new_template_path(folder_name: folder_name), data: { turbo_frame: :modal } %>
|
||||||
</native-action>
|
</native-action>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<% is_long = folder.name.size > 32 %>
|
<% is_long = folder.name.size > 32 %>
|
||||||
<% icon = folder.default? ? 'folder_star' : 'folder' %>
|
<% icon = folder.default? ? 'folder_star' : 'folder' %>
|
||||||
<a href="<%= folder_path(folder) %>" class="flex h-full flex-col justify-between rounded-2xl py-5 px-6 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 relative" data-targets="dashboard-dropzone.folderCards" data-full-name="<%= folder.full_name %>">
|
<a href="<%= folder_path(folder) %>" class="flex h-full flex-col justify-between rounded-2xl py-5 px-6 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 relative" data-targets="dashboard-dropzone.folderCards" data-full-name="<%= folder.full_name %>" data-native-title="<%= folder.name %>" data-native-menu="true">
|
||||||
<% if !is_long %>
|
<% if !is_long %>
|
||||||
<%= svg_icon(icon, class: 'w-6 h-6') %>
|
<%= svg_icon(icon, class: 'w-6 h-6') %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
<% content_for(:native_title, @template_folder.name) if turbo_native_app? %>
|
<% content_for(:native_title, @template_folder.name) if turbo_native_app? %>
|
||||||
|
<% if turbo_native_app? && (can?(:manage, :countless) || current_account.templates.where.not(archived_at: nil).exists?) %>
|
||||||
|
<native-action data-placement="menu" data-icon="archive">
|
||||||
|
<a href="<%= templates_archived_index_path %>"><%= t('view_archived') %></a>
|
||||||
|
</native-action>
|
||||||
|
<% end %>
|
||||||
<% unless turbo_native_app? %>
|
<% unless turbo_native_app? %>
|
||||||
<div>
|
<div>
|
||||||
<%= link_to @template_folder.parent_folder ? folder_path(@template_folder.parent_folder) : root_path, class: 'flex items-center' do %>
|
<%= link_to @template_folder.parent_folder ? folder_path(@template_folder.parent_folder) : root_path, class: 'flex items-center' do %>
|
||||||
|
|||||||
Reference in new issue
Block a user