mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 16:06:23 +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
|
||||
%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'
|
||||
|
||||
|
||||
|
|
|
@ -2,9 +2,10 @@
|
|||
%h1= site.title
|
||||
%p.lead= site.description
|
||||
%form.mb-3{ action: site_posts_path }
|
||||
- @filter_params.each do |param, value|
|
||||
- next if param == 'q'
|
||||
%input{ type: 'hidden', name: param, value: value }
|
||||
- @filter_params.each do |param, values|
|
||||
- next if param == :q
|
||||
- [values].flatten.each do |value|
|
||||
%input{ type: 'hidden', name: values.is_a?(Array) ? "#{param}[]" : param, value: value }
|
||||
.form-group.flex-grow-0.m-0
|
||||
%label{for: 'q'}= t('posts.index.search')
|
||||
.input-group
|
||||
|
|
Loading…
Reference in a new issue