5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:31:42 +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))
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
# posición en la colección de artículos
def order

View file

@ -94,11 +94,19 @@
%td{class: direction}
= link_to post.title, site_post_path(@site, post, lang: @lang)
%br
%small
- post.categories.each do |c|
= link_to c, site_posts_path(@site, category: c, lang: @lang),
data: { toggle: 'tooltip' }, title: t('help.category')
- unless post.categories.empty?
%br
%small
- post.categories.each do |c|
= 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
- if post.translations
%small

View file

@ -174,6 +174,8 @@ en:
edit: 'Edit'
save: 'Save'
save_incomplete: 'Save for later'
draft: revision
incomplete: draft
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.'
date: 'Publication date'

View file

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