creddit/app/views/posts/_post_meta.html.slim

16 lines
657 B
Text
Raw Normal View History

2015-08-12 16:45:30 -04:00
.posts.contents
ul
2015-12-11 15:26:51 -05:00
- posts.order('created_at DESC').each_with_index do |post, rank|
2015-08-12 16:45:30 -04:00
li
.post
p.title= link_to post.title, subcreddit_post_path(post.subcreddit, post)
p.details
= "submitted #{distance_of_time_in_words post.created_at, Time.now} ago by "
== link_to post.user_username, post.user
2015-12-11 15:26:51 -05:00
- if subcreddit == nil
2015-08-12 16:45:30 -04:00
= " to "
2015-12-11 15:26:51 -05:00
== link_to "/c/#{post.subcreddit_slug}", post.subcreddit
2015-08-12 16:45:30 -04:00
ul.links.list-inline
li= link_to "#{post.comments_count} comments", subcreddit_post_path(post.subcreddit, post)
li= link_to 'share', ''