From 5900e63b0777d669c6d7a4e6207776d42d0d5842 Mon Sep 17 00:00:00 2001 From: f Date: Thu, 24 Dec 2020 12:36:38 -0300 Subject: [PATCH] =?UTF-8?q?filtrar=20por=20tipo=20de=20art=C3=ADculo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/application.scss | 1 + app/views/posts/index.haml | 15 +++++++++------ config/locales/en.yml | 5 +++-- config/locales/es.yml | 5 +++-- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index a3fe5eec..0a215c48 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -13,6 +13,7 @@ $colors: ( // Redefinir variables de Bootstrap $primary: $magenta; +$secondary: $black; $jumbotron-bg: transparent; $enable-rounded: false; $form-feedback-valid-color: $cyan; diff --git a/app/views/posts/index.haml b/app/views/posts/index.haml index 728be348..45a06b7c 100644 --- a/app/views/posts/index.haml +++ b/app/views/posts/index.haml @@ -11,10 +11,17 @@ %p.lead= @site.description %h3= t('posts.new') - %ul + %table.mb-3 - @site.layouts.each do |layout| - next if layout.hidden? - %li= link_to layout.humanized_name, new_site_post_path(@site, layout: layout.name) + %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' - if policy(@site).edit? = link_to t('sites.edit.btn', site: @site.title), edit_site_path(@site), class: 'btn' @@ -88,10 +95,6 @@ value: @posts.length - i, data: { reorder: true } %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) - %br/ = link_to site_post_path(@site, post.id) do %span{ lang: post.lang.value, dir: dir }= post.title.value - if post.attributes.include? :draft diff --git a/config/locales/en.yml b/config/locales/en.yml index 57f514fe..41f32a73 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -487,8 +487,9 @@ en: date: 'date' order: 'Order' content: 'Text' - new: 'Add:' - dropdown: 'Toggle dropdown' + new: 'Post types' + add: 'Add' + filter: 'Filter' categories: 'Everything' index: 'Posts' edit: 'Edit' diff --git a/config/locales/es.yml b/config/locales/es.yml index 77a4fd78..d23e3f74 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -501,8 +501,9 @@ es: order: 'Posición' content: 'Cuerpo del artículo' categories: 'Todos' - dropdown: 'Desplegar el menú' - new: 'Agregar:' + new: 'Tipos de artículos' + add: 'Agregar' + filter: 'Filtrar' index: 'Artículos' edit: 'Editar' preview: