2019-11-16 05:38:42 +01:00
|
|
|
elixir:
|
2024-06-06 22:28:35 +02:00
|
|
|
route = fn p -> ~p"/conversations?#{p}" end
|
2019-11-16 05:38:42 +01:00
|
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @conversations, route: route, conn: @conn
|
|
|
|
|
|
|
|
h1 My Conversations
|
|
|
|
.block
|
2020-12-11 17:53:40 +01:00
|
|
|
.block__header.page__header
|
|
|
|
.page__pagination = pagination
|
2019-11-18 17:00:08 +01:00
|
|
|
|
2020-12-11 17:53:40 +01:00
|
|
|
.page__info
|
2024-06-06 22:28:35 +02:00
|
|
|
a href=~p"/conversations/new"
|
2020-12-11 17:53:40 +01:00
|
|
|
i.fa.fa-paper-plane>
|
|
|
|
' Create New Conversation
|
2019-11-16 05:38:42 +01:00
|
|
|
|
|
|
|
.block__content
|
|
|
|
table.table.table--communication-list
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th.table--communication-list__name Conversation
|
|
|
|
th.table--communication-list__stats With
|
|
|
|
th.table--communication-list__options Options
|
|
|
|
tbody
|
2024-07-15 01:18:25 +02:00
|
|
|
= for c <- @conversations do
|
2019-11-18 17:00:08 +01:00
|
|
|
tr class=conversation_class(@conn.assigns.current_user, c)
|
2019-11-16 05:41:10 +01:00
|
|
|
td.table--communication-list__name
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link c.title, to: ~p"/conversations/#{c}"
|
2019-11-16 05:38:42 +01:00
|
|
|
|
2023-11-23 17:07:49 +01:00
|
|
|
.small-text.hidden--mobile
|
2024-07-15 01:18:25 +02:00
|
|
|
=> c.message_count
|
|
|
|
= pluralize("message", "messages", c.message_count)
|
2019-12-08 00:29:22 +01:00
|
|
|
' ; started
|
2019-11-16 05:41:10 +01:00
|
|
|
= pretty_time(c.created_at)
|
|
|
|
' , last message
|
|
|
|
= pretty_time(c.last_message_at)
|
2019-11-16 05:38:42 +01:00
|
|
|
|
2019-11-16 05:41:10 +01:00
|
|
|
td.table--communication-list__stats
|
2019-12-08 21:15:59 +01:00
|
|
|
= render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other_party(@current_user, c)}, conn: @conn
|
2019-11-16 05:41:10 +01:00
|
|
|
td.table--communication-list__options
|
2024-07-15 01:18:25 +02:00
|
|
|
=> link "Last message", to: last_message_path(c, c.message_count)
|
2019-12-08 00:24:37 +01:00
|
|
|
' •
|
2024-06-06 22:28:35 +02:00
|
|
|
=> link "Hide", to: ~p"/conversations/#{c}/hide", data: [method: "post"], data: [confirm: "Are you really, really sure?"]
|
2019-11-16 05:38:42 +01:00
|
|
|
|
2020-12-11 17:53:40 +01:00
|
|
|
.block__header.block__header--light.page__header
|
|
|
|
.page__pagination = pagination
|