philomena/lib/philomena_web/templates/profile/_recent_posts.html.slime

15 lines
571 B
Text
Raw Permalink Normal View History

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