5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-07-03 23:55:46 +00:00

mostrar los articulos para revision o incompletos

This commit is contained in:
f 2018-12-14 12:27:50 -03:00
parent 914ea7f65c
commit 33eacbbc58
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
4 changed files with 25 additions and 5 deletions

View file

@ -81,6 +81,14 @@ class Post
@post.nil? || !File.exist?(@post.try(:path)) @post.nil? || !File.exist?(@post.try(:path))
end end
def draft?
fetch_front_matter('draft', false)
end
def incomplete?
fetch_front_matter('incomplete', false)
end
# El número de orden del artículo, si no tiene uno, se le asigna la # El número de orden del artículo, si no tiene uno, se le asigna la
# posición en la colección de artículos # posición en la colección de artículos
def order def order

View file

@ -94,11 +94,19 @@
%td{class: direction} %td{class: direction}
= link_to post.title, site_post_path(@site, post, lang: @lang) = link_to post.title, site_post_path(@site, post, lang: @lang)
%br - unless post.categories.empty?
%small %br
- post.categories.each do |c| %small
= link_to c, site_posts_path(@site, category: c, lang: @lang), - post.categories.each do |c|
data: { toggle: 'tooltip' }, title: t('help.category') = link_to c, site_posts_path(@site, category: c, lang: @lang),
data: { toggle: 'tooltip' }, title: t('help.category')
- if post.draft? || post.incomplete?
%br
- if post.draft?
%span.badge.badge-info= t('posts.draft')
- if post.incomplete?
%span.badge.badge-warning= t('posts.incomplete')
%td %td
- if post.translations - if post.translations
%small %small

View file

@ -174,6 +174,8 @@ en:
edit: 'Edit' edit: 'Edit'
save: 'Save' save: 'Save'
save_incomplete: 'Save for later' save_incomplete: 'Save for later'
draft: revision
incomplete: draft
author: 'Author' author: 'Author'
author_help: 'You can change the authorship of the post. If your site accepts guests, changing the authorship to an e-mail address will allow them to edit the post.' author_help: 'You can change the authorship of the post. If your site accepts guests, changing the authorship to an e-mail address will allow them to edit the post.'
date: 'Publication date' date: 'Publication date'

View file

@ -177,6 +177,8 @@ es:
new: 'Empezar un artículo nuevo' new: 'Empezar un artículo nuevo'
index: 'Artículos' index: 'Artículos'
edit: 'Editar' edit: 'Editar'
draft: en revisión
incomplete: borrador
save: 'Guardar' save: 'Guardar'
save_incomplete: 'Guardar para después' save_incomplete: 'Guardar para después'
author: 'Autorx' author: 'Autorx'