# HG changeset patch # User Nishanth Amuluru # Date 1294727194 -19800 # Node ID 4f0cfd486d9b873fa2b466fcdbe6e29eaf4b4ef1 # Parent 5a94c774473c31c7a0bc26e98b7131450508c9c4 approve text book is meaningful now diff -r 5a94c774473c -r 4f0cfd486d9b pytask/taskapp/views.py --- a/pytask/taskapp/views.py Tue Jan 11 11:51:12 2011 +0530 +++ b/pytask/taskapp/views.py Tue Jan 11 11:56:34 2011 +0530 @@ -335,7 +335,7 @@ "comp_textbooks": comp_textbooks, } - if user.is_authenticated() and user.get_profile().rights != "CT": + if user.is_authenticated() and user.get_profile().rights in ["DC", "MG"]: unpub_textbooks = TextBook.objects.filter(status="UP") context.update({"unpub_textbooks": unpub_textbooks}) diff -r 5a94c774473c -r 4f0cfd486d9b pytask/templates/task/view_textbook.html --- a/pytask/templates/task/view_textbook.html Tue Jan 11 11:51:12 2011 +0530 +++ b/pytask/templates/task/view_textbook.html Tue Jan 11 11:56:34 2011 +0530 @@ -25,12 +25,20 @@
{% endif %} + {% if chapters %} Chapters:
+ {% for chap in chapters %} - + + + + {% endfor %} +
{{chap.title}} {{chap.status}}
+ {% else %} + There are no chapters in this textbook as of now.
+ {% endif %} +