mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-27 21:47:59 +01:00
62 lines
1.7 KiB
Text
62 lines
1.7 KiB
Text
h1 Subnet Bans
|
|
|
|
- route = fn p -> ~p"/admin/subnet_bans?#{p}" end
|
|
- pagination = render PhilomenaWeb.PaginationView, "_pagination.html", page: @subnet_bans, route: route, params: page_params(@conn.params)
|
|
|
|
= form_for :subnet_ban, ~p"/admin/subnet_bans", [method: "get", class: "hform"], fn f ->
|
|
.field
|
|
= text_input f, :q, name: "q", class: "hform__text input", placeholder: "Search"
|
|
= submit "Search", class: "button hform__button"
|
|
|
|
.block
|
|
.block__header
|
|
a href=~p"/admin/subnet_bans/new"
|
|
i.fa.fa-plus>
|
|
' New subnet ban
|
|
|
|
= pagination
|
|
|
|
.block__content
|
|
table.table
|
|
thead
|
|
tr
|
|
th Specification
|
|
th Created
|
|
th Expires
|
|
th Reason/Note
|
|
th Ban ID
|
|
th Options
|
|
|
|
tbody
|
|
= for ban <- @subnet_bans do
|
|
tr
|
|
td
|
|
= link ban.specification, to: ~p"/ip_profiles/#{to_string(ban.specification)}"
|
|
|
|
td
|
|
=> pretty_time ban.created_at
|
|
= user_abbrv ban.banning_user
|
|
|
|
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
|
|
=> link "Edit", to: ~p"/admin/subnet_bans/#{ban}/edit"
|
|
= if @current_user.role == "admin" do
|
|
' •
|
|
=> link "Destroy", to: ~p"/admin/subnet_bans/#{ban}", data: [confirm: "Are you really, really sure?", method: "delete"]
|
|
|
|
.block__header.block__header--light
|
|
= pagination
|