diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index 129fc835..28b5aad2 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -13,12 +13,10 @@ - [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' - - - - @site.schema_organization.each do |schema, _| + - @site.schema_organization.each do |key, _| .custom-control.custom-checkbox - - schema = @site.layouts[schema] - %input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layout[]", class: "", value: schema.name } + - 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 %button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit') = render 'layouts/details', summary: t('posts.new'), summary_class: "h4 magenta font-weight-bold m-0 px-2", details_class: "d-flex border border-magenta justify-content-between align-items-center w-100 mb-3", open: "+", closed: "+", open_class: "h1 magenta font-weight-bold m-0", closed_class: "h1 magenta font-weight-bold m-0" do