diff options
-rwxr-xr-x | pytask/taskapp/views.py | 1 | ||||
-rw-r--r-- | pytask/templates/index.html | 14 | ||||
-rw-r--r-- | pytask/templates/task/view.html | 11 |
3 files changed, 7 insertions, 19 deletions
diff --git a/pytask/taskapp/views.py b/pytask/taskapp/views.py index f26fd69..1c6e41a 100755 --- a/pytask/taskapp/views.py +++ b/pytask/taskapp/views.py @@ -103,6 +103,7 @@ def view_task(request, tid): is_creator = True if user == task.created_by else False has_claimed = True if user in claimed_users else False + context['selected_users'] = selected_users context['is_selected'] = True if user in selected_users else False context['can_approve'] = True if task.status == "UP" and\ profile.rights in ["MG", "DC"]\ diff --git a/pytask/templates/index.html b/pytask/templates/index.html index 43a599d..d094a21 100644 --- a/pytask/templates/index.html +++ b/pytask/templates/index.html @@ -14,19 +14,9 @@ <br /> {% endif %} - - {% if unpublished_tasks %} - Unpublished tasks viewable by you:<ul> - {% for a_task in unpublished_tasks %} - <li><a href="/task/view/tid={{a_task.id}}">{{a_task.title}}</a></li> - {% endfor %} - </ul> - <br /> - {% endif %} - - {% if reviewered_tasks %} + {% if reviewing_tasks %} Tasks you are reviewering:<ul> - {% for a_task in reviewered_tasks %} + {% for a_task in reviewing_tasks %} <li><a href="/task/view/tid={{a_task.uniq_key}}">{{a_task.title}}</a></li> {% endfor %} </ul> diff --git a/pytask/templates/task/view.html b/pytask/templates/task/view.html index d341d63..551594d 100644 --- a/pytask/templates/task/view.html +++ b/pytask/templates/task/view.html @@ -21,7 +21,7 @@ <a href="/task/delete/tid={{task.uniq_key}}">Delete task</a> {% endif %} - <hr />created by <a href="/user/view/uid={{ task.created_by.uniq_key }}">{{ task.created_by.username }}</a> + <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 /> {% if reviewers %} @@ -84,12 +84,9 @@ {% if selected_users %} Users working on this task: - {% for user in assigned_users %} + {% for user in selected_users %} <a href="/user/view/uid={{user.id}}">{{user.username}}</a> {% endfor %} - {% if is_reviewer %} - <a href="/task/remuser/tid={{task.uniq_key}}">Remove an existing user</a> - {% endif %} <br /> {% endif %} @@ -101,7 +98,6 @@ <a href="/task/assignpynts/tid={{task.uniq_key}}">Request assign pynts and mark the task as complete</a> {% endif %} - {% if is_selected %} <a href="/task/report/tid={{task.uniq_key}}">Submit Work</a> {% endif %} @@ -112,9 +108,10 @@ {% for comment in comments %} <a href="/user/view/uid={{comment.commented_by.uniq_key}}">{{ comment.commented_by.username }}</a> on {{ comment.comment_datetime|date:"D d M Y"}} at {{comment.comment_datetime|time:"H:i"}} wrote:<br /> - {{ comment.data|linebreaksbr }}<br /><br /> + {{ comment.data|linebreaksbr }}<br /> {% endfor %} {% endif %} + <hr /> {% if can_comment %} Add comment:<br /> |