philomena/lib/philomena_web/templates/forum/index.html.slime
VcSaJen 269caabd5e
Return some BoR functionality to forums (#115)
* return some BoR functionality to forums

- Added searching by forum slug
- Display forum/topic/post-num in search results for each post
- Display who locked topic for moderators

* fix topic position bug (Fixes philomena-dev/philomena#110)
2021-05-09 13:21:45 -04:00

35 lines
1.6 KiB
Text

h1 Discussion Forums
.block
.block__header
a href=Routes.post_path(@conn, :index)
i.fa.fa-fw.fa-search>
' Search Posts
span.block__header__item
=> @topic_count
' topics
.block__content
table.table.table--communication-list
thead
tr
th.table--communication-list__name Forum
th.table--communication-list__stats.hide-mobile Topics
th.table--communication-list__stats.hide-mobile Posts
th.table--communication-list__last-post Last Post
tbody
= for forum <- @forums do
tr
td.table--communication-list__name
=> link(forum.name, to: Routes.forum_path(@conn, :show, forum))
.small-text = forum.description
td.table--communication-list__stats.hide-mobile = forum.topic_count
td.table--communication-list__stats.hide-mobile = forum.post_count
td.table--communication-list__last-post
= if forum.last_post do
strong
=> link(forum.last_post.topic.title, to: Routes.forum_topic_path(@conn, :show, forum.last_post.topic.forum, forum.last_post.topic))
br
=> link("Go to post", to: Routes.forum_topic_path(@conn, :show, forum.last_post.topic.forum, forum.last_post.topic, post_id: forum.last_post.id) <> "#post_#{forum.last_post.id}")
' by
=> render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: forum.last_post, conn: @conn
br
=> pretty_time(forum.last_post.created_at)