Browse Source
Merge pull request #344 from discomrade/appeals-count
Show ban appeal count on mod dashboard
pull/40/head
nonmakina
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
3 deletions
-
inc/mod/pages.php
-
templates/mod/dashboard.html
|
@ -115,6 +115,9 @@ function mod_dashboard() { |
|
|
$query = query('SELECT COUNT(*) FROM ``reports``') or error(db_error($query)); |
|
|
$query = query('SELECT COUNT(*) FROM ``reports``') or error(db_error($query)); |
|
|
$args['reports'] = $query->fetchColumn(); |
|
|
$args['reports'] = $query->fetchColumn(); |
|
|
|
|
|
|
|
|
|
|
|
$query = query('SELECT COUNT(*) FROM ``ban_appeals``') or error(db_error($query)); |
|
|
|
|
|
$args['appeals'] = $query->fetchColumn(); |
|
|
|
|
|
|
|
|
if ($mod['type'] >= ADMIN && $config['check_updates']) { |
|
|
if ($mod['type'] >= ADMIN && $config['check_updates']) { |
|
|
if (!$config['version']) |
|
|
if (!$config['version']) |
|
|
error(_('Could not find current version! (Check .installed)')); |
|
|
error(_('Could not find current version! (Check .installed)')); |
|
|
|
@ -26,15 +26,17 @@ |
|
|
{% if mod|hasPermission(config.mod.reports) %} |
|
|
{% if mod|hasPermission(config.mod.reports) %} |
|
|
<li> |
|
|
<li> |
|
|
{% if reports > 0 %}<strong>{% endif %} |
|
|
{% if reports > 0 %}<strong>{% endif %} |
|
|
<a href="?/reports">{% trans 'Report queue' %} ({{ reports }})</a> |
|
|
<a href="?/reports">{% trans 'Report queue' %} ({{ reports }})</a> |
|
|
{% if reports > 0 %}</strong>{% endif %} |
|
|
{% if reports > 0 %}</strong>{% endif %} |
|
|
</li> |
|
|
</li> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% if mod|hasPermission(config.mod.view_banlist) %} |
|
|
{% if mod|hasPermission(config.mod.view_banlist) %} |
|
|
<li><a href="?/bans">{% trans 'Ban list' %}</a></li> |
|
|
<li><a href="?/bans">{% trans 'Ban list' %}</a></li> |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %} |
|
|
{% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %} |
|
|
<li><a href="?/ban-appeals">{% trans 'Ban appeals' %}</a></li> |
|
|
{% if appeals > 0 %}<strong>{% endif %} |
|
|
|
|
|
<li><a href="?/ban-appeals">{% trans 'Ban appeals' %} ({{ appeals }})</a></li> |
|
|
|
|
|
{% if appeals > 0 %}</strong>{% endif %} |
|
|
{% endif %} |
|
|
{% endif %} |
|
|
{% if mod|hasPermission(config.mod.manageusers) %} |
|
|
{% if mod|hasPermission(config.mod.manageusers) %} |
|
|
<li><a href="?/users">{% trans 'Manage users' %}</a></li> |
|
|
<li><a href="?/users">{% trans 'Manage users' %}</a></li> |
|
|