mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-21 17:56:21 +00:00
fix: subschemas aparecen como filtros #16290
This commit is contained in:
parent
b814ae5355
commit
60b539639f
2 changed files with 11 additions and 6 deletions
|
@ -25,8 +25,7 @@
|
|||
- @site.schema_organization.each do |key, _|
|
||||
.custom-control.custom-checkbox
|
||||
- schema = @site.layouts[key]
|
||||
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layout[]", class: "", value: schema.name, checked: @filter_params[:layout]&.include?(key.to_s) }
|
||||
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
||||
= render 'schemas/filter', site: @site, key: key, schema: schema, filter: @filter_params
|
||||
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('posts.filters.submit')
|
||||
= render 'layouts/details',
|
||||
summary: t('posts.new'),
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
- if filter[:layout] == schema.name.to_s
|
||||
= link_to t('.remove'), site_posts_path(site, **filter.merge(layout: nil)), class: 'btn btn-primary btn-sm m-0'
|
||||
- else
|
||||
= link_to t('.filter'), site_posts_path(site, **filter.merge(layout: schema.value)), class: 'btn btn-secondary btn-sm m-0'
|
||||
%div
|
||||
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layout[]", class: "", value: schema.name, checked: @filter_params[:layout]&.include?(key.to_s) }
|
||||
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
||||
|
||||
|
||||
-# XXX: Solo un nivel de recursividad
|
||||
- unless local_assigns[:parent_schema]
|
||||
- schema.schemas.each do |s|
|
||||
- next if s.hidden?
|
||||
= render 'schemas/filter', schema: s, key: s.name, site: site, filter: filter
|
Loading…
Reference in a new issue