summaryrefslogtreecommitdiff
path: root/design/templates/details
diff options
context:
space:
mode:
Diffstat (limited to 'design/templates/details')
-rw-r--r--design/templates/details/entry.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html
index 1641ace..ce71987 100644
--- a/design/templates/details/entry.html
+++ b/design/templates/details/entry.html
@@ -71,22 +71,26 @@ class="{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%en
{% include 'mailing_list.html' %}
</div> {% endcomment %}
</main>
-
-{% get_comment_count for object as comment_count %}.
+ {% if object.enable_comments %}
+{% get_comment_count for object as comment_count %}
{%if comment_count > 0 %}
<p class="comments--header">{{comment_count}} Comment{{ comment_count|pluralize }}</p>
{% render_comment_list for object %}
{%endif%}
{% render_comment_form for object %}
+{% else %}
+<p class="comments--header" style="text-align: center">Sorry, comments have been disabled for this post.</p>
+{%endif%}
{% endblock %}
{% block js %}
{% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %}
<script src="/media/js/leaflet-master/leaflet-mod.js"></script>
<script src="/media/js/detail.min.js"></script>
{%endif%}{%endwith%}
-
<script type="text/javascript">
window.onload = function() {
+ {% if object.enable_comments %}
+{% get_comment_count for object as comment_count %}
{%if comment_count > 0 %}
//delay loading of gravatar images using noscript data-hash attribute
dataattr = document.getElementsByClassName("datahashloader");
@@ -98,6 +102,7 @@ window.onload = function() {
c.insertBefore(img, c.childNodes[3]);
}
{%endif%}
+{%endif%}
{% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %}
createMap();
var open = false;