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

16 lines
659 B
Text
Raw Normal View History

2015-08-12 16:45:30 -04:00
.posts.contents
ul
- @posts.order('created_at DESC').each_with_index do |post, rank|
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
- if @subcreddit == nil
= " to "
== link_to "/c/#{post.subcreddit.slug}", post.subcreddit
ul.links.list-inline
li= link_to "#{post.comments_count} comments", subcreddit_post_path(post.subcreddit, post)
li= link_to 'share', ''