5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-26 21:36:21 +00:00

feat: contenido del details de filtros #13586

This commit is contained in:
maki 2024-03-01 16:07:56 -03:00
parent 17f1e664cd
commit 0dc6e5e665
5 changed files with 32 additions and 13 deletions

View file

@ -570,9 +570,10 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
content: ''; content: '';
font-size: 1.8rem; font-size: 1.8rem;
position: absolute; position: absolute;
left: 97%; right: 0%;
bottom: 3%; top: 0%;
transform: rotate(180deg); transform: rotate(180deg);
} }
&[open] { &[open] {
& > summary { & > summary {

View file

@ -6,6 +6,18 @@
= render 'sites/build', site: @site, class: 'btn-block' = render 'sites/build', site: @site, class: 'btn-block'
= render 'layouts/details', summary: t('posts.filters.title') do
.border.border-magenta.p-1
%legend.font-weight-bold.m-0.h6= 'Tipo de contenido'
.custom-control.custom-checkbox
- @site.schema_organization.each do |schema, _|
.row.no-gutters
- schema = @site.layouts[schema]
%input.custom-control-input.magenta{ type: 'checkbox', id: schema, name: "layouts", class: "" }
%label.custom-control-label.font-weight-normal{ for: schema }= schema.humanized_name
%button.btn.btn-secondary.mt-3{ type: 'submit' }= t('.filters.submit')
%h3= t('posts.new') %h3= t('posts.new')
%table.table.table-sm.mb-3 %table.table.table-sm.mb-3
%tbody %tbody
@ -45,16 +57,7 @@
- @site.locales.each do |locale| - @site.locales.each do |locale|
= link_to @site.data.dig(locale.to_s, 'locale') || locale, site_posts_path(@site, **@filter_params.merge(locale: locale)), = link_to @site.data.dig(locale.to_s, 'locale') || locale, site_posts_path(@site, **@filter_params.merge(locale: locale)),
class: "mr-2 mt-2 mb-2 #{locale == @locale ? 'active font-weight-bold' : ''}" class: "mr-2 mt-2 mb-2 #{locale == @locale ? 'active font-weight-bold' : ''}"
.pl-2-plus
- @filter_params.each do |param, value|
- if param == 'layout'
- value = @site.layouts[value.to_sym].humanized_name
= link_to site_posts_path(@site, **@filter_params.reject { |k, _| k == param }),
class: 'btn btn-secondary btn-sm',
title: t('posts.remove_filter_help', filter: value),
aria: { labelledby: "help-filter-#{param}" } do
= value
×
- if @posts.empty? - if @posts.empty?
%h2= t('posts.empty') %h2= t('posts.empty')
- else - else

View file

@ -13,3 +13,12 @@
%span.input-group-text.background-white.magenta.border.border-magenta.border-top.border-left-0.border-right.border-bottom %span.input-group-text.background-white.magenta.border.border-magenta.border-top.border-left-0.border-right.border-bottom
%i.fa.fa-fw.fa-search %i.fa.fa-fw.fa-search
%input.sr-only{ type: 'submit' } %input.sr-only{ type: 'submit' }
- @filter_params.each do |param, value|
- if param == 'layout'
- value = @site.layouts[value.to_sym].humanized_name
= link_to site_posts_path(@site, **@filter_params.reject { |k, _| k == param }),
class: 'btn btn-secondary btn-sm',
title: t('posts.remove_filter_help', filter: value),
aria: { labelledby: "help-filter-#{param}" } do
= value
×

View file

@ -640,6 +640,9 @@ en:
next: Next page next: Next page
empty: "There are no results for those search parameters." empty: "There are no results for those search parameters."
caption: Post list caption: Post list
filters:
title: Filters
submit: Submit
attribute_ro: attribute_ro:
file: file:
download: Download file download: Download file

View file

@ -651,6 +651,9 @@ es:
next: Página siguiente next: Página siguiente
empty: No hay artículos con estos parámetros de búsqueda. empty: No hay artículos con estos parámetros de búsqueda.
caption: Lista de artículos caption: Lista de artículos
filters:
title: Filtros
submit: Aplicar
attribute_ro: attribute_ro:
file: file:
download: Descargar archivo download: Descargar archivo