rename property

pull/211/head
Aevann 2023-10-03 09:19:46 +03:00
parent c89ddab376
commit 0a70515b3e
5 changed files with 6 additions and 6 deletions

View File

@ -489,5 +489,5 @@ class Comment(Base):
return g.db.query(CommentSaveRelationship).filter_by(comment_id=self.id).count()
@lazy
def get_award_classes(self, v):
def award_classes(self, v):
return get_award_classes(self, v)

View File

@ -375,5 +375,5 @@ class Post(Base):
return g.db.query(SaveRelationship).filter_by(post_id=self.id).count()
@lazy
def get_award_classes(self, v, title=False):
def award_classes(self, v, title=False):
return get_award_classes(self, v, title)

View File

@ -243,7 +243,7 @@
{% endif %}
{% set realbody = c.realbody(v) %}
<div id="comment-text-{{c.id}}" class="{{c.get_award_classes(v)}} comment-text mb-0" {% if c.award_count('tilt', v) %}style="transform: rotate({{c.award_count('tilt', v)}}deg)"{% endif %}>
<div id="comment-text-{{c.id}}" class="{{c.award_classes(v)}} comment-text mb-0" {% if c.award_count('tilt', v) %}style="transform: rotate({{c.award_count('tilt', v)}}deg)"{% endif %}>
{{realbody | safe}}
</div>

View File

@ -95,7 +95,7 @@
{{macros.reports(p, 'post')}}
<h1 id="post-title" class="{{p.get_award_classes(v, True)}} card-title post-title text-left mb-md-3">
<h1 id="post-title" class="{{p.award_classes(v, True)}} card-title post-title text-left mb-md-3">
{% if p.realurl(v) and not v_forbid_deleted %}
<a class="no-visited" {% if not v or v.newtabexternal %}target="_blank"{% endif %} rel="nofollow noopener" href="{{p.realurl(v)}}">
{% if p.flair %}<span class="patron font-weight-bolder mr-1" style="background-color:var(--primary); font-size:12px; line-height:2">{{p.flair | safe}}</span>{% endif %}
@ -143,7 +143,7 @@
{% endif %}
{% endif %}
<div id="post-text" class="{{p.get_award_classes(v)}}">
<div id="post-text" class="{{p.award_classes(v)}}">
{% if p.is_image %}
<div class="row no-gutters mb-4">
<div class="col">

View File

@ -208,7 +208,7 @@
{% if not v_forbid_deleted %}
{% if p.realbody(v) %}
<div class="{{p.get_award_classes(v)}} d-none card rounded border post-preview" id="post-text-{{p.id}}">
<div class="{{p.award_classes(v)}} d-none card rounded border post-preview" id="post-text-{{p.id}}">
{{p.realbody(v) | safe}}
</div>
{% endif %}