add folder filter
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
class SubmissionsFiltersController < ApplicationController
|
||||
ALLOWED_NAMES = %w[
|
||||
author
|
||||
folder
|
||||
completed_at
|
||||
status
|
||||
created_at
|
||||
|
||||
@@ -23,6 +23,12 @@
|
||||
<span><%= t('status') %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="flex">
|
||||
<%= link_to submissions_filter_path('folder', query_params.merge(path: url_for)), data: { turbo_frame: 'modal' } do %>
|
||||
<%= svg_icon('folder', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
|
||||
<span><%= t('folder') %></span>
|
||||
<% end %>
|
||||
</li>
|
||||
<li class="flex">
|
||||
<%= link_to submissions_filter_path('author', query_params.merge(path: url_for)), data: { turbo_frame: 'modal' } do %>
|
||||
<%= svg_icon('user', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<%= render 'filter_modal', title: t('folder'), default_params: params.permit(*(Submissions::Filter::ALLOWED_PARAMS - ['folder'])) do %>
|
||||
<div class="space-y-2">
|
||||
<div class="form-control mt-6">
|
||||
<folder-autocomplete class="flex justify-between w-full">
|
||||
<input id="folder_name" placeholder="<%= t('folder_name') %>" type="text" class="base-input w-full" name="folder" value="<%= params[:folder] %>" autocomplete="off">
|
||||
</folder-autocomplete>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user