creddit/app/views/subcreddits/show.html.slim

13 lines
482 B
Text

- if @subcreddit.closed?
= "Board has been closed"
- else
.posts
ul
- @subcreddit.posts.order('created_at DESC').each_with_index do |post, rank|
li
.post
p.title= link_to post.title, [@subcreddit, post]
p.details= "submitted #{distance_of_time_in_words post.created_at, Time.now} ago by #{post.user.username}"
ul.links.list-inline
li= link_to 'XXX comments', ''
li= link_to 'share', ''