now the creator can select users
authorNishanth Amuluru <nishanth@fossee.in>
Sun, 09 Jan 2011 11:29:10 +0530
changeset 119 ec7f2f4256f5
parent 118 f88135529c74
child 120 da71bdf58be7
now the creator can select users
pytask/taskapp/views.py
pytask/templates/task/claim.html
--- a/pytask/taskapp/views.py	Sun Jan 09 11:25:08 2011 +0530
+++ b/pytask/taskapp/views.py	Sun Jan 09 11:29:10 2011 +0530
@@ -167,7 +167,8 @@
 
     task_claimable = True if task.status in ["OP", "WR"] else False
     can_claim = True if task_claimable and ( not has_claimed )\
-                        and ( not is_reviewer ) else False
+                        and ( not is_reviewer ) and (not is_creator ) \
+                        else False
 
     old_claims = task.claims.all()
 
--- a/pytask/templates/task/claim.html	Sun Jan 09 11:25:08 2011 +0530
+++ b/pytask/templates/task/claim.html	Sun Jan 09 11:29:10 2011 +0530
@@ -21,8 +21,9 @@
             The task cannot be claimed at this stage.<br />
         {% endif %}
     {% endif %}
-    {% if task_claimed and is_creator %}
-        <a href="/task/select/tid={{task.id}}">Select a user to assign the work.</a>
+    {% if old_claims and is_creator %}
+    <hr />
+        <a href="/task/select/tid={{task.id}}">Select a user to assign the work</a>
     {% endif %}
 
     {% if can_claim %}