MarseyWorld/files/templates/admin/admin_home.html

155 lines
4.4 KiB
HTML
Raw Normal View History

2022-05-04 23:09:46 +00:00
{% extends "default.html" %}
2022-06-19 08:55:44 +00:00
{# Title (~25char max),
Icon (fa-foo-bar), Color (#ff0000),
(URL /admin/.../, Link Name) #}
{%-
set ADMIN_INDEX = [
(
'Content',
'fa-book', '#6b8e23',
(
('/admin/image_posts','Image Posts'),
('/admin/reported/posts','Reported Posts/Comments'),
('/admin/removed/posts','Removed Posts/Comments'),
),
),
(
2022-06-19 08:55:44 +00:00
'Statistics',
'fa-chart-line', '#c9d1d9',
(
2022-06-19 08:55:44 +00:00
('/stats','Content Stats'),
('/weekly_chart','Weekly Stat Chart'),
('/daily_chart','Daily Stat Chart'),
),
),
(
'Safety',
'fa-shield', '#87cefa',
(
('/admin/banned_domains','Banned Domains'),
('/admin/alt_votes','Multi Vote Analysis'),
),
),
(
'Grant',
'fa-award', '#adff2f',
(
('/admin/awards','Give User Award'),
('/admin/badge_grant','Grant Badges'),
('/admin/badge_remove','Remove Badges'),
),
),
(
2022-06-19 08:55:44 +00:00
'Users',
'fa-user', '#f5fffa',
(
2022-06-19 08:55:44 +00:00
('/admin/users','Users Feed'),
('/admin/shadowbanned','Shadowbanned Users'),
('/banned','Permabanned Users'),
('/agendaposters','Users with Chud Theme'),
('/grassed','Currently Grassed Users'),
('/patrons','Patrons / Paypigs'),
('/admin/loggedin','Currently Logged-in Users'),
('/admin/loggedout','Currently Logged-out Users'),
),
),
(
2022-06-19 08:55:44 +00:00
'API Access Control',
'fa-robot', 'red',
(
2022-06-19 08:55:44 +00:00
('/admin/apps','Apps'),
),
),
]
-%}
2022-06-19 08:55:44 +00:00
{%- if LOTTERY_ENABLED -%}
{%- do ADMIN_INDEX.append(
(
'Lottery',
'fa-sack-dollar', '#ffd700',
(
('/admin/lottery/participants','Participants'),
),
),
) -%}
{%- endif -%}
{%- if SITE_NAME == 'PCM' -%}
{%- do ADMIN_INDEX.append(
(
'Configuration',
'fa-sidebar', '#f5fffa',
(
('/admin/sidebar','Edit Sidebar'),
),
),
) -%}
{%- endif -%}
{% block Banner %}{% endblock %}
2022-05-04 23:09:46 +00:00
{% block content %}
<div id="directory--wrapper">
{% for thread in ADMIN_INDEX %}
<div class="directory--link">
<div class="directory--link-content">
<i class="directory--link--icon fas {{thread[1]}}" style="color:{{thread[2]}}"></i>
<div class="directory--link--title">{{thread[0]|safe}}</div>
2022-06-19 08:55:44 +00:00
{% for link in thread[3] %}
<a href="{{link[0]}}">{{link[1]}}</a><br>
{% endfor %}
</div>
</div>
{% endfor %}
2022-06-19 08:55:44 +00:00
{% if v.admin_level >= 3 -%}
<div class="directory--link">
<div class="directory--link-content">
2022-06-19 08:55:44 +00:00
<div class="directory--link--title">Toggles</div>
<div id="directory-admin--toggles">
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="signups" {% if site_settings['Signups'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Signups');">
<label class="custom-control-label" for="signups">Signups</label>
</div>
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="bots" {% if site_settings['Bots'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Bots');">
<label class="custom-control-label" for="bots">Bots</label>
</div>
2022-05-25 11:24:34 +00:00
{% if SITE_NAME == 'rDrama' %}
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Fart mode" {% if site_settings['Fart mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Fart mode');">
<label class="custom-control-label" for="Fart mode">Fart mode</label>
</div>
2022-05-25 11:24:34 +00:00
{% endif %}
2022-05-04 23:09:46 +00:00
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="Read-only mode" {% if site_settings['Read-only mode'] %}checked{% endif %} onchange="post_toast(this,'/admin/site_settings/Read-only mode');">
<label class="custom-control-label" for="Read-only mode">Read-only mode</label>
</div>
<div class="custom-control custom-switch">
<input autocomplete="off" type="checkbox" class="custom-control-input" id="under_attack" name="under_attack" {% if under_attack%}checked{% endif %} onchange="post_toast(this,'/admin/under_attack');">
<label class="custom-control-label" for="under_attack">Under attack mode</label>
</div>
2022-06-19 08:55:44 +00:00
<button class="btn btn-primary mt-3" onclick="post_toast(this,'/admin/purge_cache');">PURGE CACHE</button>
</div>
</div>
</div>
{%- endif %}
2022-05-04 23:09:46 +00:00
2022-06-19 08:55:44 +00:00
<div class="directory--link">
<div class="directory--link-content">
<div class="directory--link--title">Server Status</div>
<div>
Live Revision: <code>{{ gitref }}</code> <br>
</div>
</div>
</div>
2022-06-19 08:55:44 +00:00
</div>
{% endblock %}