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

60 lines
2.3 KiB
Text
Raw Permalink Normal View History

2024-06-06 22:28:35 +02:00
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @topics, route: fn p -> ~p"/forums/#{@forum}?#{p}" end
2019-10-09 01:30:51 +02:00
2019-10-06 23:31:48 +02:00
h1 = @forum.name
.block
.block__header
2024-06-06 22:28:35 +02:00
=> link("Forums", to: ~p"/forums")
2019-10-06 23:31:48 +02:00
' »
2024-06-06 22:28:35 +02:00
=> link(@forum.name, to: ~p"/forums/#{@forum}")
a href=~p"/forums/#{@forum}/topics/new"
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-edit>
2019-11-19 04:38:22 +01:00
' New Topic
2024-06-06 22:28:35 +02:00
a href=~p"/posts?#{[pq: "forum:#{@forum.short_name}"]}"
2024-05-20 22:30:41 +02:00
i.fa.icon--padded.small.fa-search>
' Search Posts
2023-11-23 17:07:49 +01:00
span.spacing--left
2019-10-06 23:31:48 +02:00
=> @forum.topic_count
' topics
2020-12-11 17:53:40 +01:00
.block__header--sub.block__header--light.page__header
.page__pagination = pagination
.page__info
2023-11-23 17:07:49 +01:00
span = @forum.description
2020-12-11 17:53:40 +01:00
= render PhilomenaWeb.Forum.SubscriptionView, "_subscription.html", forum: @forum, watching: @watching, conn: @conn
2019-10-06 23:31:48 +02:00
.block__content
table.table.table--communication-list
thead
tr
th.table--communication-list__name Topic
2023-11-23 17:07:49 +01:00
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 topic <- @topics do
tr
td.table--communication-list__name
= if topic.sticky do
2019-12-07 00:16:18 +01:00
i.fa.fa-thumbtack
2019-10-06 23:31:48 +02:00
= if topic.locked_at do
i.fa.fa-lock
= if topic.poll do
i.fas.fa-poll-h
2024-06-06 22:28:35 +02:00
=< link(topic.title, to: ~p"/forums/#{@forum}/topics/#{topic}")
2019-10-06 23:31:48 +02:00
.small-text
' Posted
=> pretty_time(topic.created_at)
' by
2019-11-12 02:27:09 +01:00
= render PhilomenaWeb.UserAttributionView, "_anon_user.html", object: topic, conn: @conn
2023-11-23 17:07:49 +01:00
td.table--communication-list__stats.hidden--mobile = topic.post_count
2019-10-06 23:31:48 +02:00
td.table--communication-list__last-post
= if topic.last_post do
2024-06-06 22:28:35 +02:00
=> link("Go to post", to: ~p"/forums/#{topic.forum}/topics/#{topic}?#{[post_id: topic.last_post]}" <> "#post_#{topic.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: topic.last_post, conn: @conn
2019-10-06 23:31:48 +02:00
br
=> pretty_time(topic.last_post.created_at)
2020-12-11 17:53:40 +01:00
.block__header.block__header--light.page__header
.page__pagination = pagination
2019-10-06 23:31:48 +02:00
/- if current_user
/ = render partial: 'topics/form'