mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-01 03:46:44 +01:00
make staff buttons reflect permissions properly
This commit is contained in:
parent
36e44146bc
commit
f584d87ceb
1 changed files with 53 additions and 39 deletions
|
@ -5,36 +5,47 @@
|
||||||
=<> "A"
|
=<> "A"
|
||||||
i.fa.fa-caret-down
|
i.fa.fa-caret-down
|
||||||
.dropdown__content.js-burger-links
|
.dropdown__content.js-burger-links
|
||||||
= link to: "/admin/flipper", class: "header__link" do
|
/ todo: make some sort of permission for this
|
||||||
i.fa.fa-fw.fa-toggle-on
|
= if @current_user.role == "admin" do
|
||||||
=< "Site Settings"
|
= link to: "/admin/flipper", class: "header__link" do
|
||||||
= link to: "/admin/site_notices", class: "header__link" do
|
i.fa.fa-fw.fa-toggle-on
|
||||||
i.fa.fa-fw.fa-info-circle
|
=< "Site Settings"
|
||||||
=< "Site Notices"
|
= if can?(@conn, :manage, SiteNotice) do
|
||||||
= link to: "#", class: "header__link" do
|
= link to: "/admin/site_notices", class: "header__link" do
|
||||||
i.fa.fa-fw.fa-tags
|
i.fa.fa-fw.fa-info-circle
|
||||||
=< "Tags"
|
=< "Site Notices"
|
||||||
= link to: "#", class: "header__link" do
|
= if can?(@conn, :manage, Tag) do
|
||||||
i.fa.fa-fw.fa-users
|
= link to: "#", class: "header__link" do
|
||||||
=< "Users"
|
i.fa.fa-fw.fa-tags
|
||||||
= link to: "#", class: "header__link" do
|
=< "Tags"
|
||||||
i.fa.fa-fw.fa-comments
|
= if can?(@conn, :mod_read, User) do
|
||||||
=< "Comments"
|
= link to: "#", class: "header__link" do
|
||||||
= link to: "#", class: "header__link" do
|
i.fa.fa-fw.fa-users
|
||||||
i.fa.fa-fw.fa-paragraph
|
=< "Users"
|
||||||
=< "Forums"
|
= if can?(@conn, :mod_read, Comment) do
|
||||||
= link to: "#", class: "header__link" do
|
= link to: "#", class: "header__link" do
|
||||||
i.fa.fa-fw.fa-shopping-bag
|
i.fa.fa-fw.fa-comments
|
||||||
=< "Advertisements"
|
=< "Comments"
|
||||||
= link to: "#", class: "header__link" do
|
= if can?(@conn, :mod_read, Forum) do
|
||||||
i.fa.fa-fw.fa-trophy
|
= link to: "#", class: "header__link" do
|
||||||
=< "Badges"
|
i.fa.fa-fw.fa-paragraph
|
||||||
= link to: "#", class: "header__link" do
|
=< "Forums"
|
||||||
i.fa.fa-fw.fa-sticky-note
|
= if can?(@conn, :manage, Advert) do
|
||||||
=< "Pages"
|
= link to: "#", class: "header__link" do
|
||||||
= link to: "#", class: "header__link" do
|
i.fa.fa-fw.fa-shopping-bag
|
||||||
i.fa.fa-fw.fa-sticky-note
|
=< "Advertisements"
|
||||||
=< "Mod Notes"
|
= if can?(@conn, :award, Badge) do
|
||||||
|
= link to: "#", class: "header__link" do
|
||||||
|
i.fa.fa-fw.fa-trophy
|
||||||
|
=< "Badges"
|
||||||
|
= if can?(@conn, :manage, StaticPages) do
|
||||||
|
= link to: "#", class: "header__link" do
|
||||||
|
i.fa.fa-fw.fa-sticky-note
|
||||||
|
=< "Pages"
|
||||||
|
= if can?(@conn, :manage, ModNote) do
|
||||||
|
= link to: "#", class: "header__link" do
|
||||||
|
i.fa.fa-fw.fa-sticky-note
|
||||||
|
=< "Mod Notes"
|
||||||
= if @duplicate_report_count do
|
= if @duplicate_report_count do
|
||||||
= link to: "#", class: "header__link", title: "Duplicates" do
|
= link to: "#", class: "header__link", title: "Duplicates" do
|
||||||
=<> "D"
|
=<> "D"
|
||||||
|
@ -60,12 +71,15 @@
|
||||||
=<> "B"
|
=<> "B"
|
||||||
i.fa.fa-caret-down
|
i.fa.fa-caret-down
|
||||||
.dropdown__content.dropdown__content-right.js-burger-links
|
.dropdown__content.dropdown__content-right.js-burger-links
|
||||||
= link to: "#", class: "header__link" do
|
= if can?(@conn, :mod_read, UserBan) do
|
||||||
i.fa.fa-fw.fa-user
|
= link to: "#", class: "header__link" do
|
||||||
=< "User Bans"
|
i.fa.fa-fw.fa-user
|
||||||
= link to: "#", class: "header__link" do
|
=< "User Bans"
|
||||||
i.fab.fa-fw.fa-internet-explorer
|
= if can?(@conn, :mod_read, SubnetBan) do
|
||||||
=< "IP Bans"
|
= link to: "#", class: "header__link" do
|
||||||
= link to: "#", class: "header__link" do
|
i.fab.fa-fw.fa-internet-explorer
|
||||||
i.fa.fa-fw.fa-desktop
|
=< "IP Bans"
|
||||||
=< "FP Bans"
|
= if can?(@conn, :mod_read, FingerprintBan) do
|
||||||
|
= link to: "#", class: "header__link" do
|
||||||
|
i.fa.fa-fw.fa-desktop
|
||||||
|
=< "FP Bans"
|
||||||
|
|
Loading…
Reference in a new issue