traducir la ficha
This commit is contained in:
parent
f0fb5e69ef
commit
55a5849c07
1 changed files with 11 additions and 2 deletions
|
@ -30,11 +30,15 @@
|
||||||
|
|
||||||
%table.table.table-condensed.table-striped
|
%table.table.table-condensed.table-striped
|
||||||
%tbody
|
%tbody
|
||||||
|
- hashes = {}
|
||||||
- @post.front_matter.each do |key, data|
|
- @post.front_matter.each do |key, data|
|
||||||
|
- if data.is_a? Hash
|
||||||
|
- hashes[key] = data
|
||||||
|
- next
|
||||||
%tr
|
%tr
|
||||||
%th= key
|
%th= t("posts.#{key}")
|
||||||
%td
|
%td
|
||||||
- if data.respond_to? :each
|
- if data.is_a? Array
|
||||||
- data.each do |d|
|
- data.each do |d|
|
||||||
%span.badge.badge-success= d
|
%span.badge.badge-success= d
|
||||||
- elsif data.respond_to? :content
|
- elsif data.respond_to? :content
|
||||||
|
@ -44,3 +48,8 @@
|
||||||
= data.strftime('%F')
|
= data.strftime('%F')
|
||||||
- else
|
- else
|
||||||
= data
|
= data
|
||||||
|
- hashes.each do |key, data|
|
||||||
|
- data.each do |k,d|
|
||||||
|
%tr
|
||||||
|
%th= t("posts.#{key}.#{k}")
|
||||||
|
%td= d
|
||||||
|
|
Loading…
Reference in a new issue