emprolijar tabla de artículos

This commit is contained in:
f 2020-06-25 16:53:55 -03:00
parent cbc4a9fbef
commit 6cdb825496
2 changed files with 6 additions and 4 deletions

View file

@ -40,7 +40,8 @@
- @site.locales.each do |locale|
= link_to t("locales.#{locale}.name"), site_posts_path(@site, locale: locale),
class: "mr-2 mt-2 mb-2#{locale == @locale ? 'active font-weight-bold' : ''}"
%table.table.table-condensed.table-draggable
%table.table.table-draggable
%caption.sr-only= t('posts.caption')
%tbody
- dir = t("locales.#{@locale}.dir")
- @posts.each_with_index do |post, i|
@ -64,7 +65,7 @@
-# Orden más alto es mayor prioridad
= hidden_field 'post[reorder]', post.uuid.value,
value: @posts.length - i, class: 'reorder'
%td{ class: dir }
%td.w-100{ class: dir }
%small
= link_to @site.i18n.dig('layouts', post.layout.name.to_s) || post.layout.name.to_s.humanize,
site_posts_path(@site, layout: post.layout.name)
@ -91,10 +92,10 @@
- if @usuarie || policy(post).edit?
= link_to t('posts.edit'),
edit_site_post_path(@site, post.id),
class: 'btn'
class: 'btn btn-block'
- if @usuarie || policy(post).destroy?
= link_to t('posts.destroy'),
site_post_path(@site, post.id),
class: 'btn',
class: 'btn btn-block',
method: :delete,
data: { confirm: t('posts.confirm_destroy') }

View file

@ -383,6 +383,7 @@ es:
en: 'inglés'
ar: 'árabe'
posts:
caption: Lista de artículos
attribute_ro:
file:
download: Descargar archivo