mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 04: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, _|
|
- @site.schema_organization.each do |key, _|
|
||||||
.custom-control.custom-checkbox
|
.custom-control.custom-checkbox
|
||||||
- schema = @site.layouts[key]
|
- 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) }
|
= render 'schemas/filter', site: @site, key: key, schema: schema, filter: @filter_params
|
||||||
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
|
||||||
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('posts.filters.submit')
|
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('posts.filters.submit')
|
||||||
= render 'layouts/details',
|
= render 'layouts/details',
|
||||||
summary: t('posts.new'),
|
summary: t('posts.new'),
|
||||||
|
|
|
@ -1,4 +1,10 @@
|
||||||
- if filter[:layout] == schema.name.to_s
|
%div
|
||||||
= link_to t('.remove'), site_posts_path(site, **filter.merge(layout: nil)), class: 'btn btn-primary btn-sm m-0'
|
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layout[]", class: "", value: schema.name, checked: @filter_params[:layout]&.include?(key.to_s) }
|
||||||
- else
|
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
|
||||||
= link_to t('.filter'), site_posts_path(site, **filter.merge(layout: schema.value)), class: 'btn btn-secondary btn-sm m-0'
|
|
||||||
|
|
||||||
|
-# 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