From b148bab8f549792f19ae0256c00c282f29e061dc Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 7 Mar 2007 01:09:52 -0800 Subject: much work; comments working for photos, static content moved, more --- bn_django/templates/base.html | 5 ++- bn_django/templates/comment_list | 28 +++++++++++++--- bn_django/templates/comments/form.html | 14 ++++---- bn_django/templates/comments/free_preview.html | 46 ++++++++++++++++++++++++++ bn_django/templates/comments/freeform.html | 7 ++-- bn_django/templates/comments/posted.html | 13 ++++++++ bn_django/templates/comments/preview.html | 46 ++++++++++++++++++++++++++ 7 files changed, 141 insertions(+), 18 deletions(-) create mode 100644 bn_django/templates/comments/free_preview.html create mode 100644 bn_django/templates/comments/posted.html create mode 100644 bn_django/templates/comments/preview.html (limited to 'bn_django/templates') diff --git a/bn_django/templates/base.html b/bn_django/templates/base.html index 402a959..7349669 100644 --- a/bn_django/templates/base.html +++ b/bn_django/templates/base.html @@ -3,9 +3,8 @@ {% block stylesheets %} - - - + + {% endblock %} {% block externaljs %} {% endblock %} {% block windowtitle %}bryannewbold.com{% endblock %} diff --git a/bn_django/templates/comment_list b/bn_django/templates/comment_list index 8ed411d..ce3ad19 100644 --- a/bn_django/templates/comment_list +++ b/bn_django/templates/comment_list @@ -1,13 +1,33 @@ - {% if comments %} +
{% for c in comments %}
- {{ c.user }} - {{ c.submit_date }} + Posted by {{ c.user }}
+ on + {{ c.submit_date|date:"F j, Y" }}
+ at {{ c.submit_date|date:"H:i T" }}
+ {% if c.headline %} {{ c.headline|escape|wordwrap:80 }} - {{ c.content|escape|wordwrap:80 }} +
+ {% endif %} + {{ c.comment|escape|wordwrap:80 }} + +{% endfor %} +{% for c in free_comments %} +
+ Posted by + {% if c.user %}{{ c.user }}{% else %}anonymous{% endif %}
+ on + {{ c.submit_date|date:"F j, Y" }}
+ at {{ c.submit_date|date:"H:i T" }} +
+ {% if c.headline %} + {{ c.headline|escape|wordwrap:80 }} +
+ {% endif %} + {{ c.comment|escape|wordwrap:80 }} {% endfor %}
diff --git a/bn_django/templates/comments/form.html b/bn_django/templates/comments/form.html index 403dd2b..a2af1be 100644 --- a/bn_django/templates/comments/form.html +++ b/bn_django/templates/comments/form.html @@ -1,11 +1,14 @@ {% load i18n %}
+

+ {% if user.is_authenticated %} -

{% trans "Username:" %} {{ user.username }} ({% trans "Log out" %})

+

 {% trans "Username:" %} {{ user.username }} ({% trans "Log out" %}) {% else %} -


{% trans "Password:" %} ({% trans "Forgotten your password?" %})

+


{% trans "Password:" %} ({% trans "Forgotten your password?" %}) {% endif %} +

{% if ratings_optional or ratings_required %}

{% trans "Ratings" %} ({% if ratings_required %}{% trans "Required" %}{% else %}{% trans "Optional" %}{% endif %}):

@@ -24,13 +27,10 @@ {% endif %} -


-

- - - + +

diff --git a/bn_django/templates/comments/free_preview.html b/bn_django/templates/comments/free_preview.html new file mode 100644 index 0000000..3c212c0 --- /dev/null +++ b/bn_django/templates/comments/free_preview.html @@ -0,0 +1,46 @@ +{% extends "base.html" %} + + +{% block title %}Preview your comment{% endblock %} + +{% block content %} + +
+ {% if comment_form.has_errors %} +

Please correct the following errors.

+ {% else %} +
+ {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} +

Posted by {{ comment.person_name }}

+
+ +

+ +

Or edit it again

+ {% endif %} + + {% if comment_form.person_name.errors %} + {{ comment_form.person_name.html_error_list }} + {% endif %} + +

{{ comment_form.person_name }}

+ + {% if comment_form.comment.errors %} + {{ comment_form.comment.error_list }} + {% endif %} + +

+ +
+ {{ comment_form.comment }} +

+ + + + + +

+ +

+
+{% endblock %} diff --git a/bn_django/templates/comments/freeform.html b/bn_django/templates/comments/freeform.html index 95e5153..3d3678e 100644 --- a/bn_django/templates/comments/freeform.html +++ b/bn_django/templates/comments/freeform.html @@ -1,11 +1,10 @@ {% load i18n %}
-

-


-

+

+ +

  -

diff --git a/bn_django/templates/comments/posted.html b/bn_django/templates/comments/posted.html new file mode 100644 index 0000000..07bdb67 --- /dev/null +++ b/bn_django/templates/comments/posted.html @@ -0,0 +1,13 @@ +{% extends "base.html" %} + +{% block title %}Comment posted successfully{% endblock %} + +{% block content %} +

Thanks for contributing.

+ +{% if object %} + +{% endif %} +{% endblock %} diff --git a/bn_django/templates/comments/preview.html b/bn_django/templates/comments/preview.html new file mode 100644 index 0000000..052b373 --- /dev/null +++ b/bn_django/templates/comments/preview.html @@ -0,0 +1,46 @@ +{% extends "base.html" %} + + +{% block title %}Preview your comment{% endblock %} + +{% block content %} + +
+ {% if comment_form.has_errors %} +

Please correct the following errors.

+ {% else %} +
+ {{ comment.comment|escape|urlizetrunc:"40"|linebreaks }} +

Posted by {{ comment.person_name }}

+
+ +

+ +

Or edit it again

+ {% endif %} + + {% if comment_form.person_name.errors %} + {{ comment_form.person_name.html_error_list }} + {% endif %} + +

{{ comment_form.person_name }}

+ + {% if comment_form.comment.errors %} + {{ comment_form.comment.html_error_list }} + {% endif %} + +

+ +
+ {{ comment_form.comment }} +

+ + + + + +

+ +

+
+{% endblock %} -- cgit v1.2.3