mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 10:36:21 +00:00
fix: poder pasar filtros entre formularios
This commit is contained in:
parent
f67bd157a9
commit
da758ae457
2 changed files with 8 additions and 3 deletions
|
@ -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'
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue