From 0ac2b7ec706c1e5cabefbbc5ea8182263614bf08 Mon Sep 17 00:00:00 2001 From: discomrade Date: Sat, 24 Jul 2021 04:32:45 -0200 Subject: [PATCH] Show ban appeal count on mod dashboard --- inc/mod/pages.php | 2 +- templates/mod/dashboard.html | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/inc/mod/pages.php b/inc/mod/pages.php index 63ed5516..7edab753 100644 --- a/inc/mod/pages.php +++ b/inc/mod/pages.php @@ -105,7 +105,7 @@ function mod_dashboard() { // Counter for number of appeals $query = query('SELECT COUNT(*) FROM ``ban_appeals`` WHERE ``denied`` = 0') or error(db_error($query)); - $args['appealcount'] = $query->fetchColumn(); + $args['appeals'] = $query->fetchColumn(); if ($mod['type'] >= ADMIN && $config['check_updates']) { if (!$config['version']) diff --git a/templates/mod/dashboard.html b/templates/mod/dashboard.html index 34030282..44105ee0 100644 --- a/templates/mod/dashboard.html +++ b/templates/mod/dashboard.html @@ -93,7 +93,11 @@
  • {% trans 'Ban list' %}
  • {% endif %} {% if config.ban_appeals and mod|hasPermission(config.mod.view_ban_appeals) %} -
  • {% trans 'Ban appeals' %} ({{ appealcount }})
  • +
  • + {% if appeals > 0 %}{% endif %} + {% trans 'Ban appeals' %} ({{ appeals }}) + {% if appeals > 0 %}{% endif %} +
  • {% endif %} {% if mod|hasPermission(config.mod.manageusers) %}
  • {% trans 'Manage users' %}