parent
8b15c0aadf
commit
67838b149c
@ -1,52 +1,70 @@ |
|||||||
h1 Admin Panel |
header |
||||||
|
h1 Admin Panel |
||||||
|
nav |
||||||
|
ul.button-container |
||||||
|
li |
||||||
|
a.button href="#users" = "Manage Users" |
||||||
|
li |
||||||
|
a.button href="#roles" = "Roles" |
||||||
|
li |
||||||
|
a.button href="#auctions" = "Auctions" |
||||||
|
li |
||||||
|
a.button href="#categories" = "Category Settings" |
||||||
|
|
||||||
#admin-panel |
#admin-panel |
||||||
article.card.border |
|
||||||
h2 Create Role |
h2#users User Management |
||||||
|
.management-container |
||||||
.form-container |
article.card.border |
||||||
form action="/admin/roles" method="post" |
h2 Add User to Role |
||||||
label Role name |
|
||||||
input type="text" name="name" pattern="#{NAME_REGEX_STR}" maxlength="#{MAX_NAME_LEN}" oninput="this.reportValidity()" title="#{REGISTER_ERRORS[:name_desc]}" |
.form-container |
||||||
|
form action="/admin/roles/give" method="post" |
||||||
label Role color |
label Select User |
||||||
input type="color" name="color" value="#fa0f01" |
select name="user_id" |
||||||
|
- User.get_all.each do |seluser| |
||||||
label Role flags int |
option value="#{seluser.id}" |
||||||
input type="number" name="flags" value="0" |
| #{seluser.name} (id=#{seluser.id}) |
||||||
|
|
||||||
input type="submit" value="Create role" |
label Select Role |
||||||
|
select name="role_id" |
||||||
article.card.border |
- if session_user.admin? |
||||||
h2 Manage Roles |
- Role.get_all.each do |selrole| |
||||||
ul.list-container |
option value="#{selrole.id}" |
||||||
- data[:roles].each do |role| |
| #{selrole.name} (id=#{selrole.id}) |
||||||
li |
- else |
||||||
| #{role.name} |
- session_user.roles.each do |selrole| |
||||||
a.inlbutton href="/admin/roles/#{role.id}/edit" |
option value="#{selrole.id}" |
||||||
| [EDIT] |
| #{selrole.name} (id=#{selrole.id}) |
||||||
a.inlbutton href="/admin/roles/#{role.id}/delete" |
|
||||||
| [DELETE] |
input type="submit" value="Add User" |
||||||
|
|
||||||
article.card.border |
h2#roles Role Management |
||||||
h2 Add User to Role |
.management-container |
||||||
|
article.card.border |
||||||
.form-container |
h2 Create Role |
||||||
form action="/admin/roles/give" method="post" |
|
||||||
label Select User |
.form-container |
||||||
select name="user_id" |
form action="/admin/roles" method="post" |
||||||
- User.get_all.each do |seluser| |
label Role name |
||||||
option value="#{seluser.id}" |
input type="text" name="name" pattern="#{NAME_REGEX_STR}" maxlength="#{MAX_NAME_LEN}" oninput="this.reportValidity()" title="#{REGISTER_ERRORS[:name_desc]}" |
||||||
| #{seluser.name} (id=#{seluser.id}) |
|
||||||
|
label Role color |
||||||
label Select Role |
input type="color" name="color" value="#fa0f01" |
||||||
select name="role_id" |
|
||||||
- if session_user.admin? |
label Role flags int |
||||||
- Role.get_all.each do |selrole| |
input type="number" name="flags" value="0" |
||||||
option value="#{selrole.id}" |
|
||||||
| #{selrole.name} (id=#{selrole.id}) |
input type="submit" value="Create role" |
||||||
- else |
|
||||||
- session_user.roles.each do |selrole| |
|
||||||
option value="#{selrole.id}" |
article.card.border |
||||||
| #{selrole.name} (id=#{selrole.id}) |
h2 Manage Roles |
||||||
|
ul.list-container |
||||||
input type="submit" value="Add User" |
- data[:roles].each do |role| |
||||||
|
li |
||||||
|
| #{role.name} |
||||||
|
a.inlbutton href="/admin/roles/#{role.id}/edit" |
||||||
|
| [EDIT] |
||||||
|
a.inlbutton href="/admin/roles/#{role.id}/delete" |
||||||
|
| [DELETE] |
||||||
|
Loading…
Reference in new issue