pytask/templates/task/view.html
changeset 417 b37e541bf950
parent 382 daca865314e7
child 431 fcc87a3f0311
--- a/pytask/templates/task/view.html	Sat Jan 15 21:21:19 2011 +0530
+++ b/pytask/templates/task/view.html	Sat Jan 15 21:21:49 2011 +0530
@@ -6,36 +6,29 @@
     <h3>{{ task.title }}</h3>
 
     {% if can_edit %}
-        <a href="/task/edit/tid={{task.uniq_key}}">Edit task</a>
+        <a href="{% url edit_task task.id %}">Edit task</a>
     {% endif %}
-    
+
     {% if can_approve %}
-        <a href="/task/approve/tid={{task.uniq_key}}">Approve task</a>
+        <a href="{% url approve_task task.id %}">Approve task</a>
     {% endif %}
-    
+
     {% if can_close %}
-        <a href="/task/close/tid={{task.uniq_key}}">Close task</a>
+        <a href="{% url close_task task.id %}">Close task</a>
     {% endif %}
-    
-<!--
-    {% if can_delete %}
-        <a href="/task/delete/tid={{task.uniq_key}}">Delete task</a>
-    {% endif %}
-    -->
 
-    <hr />created by <a href="/profile/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a>
+    <hr />created by <a href="{% url view_user_profile 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 %}
-		Reviewers:
+    Reviewers:
 	    {% for reviewer in reviewers %}
-		<a href="/profile/user/view/uid={{reviewer.id}}">{{reviewer.username}}</a>
+		<a href="{% url view_user_profile reviewer.id %}">{{reviewer.username}}</a>
 	    {% endfor %}
     {% endif %}
 
-    
     {% if can_mod_reviewers %}
-        <a href="/task/addreviewer/tid={{task.uniq_key}}">
+        <a href="{% url addreviewer_task task.id %}">
 		Add a Reviewer to this task</a>
     {% endif %}
     <br />
@@ -52,48 +45,25 @@
         <hr />
     {% endif %}
 
-    
-    <!--
-    {% ifequal task.status "CD" %}
-        Task has been closed by <a href="/profile/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a>
-        on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br />
-        <b>Reason: </b>{{closing_notification.remarks}}<br />
-    {% endifequal %}
-    
-    {% ifequal task.status "CM" %}
-        Task has been marked complete by <a href="/profile/user/view={{completed_notification.sent_from.id}}">
-        {{completed_notification.sent_from.username}}</a>
-        on {{completed_notification.sent_date|date:"D d M Y"}} at {{completed_notification.sent_date|time:"H:i"}}<br />
-    {% endifequal %}
-        
-    {% ifequal task.status "OP" %}
-        <br />There are no users working on this task.<br />
-    {% endifequal %}
-    
-    {% if subs %}
-        <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br />
-    {% endif %}
-    -->
-        
     {% if selected_users %}
         Users working on this task:
         {% for user in selected_users %}
-            <a href="/profile/user/view/uid={{user.id}}">{{user.username}}</a>
+            <a href="{% url view_profile user.id %}">{{user.username}}</a>
         {% endfor %}
         <br />
     {% endif %}
     
     {% if task_claimable %}
-	<a href="/task/claim/tid={{task.uniq_key}}">View claims</a>
+  <a href="{% url claim_task task.id %}">View claims</a>
     {% endif %}
 
-    <a href="/task/view/work/tid={{task.uniq_key}}">View submitted work reports</a>
-    
+    <a href="{% url view_work task.id %}">View submitted work reports</a>
+
         <hr />
     {% if comments %}
         comments:<br /><br />
         {% for comment in comments %}
-            <a href="/profile/user/view/uid={{comment.commented_by.id}}">{{ comment.commented_by.username }}</a> 
+            <a href="{% url view_profile comment.commented_by.id %}">{{ 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 />
         {% endfor %}