2019-12-13 18:14:34 +01:00
|
|
|
h1 User Bans
|
|
|
|
|
2024-04-29 02:55:27 +02:00
|
|
|
- route = fn p -> ~p"/admin/user_bans?#{p}" end
|
2021-05-15 19:50:26 +02:00
|
|
|
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @user_bans, route: route, params: page_params(@conn.params)
|
2019-12-13 18:14:34 +01:00
|
|
|
|
2024-04-29 02:55:27 +02:00
|
|
|
= form_for :user_ban, ~p"/admin/user_bans", [method: "get", class: "hform"], fn f ->
|
2019-12-13 20:26:43 +01:00
|
|
|
.field
|
|
|
|
= text_input f, :q, name: "q", class: "hform__text input", placeholder: "Search"
|
|
|
|
= submit "Search", class: "button hform__button"
|
|
|
|
|
2019-12-13 18:14:34 +01:00
|
|
|
.block
|
|
|
|
.block__header
|
|
|
|
= pagination
|
|
|
|
|
|
|
|
.block__content
|
|
|
|
table.table
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th User
|
|
|
|
th Created
|
|
|
|
th Expires
|
|
|
|
th Reason/Note
|
|
|
|
th Ban ID
|
|
|
|
th Options
|
|
|
|
|
|
|
|
tbody
|
|
|
|
= for ban <- @user_bans do
|
|
|
|
tr
|
|
|
|
td
|
2024-04-29 02:55:27 +02:00
|
|
|
= link ban.user.name, to: ~p"/profiles/#{ban.user}"
|
2019-12-13 18:14:34 +01:00
|
|
|
|
|
|
|
td
|
|
|
|
=> pretty_time ban.created_at
|
2024-04-29 03:11:56 +02:00
|
|
|
= user_abbrv ban.banning_user
|
2019-12-13 18:14:34 +01:00
|
|
|
|
|
|
|
td class=ban_row_class(ban)
|
|
|
|
= pretty_time ban.valid_until
|
|
|
|
|
|
|
|
td
|
|
|
|
= ban.reason
|
|
|
|
|
|
|
|
= if present?(ban.note) do
|
|
|
|
p.block.block--fixed
|
|
|
|
em
|
|
|
|
' Note:
|
|
|
|
= ban.note
|
|
|
|
|
|
|
|
td
|
|
|
|
= ban.generated_ban_id
|
|
|
|
|
|
|
|
td
|
2024-04-29 02:55:27 +02:00
|
|
|
=> link "Edit", to: ~p"/admin/user_bans/#{ban}/edit"
|
2020-09-17 20:35:47 +02:00
|
|
|
= if @current_user.role == "admin" do
|
|
|
|
' •
|
2024-04-29 02:55:27 +02:00
|
|
|
=> link "Destroy", to: ~p"/admin/user_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]
|
2019-12-13 18:14:34 +01:00
|
|
|
|
|
|
|
.block__header.block__header--light
|
|
|
|
= pagination
|