--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/pytask/templates/task/view_textbook.html Tue Jan 11 00:00:48 2011 +0530
@@ -0,0 +1,57 @@
+{% extends 'base.html' %}
+{% block title %}
+ {{textbook.name}}
+{% endblock %}
+{% block content %}
+ <h3>{{ textbook.name }}</h3>
+
+ {% if can_edit %}
+ <a href="/task/textbook/edit/tid={{textbook.uniq_key}}">Edit Text book</a>
+ {% endif %}
+
+ {% if can_approve %}
+ <a href="/task/textbook/approve/tid={{textbook.uniq_key}}">Approve Text book</a>
+ {% endif %}
+
+ <hr />created by <a href="/user/view/uid={{ textbook.created_by.id }}">{{ textbook.created_by.username }}</a>
+ on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}<br />
+ <hr />
+
+ {% if textbook.tags.count %}
+ Tags:
+ {% for tag in textbook.tags %}
+ {{tag}}
+ {% endfor %}
+ <hr />
+ {% endif %}
+
+ Chapters: <br />
+ {% for chap in chapters %}
+ <ul>
+ <li><a href="/task/view/tid={{chap.uniq_key}}">{{chap.title}}</a> </li>
+ </ul>
+ {% endfor %}
+
+
+
+ <hr />
+ {% if comments %}
+ comments:<br /><br />
+ {% for comment in comments %}
+ <a href="/user/view/uid={{comment.commented_by.id}}">{{ comment.commented_by.username }}</a>
+ on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
+ {{ comment.data|linebreaksbr }}<br />
+ {% endfor %}
+ {% endif %}
+ <hr />
+
+ {% if can_comment %}
+ Add comment:<br />
+ <form action="" method="post">
+ {% csrf_token %}
+ {{form.as_p}}
+ <input type="submit" value="Submit">
+ </form>
+ {% endif %}
+
+{% endblock %}