More manage stuff.
This commit is contained in:
parent
fa71040fbc
commit
f3760f62ff
20 changed files with 139 additions and 304 deletions
|
@ -1,134 +0,0 @@
|
|||
.manage-header {
|
||||
background-color: #111;
|
||||
background-image: linear-gradient(0deg, #222, #333);
|
||||
font-size: 1.5em;
|
||||
color: #fff;
|
||||
|
||||
&__wrapper {
|
||||
display: flex;
|
||||
max-width: var(--site-max-width);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&__logo {
|
||||
padding: 8px 10px;
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
}
|
||||
|
||||
&__navigation {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&__navigation {
|
||||
flex-grow: 1;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
&__logo {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&__user {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
&__menu {
|
||||
margin: 0 1px;
|
||||
|
||||
&__toggle {
|
||||
padding: 8px 10px;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
min-width: 50px;
|
||||
transition: background-color .2s, min-width .2s;
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
|
||||
&--profile {
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: right;
|
||||
padding-right: 45px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
&--active,
|
||||
&:active {
|
||||
background-color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
&__state {
|
||||
display: none;
|
||||
|
||||
&:checked ~ .manage-header__menu__toggle {
|
||||
background-color: #333;
|
||||
min-width: 150px;
|
||||
}
|
||||
|
||||
&:checked ~ .manage-header__menu__options {
|
||||
max-height: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
&__options {
|
||||
overflow: hidden;
|
||||
max-height: 0px;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
background-color: #333;
|
||||
z-index: 1000;
|
||||
transition: max-height .2s;
|
||||
box-shadow: 0 5px 5px 0 fade(#444, 80%);
|
||||
|
||||
&--user {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
&__link {
|
||||
padding: 8px 10px;
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
transition: background-color .2s;
|
||||
|
||||
&:hover {
|
||||
background-color: #444;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: #2a2a2a;
|
||||
}
|
||||
}
|
||||
|
||||
&__section {
|
||||
margin: 1px 2px;
|
||||
|
||||
&:first-child {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
||||
&:not(:last-child) {
|
||||
padding-bottom: 1px;
|
||||
margin-bottom: 1px;
|
||||
border-bottom: 1px solid #444;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
@import "classes/form";
|
||||
@import "classes/header";
|
||||
@import "classes/listing";
|
||||
|
||||
@import "classes/changelog-change";
|
||||
|
|
|
@ -63,24 +63,19 @@
|
|||
margin-left: 2px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
flex: 0 0 auto;
|
||||
|
||||
&--active {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
&--title {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
&--country {
|
||||
flex: 0 0 auto;
|
||||
align-items: baseline;
|
||||
vertical-align: middle;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
&--donator {
|
||||
flex: 0 0 auto;
|
||||
background-image: url('https://static.flash.moe/images/tenshi.png');
|
||||
width: 37px;
|
||||
height: 11px;
|
||||
|
|
|
@ -85,7 +85,7 @@ if (!$changes) {
|
|||
http_response_code(404);
|
||||
}
|
||||
|
||||
if (!empty($changelogDate)) {
|
||||
if (!empty($changelogDate) && count($changes) > 0) {
|
||||
tpl_vars([
|
||||
'comments_category' => $commentsCategory = comments_category_info("changelog-date-{$changelogDate}", true),
|
||||
'comments' => comments_category_get($commentsCategory['category_id'], $app->getUserId()),
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
require_once __DIR__ . '/../../misuzu.php';
|
||||
|
||||
switch ($_GET['v'] ?? null) {
|
||||
default:
|
||||
case 'listing':
|
||||
echo 'forum listing here';
|
||||
break;
|
||||
|
||||
case 'permissions':
|
||||
echo 'permissions here, not even sure what this would do';
|
||||
break;
|
||||
|
||||
case 'settings':
|
||||
echo 'overall forum settings here';
|
||||
break;
|
||||
}
|
|
@ -15,14 +15,25 @@ switch ($_GET['v'] ?? null) {
|
|||
break;
|
||||
}
|
||||
|
||||
var_dump(audit_log_list(0, 20));
|
||||
tpl_var('log_dump', print_r(audit_log_list(0, 50), true));
|
||||
echo tpl_render('manage.general.logs');
|
||||
break;
|
||||
|
||||
case 'emoticons':
|
||||
echo 'soon as well';
|
||||
if (!perms_check($generalPerms, MSZ_GENERAL_PERM_MANAGE_EMOTICONS)) {
|
||||
echo render_error(403);
|
||||
break;
|
||||
}
|
||||
|
||||
echo tpl_render('manage.general.emoticons');
|
||||
break;
|
||||
|
||||
case 'settings':
|
||||
echo 'somewhat soon i guess';
|
||||
if (!perms_check($generalPerms, MSZ_GENERAL_PERM_MANAGE_SETTINGS)) {
|
||||
echo render_error(403);
|
||||
break;
|
||||
}
|
||||
|
||||
echo tpl_render('manage.general.settings');
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -272,7 +272,7 @@ switch ($_GET['v'] ?? null) {
|
|||
|
||||
$getManageRoles = Database::prepare('
|
||||
SELECT
|
||||
`role_id`, `role_colour`, `role_name`,
|
||||
`role_id`, `role_colour`, `role_name`, `role_title`,
|
||||
(
|
||||
SELECT COUNT(`user_id`)
|
||||
FROM `msz_user_roles` as ur
|
||||
|
|
134
src/manage.php
134
src/manage.php
|
@ -12,110 +12,70 @@ function manage_get_menu(int $userId): array
|
|||
}
|
||||
|
||||
$menu = [];
|
||||
|
||||
$menu['General'] = [
|
||||
'Overview' => '/manage/index.php?v=overview',
|
||||
];
|
||||
$menu['General']['Overview'] = '/manage/index.php?v=overview';
|
||||
|
||||
if (perms_check($perms['general'], MSZ_GENERAL_PERM_VIEW_LOGS)) {
|
||||
$menu['General']['Logs'] = '/manage/index.php?v=logs';
|
||||
}
|
||||
|
||||
if (perms_check(
|
||||
$perms['general'],
|
||||
MSZ_GENERAL_PERM_MANAGE_EMOTICONS | MSZ_GENERAL_PERM_MANAGE_SETTINGS
|
||||
)) {
|
||||
if (perms_check($perms['general'], MSZ_GENERAL_PERM_MANAGE_EMOTICONS)) {
|
||||
$menu['General']['Emoticons'] = '/manage/index.php?v=emoticons';
|
||||
}
|
||||
|
||||
if (perms_check($perms['general'], MSZ_GENERAL_PERM_MANAGE_SETTINGS)) {
|
||||
$menu['General']['Settings'] = '/manage/index.php?v=settings';
|
||||
}
|
||||
if (perms_check($perms['general'], MSZ_GENERAL_PERM_MANAGE_EMOTICONS)) {
|
||||
$menu['General']['Emoticons'] = '/manage/index.php?v=emoticons';
|
||||
}
|
||||
|
||||
$canUserManage = MSZ_USER_PERM_MANAGE_USERS | MSZ_USER_PERM_MANAGE_ROLES
|
||||
| MSZ_USER_PERM_MANAGE_PERMS | MSZ_USER_PERM_MANAGE_REPORTS
|
||||
| MSZ_USER_PERM_MANAGE_RESTRICTIONS | MSZ_USER_PERM_MANAGE_BLACKLISTS;
|
||||
|
||||
if (perms_check($perms['user'], $canUserManage)) {
|
||||
$menu['Users'] = [];
|
||||
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_USERS | MSZ_USER_PERM_MANAGE_PERMS)) {
|
||||
$menu['Users']['Listing'] = '/manage/users.php?v=listing';
|
||||
}
|
||||
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_ROLES | MSZ_USER_PERM_MANAGE_PERMS)) {
|
||||
$menu['Users']['Roles'] = '/manage/users.php?v=roles';
|
||||
}
|
||||
|
||||
if (perms_check(
|
||||
$perms['user'],
|
||||
MSZ_USER_PERM_MANAGE_REPORTS | MSZ_USER_PERM_MANAGE_RESTRICTIONS | MSZ_USER_PERM_MANAGE_BLACKLISTS
|
||||
)) {
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_REPORTS)) {
|
||||
$menu['Users']['Reports'] = '/manage/users.php?v=reports';
|
||||
}
|
||||
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_RESTRICTIONS)) {
|
||||
$menu['Users']['Restrictions'] = '/manage/users.php?v=restrictions';
|
||||
}
|
||||
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_BLACKLISTS)) {
|
||||
$menu['Users']['Blacklisting'] = '/manage/users.php?v=blacklisting';
|
||||
}
|
||||
}
|
||||
if (perms_check($perms['general'], MSZ_GENERAL_PERM_MANAGE_SETTINGS)) {
|
||||
$menu['General']['Settings'] = '/manage/index.php?v=settings';
|
||||
}
|
||||
|
||||
$canNewsManage = MSZ_NEWS_PERM_MANAGE_POSTS | MSZ_NEWS_PERM_MANAGE_CATEGORIES;
|
||||
|
||||
if (perms_check($perms['news'], $canNewsManage)) {
|
||||
$menu['News'] = [];
|
||||
|
||||
if (perms_check($perms['news'], MSZ_NEWS_PERM_MANAGE_POSTS)) {
|
||||
$menu['News']['Posts'] = '/manage/news.php?v=posts';
|
||||
}
|
||||
|
||||
if (perms_check($perms['news'], MSZ_NEWS_PERM_MANAGE_CATEGORIES)) {
|
||||
$menu['News']['Categories'] = '/manage/news.php?v=categories';
|
||||
}
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_USERS | MSZ_USER_PERM_MANAGE_PERMS)) {
|
||||
$menu['Users']['Listing'] = '/manage/users.php?v=listing';
|
||||
}
|
||||
|
||||
$canForumManage = MSZ_FORUM_PERM_MANAGE_FORUMS;
|
||||
|
||||
if (perms_check($perms['forum'], $canForumManage)) {
|
||||
$menu['Forums'] = [];
|
||||
|
||||
if (perms_check($perms['forum'], MSZ_FORUM_PERM_MANAGE_FORUMS)) {
|
||||
$menu['Forums']['Listing'] = '/manage/forums.php?v=listing';
|
||||
}
|
||||
|
||||
if (perms_check($perms['forum'], 0)) {
|
||||
$menu['Forums']['Permissions'] = '/manage/forums.php?v=permissions';
|
||||
}
|
||||
|
||||
if (perms_check($perms['forum'], 0)) {
|
||||
$menu['Forums']['Settings'] = '/manage/forums.php?v=settings';
|
||||
}
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_ROLES | MSZ_USER_PERM_MANAGE_PERMS)) {
|
||||
$menu['Users']['Roles'] = '/manage/users.php?v=roles';
|
||||
}
|
||||
|
||||
$canChangelogManage = MSZ_CHANGELOG_PERM_MANAGE_CHANGES | MSZ_CHANGELOG_PERM_MANAGE_TAGS
|
||||
| MSZ_CHANGELOG_PERM_MANAGE_ACTIONS;
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_REPORTS)) {
|
||||
$menu['Users']['Reports'] = '/manage/users.php?v=reports';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], $canChangelogManage)) {
|
||||
$menu['Changelog'] = [];
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_RESTRICTIONS)) {
|
||||
$menu['Users']['Restrictions'] = '/manage/users.php?v=restrictions';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_CHANGES)) {
|
||||
$menu['Changelog']['Changes'] = '/manage/changelog.php?v=changes';
|
||||
}
|
||||
if (perms_check($perms['user'], MSZ_USER_PERM_MANAGE_BLACKLISTS)) {
|
||||
$menu['Users']['Blacklisting'] = '/manage/users.php?v=blacklisting';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_TAGS)) {
|
||||
$menu['Changelog']['Tags'] = '/manage/changelog.php?v=tags';
|
||||
}
|
||||
if (perms_check($perms['news'], MSZ_NEWS_PERM_MANAGE_POSTS)) {
|
||||
$menu['News']['Posts'] = '/manage/news.php?v=posts';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_ACTIONS)) {
|
||||
$menu['Changelog']['Actions'] = '/manage/changelog.php?v=actions';
|
||||
}
|
||||
if (perms_check($perms['news'], MSZ_NEWS_PERM_MANAGE_CATEGORIES)) {
|
||||
$menu['News']['Categories'] = '/manage/news.php?v=categories';
|
||||
}
|
||||
|
||||
if (perms_check($perms['forum'], MSZ_FORUM_PERM_MANAGE_FORUMS)) {
|
||||
$menu['Forums']['Listing'] = '/manage/forums.php?v=listing';
|
||||
}
|
||||
|
||||
if (perms_check($perms['forum'], 0)) {
|
||||
$menu['Forums']['Permissions'] = '/manage/forums.php?v=permissions';
|
||||
}
|
||||
|
||||
if (perms_check($perms['forum'], 0)) {
|
||||
$menu['Forums']['Settings'] = '/manage/forums.php?v=settings';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_CHANGES)) {
|
||||
$menu['Changelog']['Changes'] = '/manage/changelog.php?v=changes';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_TAGS)) {
|
||||
$menu['Changelog']['Tags'] = '/manage/changelog.php?v=tags';
|
||||
}
|
||||
|
||||
if (perms_check($perms['changelog'], MSZ_CHANGELOG_PERM_MANAGE_ACTIONS)) {
|
||||
$menu['Changelog']['Actions'] = '/manage/changelog.php?v=actions';
|
||||
}
|
||||
|
||||
return $menu;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="header__icons">
|
||||
<label class="header__icon header__icon--menu" for="toggle-mobile-header-menu"></label>
|
||||
|
||||
<a class="header__logo{% if is_manage|default(false) %} header__logo--manage{% endif %}" href="/">
|
||||
<a class="header__logo{% if manage_menu is defined %} header__logo--manage{% endif %}" href="/">
|
||||
{{ globals.site_name }}
|
||||
</a>
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
|||
<li class="header__menu__item">
|
||||
<a href="/" class="header__menu__link">Home</a>
|
||||
<ul class="header__submenu">
|
||||
<li class="header__submenu__item"><a href="/members.php" class="header__submenu__link">Members</a></li>
|
||||
<li class="header__submenu__item"><a href="/changelog.php" class="header__submenu__link">Changelog</a></li>
|
||||
{#<li class="header__submenu__item"><a href="/info.php?t=contact" class="header__submenu__link">Contact</a></li>
|
||||
<li class="header__submenu__item"><a href="/info.php?t=rules" class="header__submenu__link">Rules</a></li>#}
|
||||
|
@ -24,9 +25,15 @@
|
|||
</ul>
|
||||
</li>
|
||||
<li class="header__menu__item"><a href="/news.php" class="header__menu__link">News</a></li>
|
||||
<li class="header__menu__item"><a href="/forum/" class="header__menu__link">Forum</a></li>
|
||||
<li class="header__menu__item">
|
||||
<a href="/forum/" class="header__menu__link">Forum</a>
|
||||
{#<ul class="header__submenu">
|
||||
<li class="header__submenu__item"><a href="#" class="header__submenu__link">Unanswered Posts</a></li>
|
||||
<li class="header__submenu__item"><a href="#" class="header__submenu__link">New Posts</a></li>
|
||||
<li class="header__submenu__item"><a href="#" class="header__submenu__link">Your Posts</a></li>
|
||||
</ul>#}
|
||||
</li>
|
||||
<li class="header__menu__item"><a href="https://chat.flashii.net" class="header__menu__link">Chat</a></li>
|
||||
<li class="header__menu__item"><a href="/members.php" class="header__menu__link">Members</a></li>
|
||||
</ul>
|
||||
|
||||
<input type="checkbox" class="header__user-toggle" id="toggle-mobile-header-user">
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
{% from 'macros.twig' import pagination %}
|
||||
|
||||
{% block manage_content %}
|
||||
<div class="container">
|
||||
<a href="?v=action" class="input__button">Create new action</a>
|
||||
</div>
|
||||
<a href="?v=action" class="input__button">Create new action</a>
|
||||
|
||||
<div class="container listing changelog-tags">
|
||||
{% for action in changelog_actions %}
|
||||
|
@ -19,7 +17,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="container container--center">
|
||||
<div class="pagination__wrapper">
|
||||
{{ pagination(changelog_actions_count, changelog_take, changelog_offset, '?v=actions') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
{% from 'macros.twig' import pagination %}
|
||||
|
||||
{% block manage_content %}
|
||||
<div class="container">
|
||||
<a href="?v=change" class="input__button">Create new change</a>
|
||||
</div>
|
||||
<a href="?v=change" class="input__button">Create new change</a>
|
||||
|
||||
<div class="container listing">
|
||||
{% for change in changelog_changes %}
|
||||
|
@ -48,7 +46,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="container container--center">
|
||||
<div class="pagination__wrapper">
|
||||
{{ pagination(changelog_changes_count, changelog_take, changelog_offset, '?v=changes') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
{% from 'macros.twig' import pagination %}
|
||||
|
||||
{% block manage_content %}
|
||||
<div class="container">
|
||||
<a href="?v=tag" class="input__button">Create new tag</a>
|
||||
</div>
|
||||
<a href="?v=tag" class="input__button">Create new tag</a>
|
||||
|
||||
<div class="container listing changelog-tags">
|
||||
{% for tag in changelog_tags %}
|
||||
|
@ -22,7 +20,7 @@
|
|||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="container container--center">
|
||||
<div class="pagination__wrapper">
|
||||
{{ pagination(changelog_tags_count, changelog_take, changelog_offset, '?v=tags') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
1
templates/manage/general/emoticons.twig
Normal file
1
templates/manage/general/emoticons.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'manage/general/master.twig' %}
|
7
templates/manage/general/logs.twig
Normal file
7
templates/manage/general/logs.twig
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends 'manage/general/master.twig' %}
|
||||
|
||||
{% block manage_content %}
|
||||
<pre>
|
||||
{{ log_dump }}
|
||||
</pre>
|
||||
{% endblock %}
|
1
templates/manage/general/settings.twig
Normal file
1
templates/manage/general/settings.twig
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends 'manage/general/master.twig' %}
|
|
@ -1,7 +1,6 @@
|
|||
{% extends 'master.twig' %}
|
||||
{% from 'manage/macros.twig' import manage_navigation %}
|
||||
{% set title = 'Broom Closet' %}
|
||||
{% set is_manage = true %}
|
||||
|
||||
{% block content %}
|
||||
<div class="management">
|
||||
|
|
|
@ -3,23 +3,43 @@
|
|||
|
||||
{% block manage_content %}
|
||||
{% if can_manage_roles %}
|
||||
<div class="container">
|
||||
<a href="?v=role" class="input__button">Create new Role</a>
|
||||
</div>
|
||||
<a href="?v=role" class="input__button">Create new Role</a>
|
||||
{% endif %}
|
||||
|
||||
<div class="container listing role-listing">
|
||||
<div class="userlist">
|
||||
{% for role in manage_roles %}
|
||||
<a href="?v=role&r={{ role.role_id }}" class="listing__entry role-listing__entry"{% if not role.role_colour|colour_get_inherit %} style="{{ role.role_colour|html_colour({'border-color':'%s'}) }}"{% endif %}>
|
||||
<div class="listing__entry__content role-listing__entry__content">
|
||||
{{ role.role_name }}
|
||||
{{ role.users }} users
|
||||
<div class="userlist__item">
|
||||
<div class="usercard">
|
||||
<a href="?v=role&r={{ role.role_id }}"
|
||||
class="usercard__background"></a>
|
||||
|
||||
<div class="usercard__container">
|
||||
<div class="avatar usercard__avatar"
|
||||
style="{{ role.role_colour|html_colour({'background-color':'%s'}) }}">
|
||||
</div>
|
||||
|
||||
<div class="usercard__content">
|
||||
<div class="usercard__name">
|
||||
{{ role.role_name }}
|
||||
</div>
|
||||
|
||||
<div class="usercard__info">
|
||||
<span class="usercard__item usercard__item--title">
|
||||
{{ role.role_title }}
|
||||
</span>
|
||||
|
||||
<span class="usercard__item usercard__item--title">
|
||||
{{ role.users|number_format }} users
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<div class="container container--center">
|
||||
<div class="pagination__wrapper">
|
||||
{{ pagination(manage_roles_count, manage_roles_range, manage_roles_offset, '?v=roles') }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
|
@ -93,8 +93,6 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">{{ edit_role is defined ? 'Update role' : 'Create role' }}</button>
|
||||
</div>
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">{{ edit_role is defined ? 'Update role' : 'Create role' }}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -156,18 +156,15 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="container">
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">Update</button>
|
||||
</div>
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">Update</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if can_manage_users %}
|
||||
<div class="container">
|
||||
{% if has_roles|length > 0 %}
|
||||
<form method="post" action="" style="display:inline-block">
|
||||
<div class="container__title">Manage Roles</div>
|
||||
|
||||
{% if has_roles|length > 0 %}
|
||||
<form method="post" action="" class="container">
|
||||
<div class="container__title">Manage Roles</div>
|
||||
<div class="container__content">
|
||||
<input type="hidden" name="csrf" value="{{ csrf_token() }}">
|
||||
|
||||
<label class="form__label">
|
||||
|
@ -183,17 +180,16 @@
|
|||
</div>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<button class="input__button" name="manage_roles[mode]" value="display">Set Display</button>
|
||||
<button class="input__button" name="manage_roles[mode]" value="remove">Remove</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if available_roles|length > 0 %}
|
||||
<form method="post" action="" style="display:inline-block">
|
||||
<div class="container__title">Add Role</div>
|
||||
<button class="input__button" name="manage_roles[mode]" value="display">Set Display</button>
|
||||
<button class="input__button" name="manage_roles[mode]" value="remove">Remove</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
{% if available_roles|length > 0 %}
|
||||
<form method="post" action="" class="container">
|
||||
<div class="container__title">Add Role</div>
|
||||
<div class="container__content">
|
||||
<label class="form__label">
|
||||
<div class="form__label__text">Available Roles</div>
|
||||
<div class="form__label__input">
|
||||
|
@ -207,11 +203,9 @@
|
|||
</div>
|
||||
</label>
|
||||
|
||||
<div>
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<button class="input__button" name="csrf" value="{{ csrf_token() }}">Add</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
{% include '_layout/meta.twig' %}
|
||||
<link href="{{ '/css/mio.css'|asset_url }}" rel="stylesheet">
|
||||
<link href="{{ '/css/libraries.css'|asset_url }}" rel="stylesheet">
|
||||
{% if is_manage|default(false) %}
|
||||
{% if manage_menu is defined %}
|
||||
<link href="{{ '/css/manage.css'|asset_url }}" rel="stylesheet">
|
||||
<style>
|
||||
:root {
|
||||
|
|
Loading…
Add table
Reference in a new issue