2019-12-04 23:53:56 -05:00
|
|
|
= if Enum.any?(@posts) do
|
|
|
|
.block
|
|
|
|
.block__header
|
|
|
|
span.block__header__title Recent Forum Posts
|
2024-04-28 20:55:27 -04:00
|
|
|
= link "View all", to: ~p"/posts?#{[pq: "user_id:#{@user.id}"]}"
|
2019-12-04 23:53:56 -05:00
|
|
|
|
|
|
|
.block__content
|
|
|
|
.block
|
|
|
|
= for post <- @posts do
|
|
|
|
.block__content.alternating-color
|
2019-12-05 13:32:53 -05:00
|
|
|
' Post
|
2024-04-28 20:55:27 -04:00
|
|
|
=> link pretty_time(post.created_at), to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}?#{[post_id: post]}" <> "#post_#{post.id}"
|
2019-12-05 13:32:53 -05:00
|
|
|
' in topic
|
2024-04-28 20:55:27 -04:00
|
|
|
=> link post.topic.title, to: ~p"/forums/#{post.topic.forum}/topics/#{post.topic}"
|