5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 16:56:22 +00:00

fix: poder pasar filtros entre formularios

This commit is contained in:
f 2024-04-29 14:08:07 -03:00
parent f67bd157a9
commit da758ae457
No known key found for this signature in database
2 changed files with 8 additions and 3 deletions

View file

@ -8,6 +8,10 @@
= render 'layouts/details', summary: t('posts.filters.title') do = render 'layouts/details', summary: t('posts.filters.title') do
%form.border.border-magenta.p-1{method: :get} %form.border.border-magenta.p-1{method: :get}
- @filter_params.each do |param, values|
- next if param == :layout
- [values].flatten.each do |value|
%input{ type: 'hidden', name: values.is_a?(Array) ? "#{param}[]" : param, value: value }
%legend.font-weight-bold.m-0.h6= 'Tipo de contenido' %legend.font-weight-bold.m-0.h6= 'Tipo de contenido'

View file

@ -2,9 +2,10 @@
%h1= site.title %h1= site.title
%p.lead= site.description %p.lead= site.description
%form.mb-3{ action: site_posts_path } %form.mb-3{ action: site_posts_path }
- @filter_params.each do |param, value| - @filter_params.each do |param, values|
- next if param == 'q' - next if param == :q
%input{ type: 'hidden', name: param, value: value } - [values].flatten.each do |value|
%input{ type: 'hidden', name: values.is_a?(Array) ? "#{param}[]" : param, value: value }
.form-group.flex-grow-0.m-0 .form-group.flex-grow-0.m-0
%label{for: 'q'}= t('posts.index.search') %label{for: 'q'}= t('posts.index.search')
.input-group .input-group