diff options
author | Madhusudan.C.S | 2011-06-10 16:39:34 +0530 |
---|---|---|
committer | Madhusudan.C.S | 2011-06-10 16:39:34 +0530 |
commit | 7c767ae45d1ac9ee78d3e8e40c766e8a9c5d4867 (patch) | |
tree | 579a2be8a8b14c77904ea2f48c1fa6fa14d17932 | |
parent | b2732dbb8e697efd28aaee30634a83e6235305d1 (diff) | |
download | pytask-7c767ae45d1ac9ee78d3e8e40c766e8a9c5d4867.tar.gz pytask-7c767ae45d1ac9ee78d3e8e40c766e8a9c5d4867.tar.bz2 pytask-7c767ae45d1ac9ee78d3e8e40c766e8a9c5d4867.zip |
For the textbook modules use the right URL patterns while displaying the list of tasks on tag view.
-rw-r--r-- | pytask/templates/templatetags/_as_browse_textbooks.html | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pytask/templates/templatetags/_as_browse_textbooks.html b/pytask/templates/templatetags/_as_browse_textbooks.html index 3959d55..759e896 100644 --- a/pytask/templates/templatetags/_as_browse_textbooks.html +++ b/pytask/templates/templatetags/_as_browse_textbooks.html @@ -23,7 +23,11 @@ along with PyTask. If not, see <http://www.gnu.org/licenses/>. <ul> {% for task in tasks %} <li> - <a href="{% url view_textbook task.id %}"> + {% if task.parent %} + <a href="{% url view_chapter task.parent.id task.id %}"> + {% else %} + <a href="{% url view_textbook task.id %}"> + {% endif %} {{ task.title }} </a> </li> |