diff options
-rw-r--r-- | pytask/templates/index.html | 9 | ||||
-rw-r--r-- | pytask/templates/task/view.html | 2 | ||||
-rw-r--r-- | pytask/views.py | 2 |
3 files changed, 13 insertions, 0 deletions
diff --git a/pytask/templates/index.html b/pytask/templates/index.html index d094a21..8a30db1 100644 --- a/pytask/templates/index.html +++ b/pytask/templates/index.html @@ -14,6 +14,15 @@ <br /> {% endif %} + {% if unpublished_tasks %} + Tasks created by you that need approval:<ul> + {% for a_task in unpublished_tasks %} + <li><a href="/task/view/tid={{a_task.uniq_key}}">{{a_task.title}}</a></li> + {% endfor %} + </ul> + <br /> + {% endif %} + {% if reviewing_tasks %} Tasks you are reviewering:<ul> {% for a_task in reviewing_tasks %} diff --git a/pytask/templates/task/view.html b/pytask/templates/task/view.html index fd07b12..30b6de5 100644 --- a/pytask/templates/task/view.html +++ b/pytask/templates/task/view.html @@ -17,9 +17,11 @@ <a href="/task/close/tid={{task.uniq_key}}">Close task</a> {% endif %} +<!-- {% if can_delete %} <a href="/task/delete/tid={{task.uniq_key}}">Delete task</a> {% endif %} + --> <hr />created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br /> diff --git a/pytask/views.py b/pytask/views.py index ab1c745..436ebae 100644 --- a/pytask/views.py +++ b/pytask/views.py @@ -22,6 +22,7 @@ def home_page(request): claimed_tasks = user.claimed_tasks.all() selected_tasks = user.selected_tasks.all() reviewing_tasks = user.reviewing_tasks.all() + unpublished_tasks = user.created_tasks.filter(status="UP").all() can_create_task = True if profile.rights != "CT" else False context = {"user": user, @@ -29,6 +30,7 @@ def home_page(request): "claimed_tasks": claimed_tasks, "selected_tasks": selected_tasks, "reviewing_tasks": reviewing_tasks, + "unpublished_tasks": unpublished_tasks, "can_create_task": can_create_task } |