From 296dc07f010d8692028db682d02ef3e88e525f01 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sun, 25 Jan 2009 11:03:03 -0500 Subject: tweaked comment templates some more --- bn_django/templates/comments/form.html | 15 +++---- bn_django/templates/comments/posted.html | 8 ++++ bn_django/templates/comments/preview.html | 72 +++++++++++++++++++++++++++++++ 3 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 bn_django/templates/comments/posted.html create mode 100644 bn_django/templates/comments/preview.html (limited to 'bn_django/templates/comments') diff --git a/bn_django/templates/comments/form.html b/bn_django/templates/comments/form.html index 67068e8..39626f0 100644 --- a/bn_django/templates/comments/form.html +++ b/bn_django/templates/comments/form.html @@ -1,23 +1,22 @@ {% load comments i18n %}
- {% for field in form %} - {% if field.is_hidden %} {{ field }} {% else %} +{% if object.get_absolute_url %} {% endif %} + {% for field in form %} {% if field.is_hidden %} {{ field }} {% else %} {% ifequal field.name "honeypot" %} {{ field.label_tag }}{{ field }} {% else %} - - {% endifequal %} - {% endif %} - {% endfor %} + {{ field.label_tag }} + {% endifequal %} {% endif %} {% endfor %}
{% if field.errors %}{{ field.errors }}{% endif %} - {{ field.label_tag }}{{ field }} -
{{ field }} + {% ifequal field.name "name" %} (required) {% else %}{% ifequal field.name "email" %} (required){% endifequal %}{% endifequal %} +
+ (no HTML or other markup)
diff --git a/bn_django/templates/comments/posted.html b/bn_django/templates/comments/posted.html new file mode 100644 index 0000000..e3eb0d2 --- /dev/null +++ b/bn_django/templates/comments/posted.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans "Thanks for your comment" %}.{% endblock %} + +{% block content %} +
+{% endblock %} diff --git a/bn_django/templates/comments/preview.html b/bn_django/templates/comments/preview.html new file mode 100644 index 0000000..cf49370 --- /dev/null +++ b/bn_django/templates/comments/preview.html @@ -0,0 +1,72 @@ +{% extends "base.html" %} +{% load i18n %} + +{% block title %}{% trans "Comment Submission" %}{% endblock %} + +{% block content %}
+
+ {% load comments %} +
+ {% if form.errors %} +

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

+ {% else %} +

{% trans "Preview your comment:" %}

+ + +{% if comment.person_name %} + +{% else %} + +{% endif %} +
+ Posted by + {% if comment.person_name %}{{ comment.person_name}}{% else %}anonymous{% endif %}
+ on + {{ comment.submit_date|date:"F j, Y" }}
+ at {{ comment.submit_date|date:"H:i T" }} +
+ {% if comment.headline %} + {{ comment.headline|escape|wordwrap:80 }} +
+ {% endif %} + {{ comment|escape|wordwrap:80 }} +
+ Posted by + {% if comment.user.username %} {{ comment.user.username }} + {% else %}{{ comment.user_name }} {% endif %}
+ on + {{ comment.submit_date|date:"F j, Y" }}
+ at {{ comment.submit_date|date:"H:i" }} +
+ {% if comment.headline %} + {{ comment.headline|escape|wordwrap:80 }} +
+ {% endif %} + {{ comment|escape|wordwrap:80 }} +
+ + + +

+ {% trans "and" %} {% trans "or make changes" %}: +

+ {% endif %} + + {% for field in form %} {% if field.is_hidden %} {{ field }} {% else %} + {% ifequal field.name "honeypot" %} + {{ field.label_tag }}{{ field }} + {% else %} + {% endifequal %} {% endif %} {% endfor %} + +
+ + {{ field.label_tag }} + {{ field }} + {% if field.errors %}{{ field.errors }}{% endif %} +
+ + + (no HTML or other markup) +
+ +{% endblock %} -- cgit v1.2.3