# HG changeset patch # User Brian Neal # Date 1413143983 18000 # Node ID b8c401cf99ca95b8f803019a82b6cbb52a412a4b # Parent 47521d9e94bd3eb311e489c2d756cacab9d54c5d For issue #77, add comments to contests. diff -r 47521d9e94bd -r b8c401cf99ca sg101/templates/contests/contest_detail.html --- a/sg101/templates/contests/contest_detail.html Sat Oct 04 17:34:51 2014 -0500 +++ b/sg101/templates/contests/contest_detail.html Sun Oct 12 14:59:43 2014 -0500 @@ -1,11 +1,20 @@ {% extends 'base.html' %} {% load bio_tags %} {% load core_tags %} +{% load comment_tags %} +{% load script_tags %} {% block custom_meta %} {% open_graph_meta_tags contest %} {% endblock %} {% block title %}Contests: {{ contest.title }}{% endblock %} +{% block custom_css %} + +{% endblock %} {% block custom_js %} +{% if contest.is_active %} +{% script_tags "markitup jquery-ui" %} + +{% endif %} @@ -69,4 +78,17 @@ {% endif %}
{% social_sharing contest.title contest.get_absolute_url %} + +
+{% get_comment_count for contest as comment_count %} +

This contest has {{ comment_count }} comment{{ comment_count|pluralize }}.

+
+{% render_comment_list contest %} +{% if contest.is_active %} +

Leave a comment?

+{% render_comment_form for contest %} +{% else %} +

Comments are closed for this contest. If you'd like to share your thoughts +on this contest with the site staff, you can contact us directly.

+{% endif %} {% endblock %}