emprolijar tabla de artículos
This commit is contained in:
parent
cbc4a9fbef
commit
6cdb825496
2 changed files with 6 additions and 4 deletions
|
@ -40,7 +40,8 @@
|
||||||
- @site.locales.each do |locale|
|
- @site.locales.each do |locale|
|
||||||
= link_to t("locales.#{locale}.name"), site_posts_path(@site, locale: 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' : ''}"
|
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
|
%tbody
|
||||||
- dir = t("locales.#{@locale}.dir")
|
- dir = t("locales.#{@locale}.dir")
|
||||||
- @posts.each_with_index do |post, i|
|
- @posts.each_with_index do |post, i|
|
||||||
|
@ -64,7 +65,7 @@
|
||||||
-# Orden más alto es mayor prioridad
|
-# Orden más alto es mayor prioridad
|
||||||
= hidden_field 'post[reorder]', post.uuid.value,
|
= hidden_field 'post[reorder]', post.uuid.value,
|
||||||
value: @posts.length - i, class: 'reorder'
|
value: @posts.length - i, class: 'reorder'
|
||||||
%td{ class: dir }
|
%td.w-100{ class: dir }
|
||||||
%small
|
%small
|
||||||
= link_to @site.i18n.dig('layouts', post.layout.name.to_s) || post.layout.name.to_s.humanize,
|
= 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)
|
site_posts_path(@site, layout: post.layout.name)
|
||||||
|
@ -91,10 +92,10 @@
|
||||||
- if @usuarie || policy(post).edit?
|
- if @usuarie || policy(post).edit?
|
||||||
= link_to t('posts.edit'),
|
= link_to t('posts.edit'),
|
||||||
edit_site_post_path(@site, post.id),
|
edit_site_post_path(@site, post.id),
|
||||||
class: 'btn'
|
class: 'btn btn-block'
|
||||||
- if @usuarie || policy(post).destroy?
|
- if @usuarie || policy(post).destroy?
|
||||||
= link_to t('posts.destroy'),
|
= link_to t('posts.destroy'),
|
||||||
site_post_path(@site, post.id),
|
site_post_path(@site, post.id),
|
||||||
class: 'btn',
|
class: 'btn btn-block',
|
||||||
method: :delete,
|
method: :delete,
|
||||||
data: { confirm: t('posts.confirm_destroy') }
|
data: { confirm: t('posts.confirm_destroy') }
|
||||||
|
|
|
@ -383,6 +383,7 @@ es:
|
||||||
en: 'inglés'
|
en: 'inglés'
|
||||||
ar: 'árabe'
|
ar: 'árabe'
|
||||||
posts:
|
posts:
|
||||||
|
caption: Lista de artículos
|
||||||
attribute_ro:
|
attribute_ro:
|
||||||
file:
|
file:
|
||||||
download: Descargar archivo
|
download: Descargar archivo
|
||||||
|
|
Loading…
Reference in a new issue