mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-31 19:36:44 +01:00
Add Philomena Contrib Sec Role, Staff Page Visibility Toggle (#130)
* Add Philomena Contributor to secondary roles list * Visibility toggle
This commit is contained in:
parent
417305e43c
commit
c8b33f0ff6
2 changed files with 4 additions and 4 deletions
|
@ -13,7 +13,7 @@ defmodule PhilomenaWeb.StaffController do
|
|||
|> Repo.all()
|
||||
|
||||
categories = [
|
||||
Administrators: Enum.filter(users, &(&1.role == "admin")),
|
||||
Administrators: Enum.filter(users, &(&1.role == "admin" and &1.hide_default_role == false)),
|
||||
"Technical Team":
|
||||
Enum.filter(
|
||||
users,
|
||||
|
@ -22,8 +22,8 @@ defmodule PhilomenaWeb.StaffController do
|
|||
"Public Relations":
|
||||
Enum.filter(users, &(&1.role != "admin" and &1.secondary_role == "Public Relations")),
|
||||
Moderators:
|
||||
Enum.filter(users, &(&1.role == "moderator" and &1.secondary_role in [nil, ""])),
|
||||
Assistants: Enum.filter(users, &(&1.role == "assistant" and &1.secondary_role in [nil, ""]))
|
||||
Enum.filter(users, &(&1.role == "moderator" and &1.secondary_role in [nil, ""] and &1.hide_default_role == false)),
|
||||
Assistants: Enum.filter(users, &(&1.role == "assistant" and &1.secondary_role in [nil, ""] and &1.hide_default_role == false))
|
||||
]
|
||||
|
||||
render(conn, "index.html", title: "Site Staff", categories: categories)
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
.table-list__label__input = select f, :role, ["user", "assistant", "moderator", "admin"], class: "input"
|
||||
label.table-list__label
|
||||
.table-list__label__text Secondary banner:
|
||||
.table-list__label__input = select f, :secondary_role, [[key: "-", value: ""], "Site Developer", "System Administrator", "Public Relations"], class: "input"
|
||||
.table-list__label__input = select f, :secondary_role, [[key: "-", value: ""], "Site Developer", "System Administrator", "Philomena Contributor", "Public Relations"], class: "input"
|
||||
label.table-list__label
|
||||
.table-list__label__text Hide staff banner:
|
||||
.table-list__label__input = checkbox f, :hide_default_role, class: "checkbox"
|
||||
|
|
Loading…
Reference in a new issue