philomena/lib/philomena_web/templates/forum/index.html.slime

36 lines
1.5 KiB
Text
Raw Permalink Normal View History

2019-10-06 23:31:48 +02:00
h1 Discussion Forums
.block
.block__header
2024-06-06 22:28:35 +02:00
a href=~p"/posts"
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-search>
' Search Posts
2019-10-06 23:31:48 +02:00
span.block__header__item
=> @topic_count
' topics
.block__content
table.table.table--communication-list
thead
tr
th.table--communication-list__name Forum
2023-11-23 17:07:49 +01:00
th.table--communication-list__stats.hidden--mobile Topics
th.table--communication-list__stats.hidden--mobile Posts
2019-10-06 23:31:48 +02:00
th.table--communication-list__last-post Last Post
tbody
= for forum <- @forums do
tr
td.table--communication-list__name
2024-06-06 22:28:35 +02:00
=> link(forum.name, to: ~p"/forums/#{forum}")
2019-10-06 23:31:48 +02:00
.small-text = forum.description
2023-11-23 17:07:49 +01:00
td.table--communication-list__stats.hidden--mobile = forum.topic_count
td.table--communication-list__stats.hidden--mobile = forum.post_count
2019-10-06 23:31:48 +02:00
td.table--communication-list__last-post
= if forum.last_post do
strong
2024-06-06 22:28:35 +02:00
=> link(forum.last_post.topic.title, to: ~p"/forums/#{forum.last_post.topic.forum}/topics/#{forum.last_post.topic}")
2019-10-06 23:31:48 +02:00
br
2024-06-06 22:28:35 +02:00
=> link("Go to post", to: ~p"/forums/#{forum.last_post.topic.forum}/topics/#{forum.last_post.topic}?#{[post_id: forum.last_post.id]}" <> "#post_#{forum.last_post.id}")
2019-10-06 23:31:48 +02:00
' by
2019-11-12 02:27:09 +01:00
=> render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: forum.last_post, conn: @conn
2019-10-06 23:31:48 +02:00
br
=> pretty_time(forum.last_post.created_at)