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

quitar el filtro

This commit is contained in:
f 2020-12-24 16:25:45 -03:00
parent c338cb87de
commit 8fa21aa315
3 changed files with 6 additions and 3 deletions

View file

@ -14,14 +14,15 @@
%table.mb-3
- @site.layouts.each do |layout|
- next if layout.hidden?
- filter = params[:layout] == layout.value
%tr
%th= layout.humanized_name
%td.pl-3= link_to t('posts.add'),
new_site_post_path(@site, layout: layout.name),
class: 'badge badge-secondary'
%td= link_to t('posts.filter'),
site_posts_path(@site, layout: layout.value),
class: 'badge badge-secondary'
%td= link_to t(filter ? 'posts.remove_filter' : 'posts.filter'),
site_posts_path(@site, layout: (filter ? nil : layout.value)),
class: 'badge badge-' + (filter ? 'primary' : 'secondary')
- if policy(@site).edit?
= link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn'

View file

@ -490,6 +490,7 @@ en:
new: 'Post types'
add: 'Add'
filter: 'Filter'
remove_filter: 'Back'
categories: 'Everything'
index: 'Posts'
edit: 'Edit'

View file

@ -504,6 +504,7 @@ es:
new: 'Tipos de artículos'
add: 'Agregar'
filter: 'Filtrar'
remove_filter: 'Volver'
index: 'Artículos'
edit: 'Editar'
preview: