mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-12-18 06:57:59 +01:00
44 lines
1.7 KiB
Text
44 lines
1.7 KiB
Text
elixir:
|
|
route = fn p -> ~p"/conversations?#{p}" end
|
|
pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @conversations, route: route, conn: @conn
|
|
|
|
h1 My Conversations
|
|
.block
|
|
.block__header.page__header
|
|
.page__pagination = pagination
|
|
|
|
.page__info
|
|
a href=~p"/conversations/new"
|
|
i.fa.fa-paper-plane>
|
|
' Create New Conversation
|
|
|
|
.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
|
|
= for c <- @conversations do
|
|
tr class=conversation_class(@conn.assigns.current_user, c)
|
|
td.table--communication-list__name
|
|
=> link c.title, to: ~p"/conversations/#{c}"
|
|
|
|
.small-text.hide-mobile
|
|
=> c.message_count
|
|
= pluralize("message", "messages", c.message_count)
|
|
' ; started
|
|
= pretty_time(c.created_at)
|
|
' , last message
|
|
= pretty_time(c.last_message_at)
|
|
|
|
td.table--communication-list__stats
|
|
= render PhilomenaWeb.UserAttributionView, "_user.html", object: %{user: other_party(@current_user, c)}, conn: @conn
|
|
td.table--communication-list__options
|
|
=> link "Last message", to: last_message_path(c, c.message_count)
|
|
' •
|
|
=> link "Hide", to: ~p"/conversations/#{c}/hide", data: [method: "post"], data: [confirm: "Are you really, really sure?"]
|
|
|
|
.block__header.block__header--light.page__header
|
|
.page__pagination = pagination
|