poder ver las categorias que son articulos
This commit is contained in:
parent
1e2b2d9de3
commit
9e935a2c49
1 changed files with 5 additions and 1 deletions
|
@ -99,9 +99,13 @@
|
||||||
- unless post.categories.value.empty?
|
- unless post.categories.value.empty?
|
||||||
%br
|
%br
|
||||||
%small
|
%small
|
||||||
- (post.categories.respond_to?(:belongs_to) ? post.categories.belongs_to : post.categories.value).each do |c|
|
- categories = post.categories.respond_to?(:has_many) ? post.categories.has_many : post.categories.value
|
||||||
|
- categories.each do |c|
|
||||||
|
- c.read
|
||||||
= link_to site_posts_path(@site, category: (c.respond_to?(:uuid) ? c.uuid.value : c)) do
|
= link_to site_posts_path(@site, category: (c.respond_to?(:uuid) ? c.uuid.value : c)) do
|
||||||
%span{ lang: post.lang.value, dir: dir }= (c.respond_to?(:title) ? c.title.value : c)
|
%span{ lang: post.lang.value, dir: dir }= (c.respond_to?(:title) ? c.title.value : c)
|
||||||
|
- unless categories.last == c
|
||||||
|
= '/'
|
||||||
|
|
||||||
%td
|
%td
|
||||||
= post.date.value.strftime('%F')
|
= post.date.value.strftime('%F')
|
||||||
|
|
Loading…
Reference in a new issue