From 5fa6de089dce1c45a095c286dbd890fea30e9c94 Mon Sep 17 00:00:00 2001 From: Jayaram R Pai Date: Tue, 8 Jul 2014 00:11:52 +0530 Subject: added base template for comments --- comments/templates/comments/comment_base.html | 227 ++++++++++++++++++++++++-- comments/templates/comments/get_comments.html | 72 ++++---- comments/templates/comments/new_comment.html | 1 + comments/templates/comments/new_reply.html | 17 ++ 4 files changed, 273 insertions(+), 44 deletions(-) (limited to 'comments/templates') diff --git a/comments/templates/comments/comment_base.html b/comments/templates/comments/comment_base.html index c3a2a7b..bcf8437 100644 --- a/comments/templates/comments/comment_base.html +++ b/comments/templates/comments/comment_base.html @@ -1,17 +1,224 @@ -{% load static %} +{% load static %} - - - - - + + + {% block title %} + Python Textbook Companion Project | FOSSEE, IIT Bombay + {% endblock %} + + {% block meta %} + + + + + {% endblock %} + + + + + + + {% block css %} + + {% endblock %} + + {% block script %} + {% endblock %} + + -
- {% block content %} - {% endblock %} + +
+ {% block content %} + {% if up %} +
+
+ × +

Book has been uploaded successfully !

+
+
+
+ {% endif %} + {% if login %} +
+
+ × +

Login Successful !

+
+
+
+ {% endif %} + {% if logout %} +
+
+ × +

You have logged out successfully !

+
+
+
+ {% endif %} + {% if update_book %} +
+
+ × +

Book has been updated successfully !

+
+
+
+ {% endif %} + {% if not_found %} +
+
+ × +

It seems that currently there is no book that you can update ! Please submit one.

+
+
+
+ {% endif %} +
+

Recent Submissions

+ {% for item in items %} + + {% endfor %} +
+
+
+ Browse All Books +
+
+ + {% endblock %} +
+
+ +
+

© FOSSEE - IIT Bombay 2013

+
+
+ +
+ - + + + + + + diff --git a/comments/templates/comments/get_comments.html b/comments/templates/comments/get_comments.html index 571f815..5dcc84a 100644 --- a/comments/templates/comments/get_comments.html +++ b/comments/templates/comments/get_comments.html @@ -1,45 +1,49 @@ {% extends 'comments/comment_base.html' %} {% block content %} -{% if comments %} +
+ {% if comments %}
Recent comments
+

+ New comment
-
- {% for comment in comments %} -
- -
-
-
- {{ comment.body }} -
-
- {% if comment.reply_set.all %} -
Recent replies
- {% endif %} - {% for reply in comment.reply_set.all %} -
-

{{ reply.body }}

+

Showing comments for: Book: {{ book }} / Chapter: {{ chapter }} / Example: {{ example }}

+
+ {% for comment in comments %} +
+ +
+
+
+ {{ comment.body }} +
+
+ {% if comment.reply_set.all %} +
Recent replies
+ {% endif %} + {% for reply in comment.reply_set.all %} +
+

{{ reply.body }}

+
+ {% endfor %} + + Reply +
+
+
+
{% endfor %} - + Reply -
-
-
-
- {% endfor %} -
-{% else %} -
-

No comments for this example...

- Create a new comment -
-{% endif %} +
+ {% else %} +
+

No comments for this example...

+ Create a new comment +
+ {% endif %} +
{% endblock %} diff --git a/comments/templates/comments/new_comment.html b/comments/templates/comments/new_comment.html index fa0c333..d16aa15 100644 --- a/comments/templates/comments/new_comment.html +++ b/comments/templates/comments/new_comment.html @@ -2,6 +2,7 @@ {% block content %}
New comment form
+

Book: {{ book }} / Chapter: {{ chapter }} / Example: {{ example }} / Page: {{ page }}

{% csrf_token %} {{ form.errors }} {{ form.book }} diff --git a/comments/templates/comments/new_reply.html b/comments/templates/comments/new_reply.html index 71532c8..eac5a06 100644 --- a/comments/templates/comments/new_reply.html +++ b/comments/templates/comments/new_reply.html @@ -1,10 +1,27 @@ {% extends 'comments/comment_base.html' %} {% block content %}
+ Comment:

+
+
+ {{ comment.body }} +
+
+ {% if comment.reply_set.all %} +
Recent replies
+ {% endif %} + {% for reply in comment.reply_set.all %} +
+

{{ reply.body }}

+
+ {% endfor %} +
+
New reply form
{% csrf_token %} {{ form.errors }} {{ form.comment_id }} + {{ form.body }}
Cancel -- cgit