author | Madhusudan.C.S <madhusudancs@gmail.com> |
Sun, 16 Jan 2011 23:17:13 +0530 | |
changeset 431 | fcc87a3f0311 |
parent 417 | b37e541bf950 |
child 435 | 1217d808d70f |
permissions | -rw-r--r-- |
431
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
417
diff
changeset
|
1 |
{% extends "base.html" %} |
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
417
diff
changeset
|
2 |
|
370 | 3 |
{% block title %} |
4 |
{{textbook.name}} |
|
5 |
{% endblock %} |
|
431
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
417
diff
changeset
|
6 |
|
370 | 7 |
{% block content %} |
8 |
<h3>{{ textbook.name }}</h3> |
|
9 |
||
10 |
{% if can_edit %} |
|
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
11 |
<a href="{% url edit_textbook textbook.id %}">Edit Text book</a> |
370 | 12 |
{% endif %} |
13 |
||
14 |
{% if can_approve %} |
|
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
15 |
<a href="{% url approve_textbook textbook.id %}">Approve Text book</a> |
370 | 16 |
{% endif %} |
17 |
||
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
18 |
<hr />created by <a href="{% url view_textbook textbook.created_by.id %}">{{ textbook.created_by.username }}</a> |
370 | 19 |
on {{textbook.creation_datetime|date:"D d M Y"}} at {{textbook.creation_datetime|time:"H:i"}}<br /> |
20 |
<hr /> |
|
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
21 |
|
370 | 22 |
{% if textbook.tags.count %} |
23 |
Tags: |
|
24 |
{% for tag in textbook.tags %} |
|
25 |
{{tag}} |
|
26 |
{% endfor %} |
|
27 |
<hr /> |
|
28 |
{% endif %} |
|
29 |
||
377
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
30 |
{% if chapters %} |
370 | 31 |
Chapters: <br /> |
377
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
32 |
<table> |
370 | 33 |
{% for chap in chapters %} |
377
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
34 |
<tr> |
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
35 |
<td><a href="{% url view_task chap.id %}">{{chap.title}}</a> </td> |
377
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
36 |
<td> {{chap.status}} </td> |
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
37 |
</tr> |
370 | 38 |
{% endfor %} |
377
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
39 |
</table> |
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
40 |
{% else %} |
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
41 |
There are no chapters in this textbook as of now.<br /> |
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
42 |
{% endif %} |
4f0cfd486d9b
approve text book is meaningful now
Nishanth Amuluru <nishanth@fossee.in>
parents:
370
diff
changeset
|
43 |
|
370 | 44 |
<hr /> |
45 |
{% if comments %} |
|
46 |
comments:<br /><br /> |
|
47 |
{% for comment in comments %} |
|
417
b37e541bf950
Manipulate all the templates to use {% url %} templatetag instead of hard coded URLs.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
379
diff
changeset
|
48 |
<a href="{% url view_profile comment.commented_by.id %}">{{ comment.commented_by.username }}</a> |
370 | 49 |
on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br /> |
50 |
{{ comment.data|linebreaksbr }}<br /> |
|
51 |
{% endfor %} |
|
52 |
{% endif %} |
|
53 |
<hr /> |
|
54 |
||
55 |
{% if can_comment %} |
|
431
fcc87a3f0311
Huh, please don't tell me I will have to refactor so much code again.
Madhusudan.C.S <madhusudancs@gmail.com>
parents:
417
diff
changeset
|
56 |
{% as_div_form form "Comment Form" csrf_token "Submit" %} |
370 | 57 |
{% endif %} |
58 |
||
59 |
{% endblock %} |