forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-12-26 05:18:28 +02:00
parent 1279734995
commit c527d848ac
2 changed files with 9 additions and 0 deletions

View File

@ -12,6 +12,7 @@ from .subscriptions import *
from .userblock import *
from .badges import *
from .clients import *
from .mod_logs import *
from files.__main__ import Base, cache
from files.helpers.security import *
import random
@ -363,6 +364,12 @@ class User(Base):
return sorted(list(awards.values()), key=lambda x: x['kind'], reverse=True)
@property
@lazy
def modaction_num(self):
if self.admin_level < 2: return 0
return g.db.query(ModAction.id).filter_by(user_id=self.id).count()
@property
@lazy
def notifications_count(self):

View File

@ -12,6 +12,7 @@
<th style="font-weight:bold;">#</th>
<th style="font-weight:bold;">Name</th>
<th style="font-weight:bold; text-align:right;">Score</th>
<th style="font-weight:bold; text-align:right;">Mod actions</th>
</tr>
</thead>
{% for user in admins %}
@ -19,6 +20,7 @@
<td style="font-weight:bold;">{{loop.index}}</td>
<td><a style="color:#{{user.namecolor}};font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a>{% if user.admin_level == 1 and v and v.admin_level > 1 %}<i class="fas fa-broom align-middle ml-2 color-white" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Meme Admin"></i>{% endif %}</td>
<td style="font-weight:bold; text-align:right;">{{user.truecoins}}</td>
<td style="font-weight:bold; text-align:right;">{{user.modaction_num}}</td>
</tr>
{% endfor %}
</table>