@ -1,5 +1,5 @@
div
h1 Admin Panel
h1.tcenter Admin Panel
nav
ul.button-container
li
@ -23,6 +23,7 @@ div
| #{user.name}
a.inlbutton href="/admin/users/#{user.id}/edit"
| [EDIT]
- if session_user.admin?
- if user.banned?
a.green.inlbutton href="/admin/users/#{user.id}/unban"
| [UNBAN USER]
@ -45,10 +46,12 @@ div
select name="role_id"
- if session_user.admin?
- Role.get_all.each do |selrole|
- if selrole.id != ROLES[:banned][:id]
option value="#{selrole.id}"
| #{selrole.name} (id=#{selrole.id})
- else
- session_user.roles.each do |selrole|
- if selrole.id != ROLES[:banned][:id]
option value="#{selrole.id}"
| #{selrole.name} (id=#{selrole.id})
@ -77,6 +80,7 @@ div
h2 Manage Roles
ul.list-container
- data[:roles].each do |role|
- if not ROLE_IDS.include? role.id
li
| #{role.name}
a.inlbutton href="/admin/roles/#{role.id}/edit"