mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
269caabd5e
* 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)
59 lines
2.4 KiB
Text
59 lines
2.4 KiB
Text
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @topics, route: fn p -> Routes.forum_path(@conn, :show, @forum, p) end
|
|
|
|
h1 = @forum.name
|
|
.block
|
|
.block__header
|
|
=> link("Forums", to: Routes.forum_path(@conn, :index))
|
|
' »
|
|
=> link(@forum.name, to: Routes.forum_path(@conn, :show, @forum))
|
|
a href=Routes.forum_topic_path(@conn, :new, @forum)
|
|
i.fa.fa-fw.fa-edit>
|
|
' New Topic
|
|
|
|
a href=Routes.post_path(@conn, :index, pq: "forum:#{@forum.short_name}")
|
|
i.fa.fa-fw.fa-search>
|
|
' Search Posts
|
|
span.spacing-left
|
|
=> @forum.topic_count
|
|
' topics
|
|
.block__header--sub.block__header--light.page__header
|
|
.page__pagination = pagination
|
|
.page__info
|
|
span.block__header__title = @forum.description
|
|
= render PhilomenaWeb.Forum.SubscriptionView, "_subscription.html", forum: @forum, watching: @watching, conn: @conn
|
|
.block__content
|
|
table.table.table--communication-list
|
|
thead
|
|
tr
|
|
th.table--communication-list__name Topic
|
|
th.table--communication-list__stats.hide-mobile Posts
|
|
th.table--communication-list__last-post Last Post
|
|
tbody
|
|
= for topic <- @topics do
|
|
tr
|
|
td.table--communication-list__name
|
|
= if topic.sticky do
|
|
i.fa.fa-thumbtack
|
|
= if topic.locked_at do
|
|
i.fa.fa-lock
|
|
= if topic.poll do
|
|
i.fas.fa-poll-h
|
|
=< link(topic.title, to: Routes.forum_topic_path(@conn, :show, @forum, topic))
|
|
.small-text
|
|
' Posted
|
|
=> pretty_time(topic.created_at)
|
|
' by
|
|
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn
|
|
td.table--communication-list__stats.hide-mobile = topic.post_count
|
|
td.table--communication-list__last-post
|
|
= if topic.last_post do
|
|
=> link("Go to post", to: Routes.forum_topic_path(@conn, :show, topic.forum, topic, post_id: topic.last_post) <> "#post_#{topic.last_post.id}")
|
|
' by
|
|
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic.last_post, conn: @conn
|
|
br
|
|
=> pretty_time(topic.last_post.created_at)
|
|
.block__header.block__header--light.page__header
|
|
.page__pagination = pagination
|
|
|
|
/- if current_user
|
|
/ = render partial: 'topics/form'
|