awards: don't load JS if disabled
This commit is contained in:
parent
f4445fd58e
commit
fc81ed11bf
3 changed files with 15 additions and 7 deletions
|
@ -44,4 +44,6 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{% if FEATURES['AWARDS'] %}
|
||||
<script src="{{ 'js/award_modal.js' | asset }}" data-cfasync="false"></script>
|
||||
{% endif %}
|
||||
|
|
|
@ -187,9 +187,11 @@
|
|||
{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {{c.author.customtitle | safe}}</bdi>{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% for a in c.awards|reverse %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{a.title}} Award given by @{{a.user.username}}"></i>
|
||||
{% endfor %}
|
||||
{% if FEATURES['AWARDS'] %}
|
||||
{% for a in c.awards|reverse %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{a.title}} Award given by @{{a.user.username}}"></i>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if c.post %}
|
||||
{% set sub = c.post.sub %}
|
||||
|
@ -814,7 +816,9 @@
|
|||
<script src="{{ 'js/vendor/marked.min.js' | asset }}"></script>
|
||||
<script src="{{ 'js/marked.custom.js' | asset }}"></script>
|
||||
<script src="{{ 'js/comments_v.js' | asset }}"></script>
|
||||
<script src="{{ 'js/award_modal.js' | asset }}"></script>
|
||||
{% if FEATURES['AWARDS'] %}
|
||||
<script src="{{ 'js/award_modal.js' | asset }}"></script>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<script src="{{ 'js/clipboard.js' | asset }}"></script>
|
||||
|
|
|
@ -170,9 +170,11 @@
|
|||
<a role="button"><i class="fas fa-hammer-crash text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was banned for this post{% if p.author.banned_by %} by @{{p.author.banned_by.username}}{% endif %}"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% for a in p.awards|reverse %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{a.title}} Award given by @{{a.user.username}}"></i>
|
||||
{% endfor %}
|
||||
{% if FEATURES['AWARDS'] %}
|
||||
{% for a in p.awards|reverse %}
|
||||
<i class="{{a.class_list}} px-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="{{a.title}} Award given by @{{a.user.username}}"></i>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.admin_level > 1 and p.author.shadowbanned %}
|
||||
<i class="fas fa-user-times text-admin" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Shadowbanned by @{{p.author.shadowbanned}}"></i>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue