philomena/lib/philomena_web/templates/profile/_recent_posts.html.slime
2019-12-05 13:32:53 -05:00

14 lines
614 B
Text

= if Enum.any?(@posts) do
.block
.block__header
span.block__header__title Recent Forum Posts
= link "View all", to: Routes.post_path(@conn, :index, pq: "user_id:#{@user.id}")
.block__content
.block
= for post <- @posts do
.block__content.alternating-color
' Post
=> link pretty_time(post.created_at), to: Routes.forum_topic_path(@conn, :show, post.topic.forum, post.topic, post_id: post) <> "#post_#{post.id}"
' in topic
=> link post.topic.title, to: Routes.forum_topic_path(@conn, :show, post.topic.forum, post.topic)