mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-16 19:46:22 +00:00
mostrar cuáles son los filtros actuales y poder removerlos
además, crear una sección de notas al pie con definiciones disponibles para lectores de pantalla. (no quiere decir que sean completas, `title` solo funciona con usuaries de mouse)
This commit is contained in:
parent
051e40f64b
commit
754e8fbbcc
3 changed files with 18 additions and 0 deletions
|
@ -60,6 +60,16 @@
|
|||
- @site.locales.each do |locale|
|
||||
= link_to t("locales.#{locale}.name"), 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
|
||||
|
@ -121,3 +131,9 @@
|
|||
= link_to t('posts.edit'), edit_site_post_path(@site, post.path), class: 'btn btn-block'
|
||||
- if @usuarie || policy(post).destroy?
|
||||
= link_to t('posts.destroy'), site_post_path(@site, post.path), class: 'btn btn-block', method: :delete, data: { confirm: t('posts.confirm_destroy') }
|
||||
|
||||
#footnotes{ hidden: true }
|
||||
- @filter_params.each do |param, value|
|
||||
- if param == 'layout'
|
||||
- value = @site.layouts[value.to_sym].humanized_name
|
||||
%label{ id: "help-filter-#{param}" }= t('posts.remove_filter_help', filter: value)
|
||||
|
|
|
@ -451,6 +451,7 @@ en:
|
|||
add: 'Add'
|
||||
filter: 'Filter'
|
||||
remove_filter: 'Back'
|
||||
remove_filter_help: 'Remove the filter: %{filter}'
|
||||
categories: 'Everything'
|
||||
index: 'Posts'
|
||||
edit: 'Edit'
|
||||
|
|
|
@ -515,6 +515,7 @@ es:
|
|||
add: 'Agregar'
|
||||
filter: 'Filtrar'
|
||||
remove_filter: 'Volver'
|
||||
remove_filter_help: 'Quitar este filtro: %{filter}'
|
||||
index: 'Artículos'
|
||||
edit: 'Editar'
|
||||
preview:
|
||||
|
|
Loading…
Reference in a new issue