| author | Nishanth Amuluru <nishanth@fossee.in> |
| Tue, 11 Jan 2011 11:56:34 +0530 | |
| changeset 139 | 4f0cfd486d9b |
| parent 132 | 1be4a3c09a47 |
| child 141 | ed2dadfc829a |
| permissions | -rw-r--r-- |
| 132 | 1 |
{% extends 'base.html' %}
|
2 |
{% block title %}
|
|
3 |
{{textbook.name}}
|
|
4 |
{% endblock %}
|
|
5 |
{% block content %}
|
|
6 |
<h3>{{ textbook.name }}</h3>
|
|
7 |
||
8 |
{% if can_edit %}
|
|
9 |
<a href="/task/textbook/edit/tid={{textbook.uniq_key}}">Edit Text book</a>
|
|
10 |
{% endif %}
|
|
11 |
||
12 |
{% if can_approve %}
|
|
13 |
<a href="/task/textbook/approve/tid={{textbook.uniq_key}}">Approve Text book</a>
|
|
14 |
{% endif %}
|
|
15 |
||
16 |
<hr />created by <a href="/user/view/uid={{ textbook.created_by.id }}">{{ textbook.created_by.username }}</a>
|
|
17 |
on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}<br />
|
|
18 |
<hr /> |
|
19 |
||
20 |
{% if textbook.tags.count %}
|
|
21 |
Tags: |
|
22 |
{% for tag in textbook.tags %}
|
|
23 |
{{tag}}
|
|
24 |
{% endfor %}
|
|
25 |
<hr /> |
|
26 |
{% endif %}
|
|
27 |
||
|
139
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
28 |
{% if chapters %}
|
| 132 | 29 |
Chapters: <br /> |
|
139
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
30 |
<table> |
| 132 | 31 |
{% for chap in chapters %}
|
|
139
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
32 |
<tr> |
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
33 |
<td><a href="/task/view/tid={{chap.uniq_key}}">{{chap.title}}</a> </td>
|
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
34 |
<td> {{chap.status}} </td>
|
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
35 |
</tr> |
| 132 | 36 |
{% endfor %}
|
|
139
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
37 |
</table> |
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
38 |
{% else %}
|
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
39 |
There are no chapters in this textbook as of now.<br /> |
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
40 |
{% endif %}
|
|
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
132
diff
changeset
|
41 |
|
| 132 | 42 |
|
43 |
||
44 |
||
45 |
<hr /> |
|
46 |
{% if comments %}
|
|
47 |
comments:<br /><br /> |
|
48 |
{% for comment in comments %}
|
|
49 |
<a href="/user/view/uid={{comment.commented_by.id}}">{{ comment.commented_by.username }}</a>
|
|
50 |
on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br />
|
|
51 |
{{ comment.data|linebreaksbr }}<br />
|
|
52 |
{% endfor %}
|
|
53 |
{% endif %}
|
|
54 |
<hr /> |
|
55 |
||
56 |
{% if can_comment %}
|
|
57 |
Add comment:<br /> |
|
58 |
<form action="" method="post"> |
|
59 |
{% csrf_token %}
|
|
60 |
{{form.as_p}}
|
|
61 |
<input type="submit" value="Submit"> |
|
62 |
</form> |
|
63 |
{% endif %}
|
|
64 |
||
65 |
{% endblock %}
|