diff --git a/files/classes/sub.py b/files/classes/sub.py index de6dea72c..68b55f186 100644 --- a/files/classes/sub.py +++ b/files/classes/sub.py @@ -4,6 +4,7 @@ from files.__main__ import Base from files.helpers.lazy import lazy from os import environ from .sub_subscription import * +from .sub_block import * SITE_NAME = environ.get("SITE_NAME", '').strip() SITE = environ.get("DOMAIN", '').strip() @@ -21,6 +22,8 @@ class Sub(Base): css = Column(String) subscriptions = relationship("SubSubscription", lazy="dynamic", primaryjoin="SubSubscription.sub==Sub.name", viewonly=True) + blocks = relationship("SubBlock", lazy="dynamic", primaryjoin="SubBlock.sub==Sub.name", viewonly=True) + def __repr__(self): return f"" @@ -40,4 +43,9 @@ class Sub(Base): @property @lazy def subscription_num(self): - return self.subscriptions.count() \ No newline at end of file + return self.subscriptions.count() + + @property + @lazy + def block_num(self): + return self.blocks.count() \ No newline at end of file diff --git a/files/templates/admin/awards.html b/files/templates/admin/awards.html index adac611be..e78c97082 100644 --- a/files/templates/admin/awards.html +++ b/files/templates/admin/awards.html @@ -53,7 +53,7 @@ {{a['title']}} - + {% endfor %} diff --git a/files/templates/ban_modal.html b/files/templates/ban_modal.html index 6b30c2fdc..fdaede353 100644 --- a/files/templates/ban_modal.html +++ b/files/templates/ban_modal.html @@ -14,13 +14,13 @@
- + - +
diff --git a/files/templates/comments.html b/files/templates/comments.html index f4841e2b2..708ddb998 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -769,7 +769,7 @@ {% endif %} {% if c.oauth_app %} - API App + API App {% endif %}
diff --git a/files/templates/default.html b/files/templates/default.html index 351bff4da..aac3970c8 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -63,22 +63,22 @@ {% block title %} {{SITE_NAME}} - - - - + + + + - - + + - + - - - + + + {% endblock %} diff --git a/files/templates/marseys.html b/files/templates/marseys.html index af545a952..7722f0ba1 100644 --- a/files/templates/marseys.html +++ b/files/templates/marseys.html @@ -20,7 +20,7 @@ {{loop.index}} {{marsey.name}} - :{{marsey.name}}: + :{{marsey.name}}: {{marsey.count}} {{author.username}} @@ -30,7 +30,7 @@ {{loop.index}} {{marsey.name}} - :{{marsey.name}}: + :{{marsey.name}}: {{marsey.count}} {% endfor %} diff --git a/files/templates/post_actions.html b/files/templates/post_actions.html index 1f8802484..e33b95bb9 100644 --- a/files/templates/post_actions.html +++ b/files/templates/post_actions.html @@ -38,7 +38,7 @@ {% endif %} {% if v %} - +