mirror of
https://github.com/docusealco/docuseal
synced 2026-11-07 07:22:32 -05:00
add sort menu
This commit is contained in:
1 parent
8cb0a7a020
commit
9678cd1286
8 files changed
+42
-26
No files matched your search
@@ -1,4 +1,5 @@
|
||||
<% if turbo_native_app? && local_assigns[:next_page_path].blank? %>
|
||||
<%= local_assigns[:right_additional_html] %>
|
||||
<% if local_assigns[:left_additional_html].present? %>
|
||||
<div class="mt-2">
|
||||
<%= local_assigns[:left_additional_html] %>
|
||||
|
||||
@@ -3,31 +3,37 @@
|
||||
<%= svg_icon('arrow_sort', class: 'w-5 h-5') %>
|
||||
</label>
|
||||
<ul tabindex="0" class="dropdown-content z-[10] menu p-2 shadow bg-base-100 rounded-box mb-1 min-w-48">
|
||||
<toggle-cookies data-value="created_at" data-key="dashboard_templates_order">
|
||||
<li>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'created_at' %>">
|
||||
<%= svg_icon('sort_descending_numbers', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('newest_first') %></span>
|
||||
</button>
|
||||
</li>
|
||||
</toggle-cookies>
|
||||
<% if local_assigns[:with_recently_used] != false %>
|
||||
<toggle-cookies data-value="used_at" data-key="dashboard_templates_order">
|
||||
<native-action class="contents" data-menu="<%= t('sort_by') %>" data-menu-icon="arrow_sort" data-icon="sort_descending_numbers" data-selected="<%= selected_order == 'created_at' %>">
|
||||
<toggle-cookies data-value="created_at" data-key="dashboard_templates_order">
|
||||
<li>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'used_at' %>">
|
||||
<%= svg_icon('sort_descending_small_big', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('recently_used') %></span>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'created_at' %>">
|
||||
<%= svg_icon('sort_descending_numbers', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('newest_first') %></span>
|
||||
</button>
|
||||
</li>
|
||||
</toggle-cookies>
|
||||
</native-action>
|
||||
<% if local_assigns[:with_recently_used] != false %>
|
||||
<native-action class="contents" data-menu="<%= t('sort_by') %>" data-menu-icon="arrow_sort" data-icon="sort_descending_small_big" data-selected="<%= selected_order == 'used_at' %>">
|
||||
<toggle-cookies data-value="used_at" data-key="dashboard_templates_order">
|
||||
<li>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'used_at' %>">
|
||||
<%= svg_icon('sort_descending_small_big', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('recently_used') %></span>
|
||||
</button>
|
||||
</li>
|
||||
</toggle-cookies>
|
||||
</native-action>
|
||||
<% end %>
|
||||
<toggle-cookies data-value="name" data-key="dashboard_templates_order">
|
||||
<li>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'name' %>">
|
||||
<%= svg_icon('sort_ascending_letters', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('name_a_z') %></span>
|
||||
</button>
|
||||
</li>
|
||||
</toggle-cookies>
|
||||
<native-action class="contents" data-menu="<%= t('sort_by') %>" data-menu-icon="arrow_sort" data-icon="sort_ascending_letters" data-selected="<%= selected_order == 'name' %>">
|
||||
<toggle-cookies data-value="name" data-key="dashboard_templates_order">
|
||||
<li>
|
||||
<button class="<%= 'bg-base-200' if selected_order == 'name' %>">
|
||||
<%= svg_icon('sort_ascending_letters', class: 'w-4 h-4') %>
|
||||
<span class="whitespace-nowrap"><%= t('name_a_z') %></span>
|
||||
</button>
|
||||
</li>
|
||||
</toggle-cookies>
|
||||
</native-action>
|
||||
</ul>
|
||||
</form>
|
||||
Reference in new issue
Block a user