2015-07-13 02:14:35 -04:00
|
|
|
- if @subcreddit.closed?
|
|
|
|
= "Board has been closed"
|
2015-07-14 16:29:22 -04:00
|
|
|
- else
|
2015-07-16 11:57:27 -04:00
|
|
|
.posts.contents
|
2015-07-15 00:26:23 -04:00
|
|
|
ul
|
|
|
|
- @subcreddit.posts.order('created_at DESC').each_with_index do |post, rank|
|
|
|
|
li
|
|
|
|
.post
|
2015-07-16 11:57:27 -04:00
|
|
|
p.title= link_to post.title, subcreddit_post_path(@subcreddit, post)
|
2015-08-06 15:10:31 -04:00
|
|
|
p.details
|
|
|
|
= "submitted #{distance_of_time_in_words post.created_at, Time.now} ago by "
|
|
|
|
== link_to post.user_username, post.user
|
2015-07-15 00:26:23 -04:00
|
|
|
ul.links.list-inline
|
2015-07-16 11:57:27 -04:00
|
|
|
li= link_to "#{post.comments_count} comments", subcreddit_post_path(@subcreddit, post)
|
2015-07-15 00:26:23 -04:00
|
|
|
li= link_to 'share', ''
|