From e2f9e4ff3e3443a6875592d823e4e5739a3b7bd1 Mon Sep 17 00:00:00 2001 From: luxagraf Date: Thu, 13 Nov 2014 13:22:07 -0500 Subject: Turned comments back on. See how this goes. --- design/templates/comments/base.html | 18 ++++---- design/templates/comments/comment.html | 32 ------------- .../comments/comment_notification_email.txt | 23 ++-------- design/templates/comments/deleted.html | 15 +------ design/templates/comments/flagged.html | 15 +------ design/templates/comments/form.html | 43 ++++++++++-------- design/templates/comments/list.html | 36 +++++++++------ design/templates/comments/posted.html | 46 ++++++++++--------- design/templates/comments/preview.html | 52 +++++++++++++--------- design/templates/details/entry.html | 43 ++++++++++-------- 10 files changed, 143 insertions(+), 180 deletions(-) delete mode 100644 design/templates/comments/comment.html (limited to 'design/templates') diff --git a/design/templates/comments/base.html b/design/templates/comments/base.html index d4382ce..9828ff6 100644 --- a/design/templates/comments/base.html +++ b/design/templates/comments/base.html @@ -1,8 +1,10 @@ -{% extends 'base.html' %} -{% block headtitle %}{% block title %}{% trans "Responses for page" %}{% endblock %}{% endblock %} - -{% block main %} -
- {% block content %}{% endblock %} -
-{% endblock %} + + + + + {% block title %}{% endblock %} + + + {% block content %}{% endblock %} + + diff --git a/design/templates/comments/comment.html b/design/templates/comments/comment.html deleted file mode 100644 index 475775d..0000000 --- a/design/templates/comments/comment.html +++ /dev/null @@ -1,32 +0,0 @@ -{% comment %} - Something that django.contrib.comments does not provide: - An individual template for a single comment, to easily be reused. - - This include is also used by the Ajax comments view. - The div id should be "c{id}", because the comment.get_absolute_url() points to it. - - NOTE: to override the displayed date format, don't replace this template. - Instead, define DATETIME_FORMAT in a locale file. Requires setting: - - FORMAT_MODULE_PATH = 'settings.locale' - - Then create 'settings/locale/XY/formats.py' with: - - DATETIME_FORMAT = '...' - - This should give you consistent dates across all views. -{% endcomment %} -{% load i18n %} -
- {% if preview %}

{% trans "Preview of your comment" %}

{% endif %} -
- {% if comment.url %}{%if comment.url == "http://lux.me/"%}{%else%}{% endif %}{% endif %} - {% if comment.name %}{{ comment.name }}{% else %}{% trans "Anonymous" %}{% endif %}{% comment %} - {% endcomment %}{% if comment.url %}{% endif %} - {% if not comment.is_public %}({% trans "moderated" %}){% endif %} - {% if USE_THREADEDCOMMENTS and not preview %}{% trans "reply" %}{% endif %} -
- - -
{{ comment.comment|linebreaks }}
-
diff --git a/design/templates/comments/comment_notification_email.txt b/design/templates/comments/comment_notification_email.txt index 9dfb821..63f1493 100644 --- a/design/templates/comments/comment_notification_email.txt +++ b/design/templates/comments/comment_notification_email.txt @@ -1,20 +1,3 @@ -{% load url from future %}{% autoescape off %}{% comment %} -{% endcomment %}A new comment has been posted on your site "{{ site }}, to the page entitled "{{ content_object }}". -Link to the page: http://{{ site.domain }}{{ content_object.get_absolute_url }} - -IP-address: 95.97.240.121{% if comment.title %} -Title: {{ comment.title }}{% endif %} -Name: {{ comment.user_name|default:comment.user }} -Email: {{ comment.user_email }} -Homepage: {{ comment.user_url }} -Moderated: {{ comment.is_public|yesno:'no,yes' }} - -Comment: -{{ comment.comment }} - ----- -You have the following options available: - View comment -- http://{{ site.domain }}{{ comment.get_absolute_url }} - Flag comment -- http://{{ site.domain }}{% url 'comments-flag' comment.pk %} - Delete comment -- http://{{ site.domain }}{% url 'comments-delete' comment.pk %} -{% endautoescape %} \ No newline at end of file +A comment has been posted on {{ content_object }}. +The comment reads as follows: +{{ comment }} diff --git a/design/templates/comments/deleted.html b/design/templates/comments/deleted.html index c62a1ff..e608481 100644 --- a/design/templates/comments/deleted.html +++ b/design/templates/comments/deleted.html @@ -3,19 +3,6 @@ {% block title %}{% trans "Thanks for removing" %}.{% endblock %} -{% block extrahead %} - {{ block.super }} - -{% endblock %} - {% block content %} -

{% trans "Thanks for removing the comment" %}

-

- {% blocktrans %} - Thanks for taking the time to improve the quality of discussion on our site.
- You will be sent back to the article... - {% endblocktrans %} -

- -

{% trans "Back to the article" %}

+

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

{% endblock %} diff --git a/design/templates/comments/flagged.html b/design/templates/comments/flagged.html index bebc151..e558019 100644 --- a/design/templates/comments/flagged.html +++ b/design/templates/comments/flagged.html @@ -3,19 +3,6 @@ {% block title %}{% trans "Thanks for flagging" %}.{% endblock %} -{% block extrahead %} - {{ block.super }} - -{% endblock %} - {% block content %} -

{% trans "Thanks for flagging the comment" %}

-

- {% blocktrans %} - Thanks for taking the time to improve the quality of discussion on our site.
- You will be sent back to the article... - {% endblocktrans %} -

- -

{% trans "Back to the article" %}

+

{% trans "Thanks for taking the time to improve the quality of discussion on our site" %}.

{% endblock %} diff --git a/design/templates/comments/form.html b/design/templates/comments/form.html index f8bb18d..776a543 100644 --- a/design/templates/comments/form.html +++ b/design/templates/comments/form.html @@ -1,18 +1,25 @@ -{% load comments i18n crispy_forms_tags fluent_comments_tags %}{% load url from future %} - -{% if not form.target_object|comments_are_open %} -

{% trans "Comments are closed." %}

-{% else %} -
{% csrf_token %} - {% if next %}
{% endif %} - - {{ form|crispy }} - -
- - - {% ajax_comment_tags %} -
-
-{% endif %} \ No newline at end of file +{% load comments i18n %} +
+

Comments?

+
{% csrf_token %} + {% if next %}
{% endif %} + + {% for field in form %} + {% if field.is_hidden %} +
{{ field }}
+ {% else %} + {% if field.errors %}{{ field.errors }}{% endif %} + + {% endif %} + {% endfor %} +

+ + +

+
+

All comments are moderated, so you won’t see it right away. If we’re on the road sometimes it takes a few days, but we’ll get it up as soon as we can. You can use Markdown or HTML to format your comments. The allowed tags are <b>, <i>, <em>, <strong>, <a>. To create a new paragraph hit return twice. Remember Kurt Vonnegut's rule: “god damn it, you’ve got to be kind.”

+
diff --git a/design/templates/comments/list.html b/design/templates/comments/list.html index c105279..378145e 100644 --- a/design/templates/comments/list.html +++ b/design/templates/comments/list.html @@ -1,14 +1,22 @@ -{% comment %} - - Since we support both flat comments, and threadedcomments, - the 'fluent_comments_list' templatetag loads the proper template. - - It either loads: - - fluent_comments/templatetags/flat_html.html - - fluent_comments/templatetags/threaded_list.html - - Both reuse comments/comment.html eventually. - To style comments, consider overwriting that template. - -{% endcomment %} -{% load fluent_comments_tags %}{% fluent_comments_list %} +{% load gravatar_local %} +{% load markdown%} +{% load bleach_tags %} +{% load nofollow %} +{% load comments %} +
+ {% for comment in comment_list %} +
+ +
+ {{comment.name}} + {{comment.submit_date}} +
+ +
+ {{comment.comment|removetags:"p"|markdown|bleach|nofollow|safe}} +
+
+ {% endfor %} +
diff --git a/design/templates/comments/posted.html b/design/templates/comments/posted.html index e13288d..f4aee46 100644 --- a/design/templates/comments/posted.html +++ b/design/templates/comments/posted.html @@ -1,25 +1,31 @@ -{% extends "comments/base.html" %}{% load i18n %} +{% extends "base.html" %} +{% load i18n %} +{% block js %} + +{% endblock %} +{% block primary %} +
+

Thank you for your comment

+

Unless you've previously been approved a few times, your comment will be moderated. If we're on the road this can sometimes take a few days, so please be patient.

+

Return to the page you came from Redirecting in 5

+ +
{% endblock %} diff --git a/design/templates/comments/preview.html b/design/templates/comments/preview.html index 663b5ca..58eba01 100644 --- a/design/templates/comments/preview.html +++ b/design/templates/comments/preview.html @@ -1,30 +1,38 @@ -{% extends "comments/base.html" %}{% load i18n crispy_forms_tags comments %} +{% extends "base.html" %} +{% load i18n %} -{% block title %}{% trans "Preview your comment" %}{% endblock %} -{% block content %} -
{% csrf_token %} - {% if next %}
{% endif %} +{% block primary %} +
+

{% trans "Preview your comment" %}

+ {% load comments %} + {% csrf_token %} + {% if next %}
{% endif %} {% if form.errors %} -

{% blocktrans count form.errors|length as counter %}Please correct the error below{% plural %}Please correct the errors below{% endblocktrans %}

+

{% if form.errors|length == 1 %}{% trans "Please correct the error below" %}{% else %}{% trans "Please correct the errors below" %}{% endif %}

{% else %} -

{% trans "Preview of your comment" %}

- -
{{ comment|linebreaks }}
- -
- -
- -

{% trans "Or make changes" %}:

+
{{ comment|linebreaks }}
+

+

{% trans "Or make changes" %}:

+

{% endif %} - - {{ form|crispy }} - -
- - -
+ {% for field in form %} + {% if field.is_hidden %} +
{{ field }}
+ {% else %} + {% if field.errors %}{{ field.errors }}{% endif %} + + {% endif %} + {% endfor %} +

+ + +

+
{% endblock %} diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html index b2be14d..948a9b8 100644 --- a/design/templates/details/entry.html +++ b/design/templates/details/entry.html @@ -1,5 +1,6 @@ {% extends 'base.html' %} {% load typogrify_tags %} +{% load comments %} {% block pagetitle %}{{object.title|title|smartypants|safe}} - Luxagraf, Writing{%comment%}{% if object.country_name == "United States" %}{{object.location_name|smartypants|safe}}, {{object.state_name}}{%else%}{{object.location_name|smartypants|safe}}, {{object.country_name}}{%endif%}{%endcomment%}{% endblock %} @@ -45,29 +46,35 @@ class="{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%en {%endif%} {%endwith%}{%endwith%} - {%comment%} - {% load comments %} - - - - -{% render_comment_list for object %} -{% render_comment_form for object %} - {%endcomment%} - {%comment%} -
-

Comments

-
blog comments powered by Disqus -
- {%endcomment%} - -
+ {% comment %}
If you enjoyed this, you should join the mailing list…
{% include 'mailing_list.html' %} -
+
{% endcomment %} + + +{% get_comment_count for object as comment_count %}. +{%if comment_count > 0%} +

{{comment_count}} Comments

+{% render_comment_list for object %} +{%endif%} +{% render_comment_form for object %} {% endblock %} {% block js %} + {% with object.template_name as t %}{%if t == 1 or t == 3 %} {%endif%}{%endwith%}{%endblock%} -- cgit v1.2.3-70-g09d2