Mercurial > public > sg101
changeset 1103:babb1f44dda5
Use V3 post box for poll comments.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Wed, 06 Jul 2016 20:27:34 -0500 |
parents | 1a4f4a69e244 |
children | 47e7dc23da4a |
files | comments/templatetags/comment_tags.py sg101/templates/polls/poll_detail.html |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/comments/templatetags/comment_tags.py Wed Jul 06 20:03:59 2016 -0500 +++ b/comments/templatetags/comment_tags.py Wed Jul 06 20:27:34 2016 -0500 @@ -122,6 +122,11 @@ return {'user': user, 'form': CommentForm(obj)} +@register.inclusion_tag('comments/v3/comment_form.html') +def render_comment_form_v3(user, obj): + return {'user': user, 'form': CommentForm(obj)} + + @register.inclusion_tag('comments/comment_list.html') def render_comment_list(object): """
--- a/sg101/templates/polls/poll_detail.html Wed Jul 06 20:03:59 2016 -0500 +++ b/sg101/templates/polls/poll_detail.html Wed Jul 06 20:27:34 2016 -0500 @@ -4,7 +4,6 @@ {% load static from staticfiles %} {% block title %}Poll Results: {{ poll.question }}{% endblock %} {% block pre_custom_css %} -{% css_tags 'jquery-ui markitup' %} {% endblock %} {% block custom_css %} <link rel="stylesheet" type="text/css" href="{% static "css/comments.css" %}" /> @@ -65,7 +64,7 @@ {% render_comment_list poll %} {% if poll.is_open %} <p>Leave a comment?</p> -{% render_comment_form user poll %} +{% render_comment_form_v3 user poll %} {% else %} <p>Comments are closed for this poll. If you'd like to share your thoughts on this poll with the site staff, you can <a href="{% url 'contact-form' %}">contact us directly</a>.</p> @@ -74,7 +73,7 @@ {% block custom_js %} {% if poll.is_open %} - {% js_tags "markitup jquery-ui" %} <script type="text/javascript" src="{% static "js/comments.js" %}"></script> + <script src="{% static "js/v3/post_box.js" %}"></script> {% endif %} {% endblock %}