mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 01:16:21 +00:00
feat: contenido del details de filtros #13586
This commit is contained in:
parent
17f1e664cd
commit
0dc6e5e665
5 changed files with 32 additions and 13 deletions
|
@ -570,9 +570,10 @@ $bezier: cubic-bezier(0.75, 0, 0.25, 1);
|
|||
content: '▶';
|
||||
font-size: 1.8rem;
|
||||
position: absolute;
|
||||
left: 97%;
|
||||
bottom: 3%;
|
||||
right: 0%;
|
||||
top: 0%;
|
||||
transform: rotate(180deg);
|
||||
|
||||
}
|
||||
&[open] {
|
||||
& > summary {
|
||||
|
|
|
@ -6,6 +6,18 @@
|
|||
|
||||
= 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')
|
||||
%table.table.table-sm.mb-3
|
||||
%tbody
|
||||
|
@ -45,16 +57,7 @@
|
|||
- @site.locales.each do |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' : ''}"
|
||||
.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?
|
||||
%h2= t('posts.empty')
|
||||
- else
|
||||
|
|
|
@ -13,3 +13,12 @@
|
|||
%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
|
||||
%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
|
||||
×
|
||||
|
|
|
@ -640,6 +640,9 @@ en:
|
|||
next: Next page
|
||||
empty: "There are no results for those search parameters."
|
||||
caption: Post list
|
||||
filters:
|
||||
title: Filters
|
||||
submit: Submit
|
||||
attribute_ro:
|
||||
file:
|
||||
download: Download file
|
||||
|
|
|
@ -651,6 +651,9 @@ es:
|
|||
next: Página siguiente
|
||||
empty: No hay artículos con estos parámetros de búsqueda.
|
||||
caption: Lista de artículos
|
||||
filters:
|
||||
title: Filtros
|
||||
submit: Aplicar
|
||||
attribute_ro:
|
||||
file:
|
||||
download: Descargar archivo
|
||||
|
|
Loading…
Reference in a new issue