diff options
-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> |