1 {% extends 'base.html' %} |
|
2 {% block title %} |
|
3 {{task.title}} |
|
4 {% endblock %} |
|
5 {% block content %} |
|
6 <h3>{{ task.title }}</h3> |
|
7 |
|
8 {% if can_edit %} |
|
9 <a href="/task/edit/tid={{task.id}}">Edit task</a> |
|
10 {% endif %} |
|
11 |
|
12 {% if can_publish %} |
|
13 <a href="/task/publish/tid={{task.id}}">Publish task</a> |
|
14 {% endif %} |
|
15 |
|
16 {% if can_close %} |
|
17 <a href="/task/close/tid={{task.id}}">Close this task</a> |
|
18 {% endif %} |
|
19 |
|
20 {% if can_delete %} |
|
21 <a href="/task/delete/tid={{task.id}}">Delete task</a> |
|
22 {% endif %} |
|
23 |
|
24 <hr />created by <a href="/user/view/uid={{ task.created_by.id }}">{{ task.created_by.username }}</a> |
|
25 on {{task.creation_datetime|date:"D d M Y"}} at {{task.creation_datetime|time:"H:i"}}<br /> |
|
26 |
|
27 {% ifequal task.status "UP" %} |
|
28 Task can be viewed by: |
|
29 {% else %} |
|
30 Mentors: |
|
31 {% endifequal %} |
|
32 |
|
33 {% for mentor in mentors %} |
|
34 <a href="/user/view/uid={{mentor.id}}">{{mentor.username}}</a> |
|
35 {% endfor %} |
|
36 |
|
37 {% if can_mod_mentors %} |
|
38 <a href="/task/addmentor/tid={{task.id}}"> |
|
39 {% ifequal task.status "UP" %} |
|
40 Request others to view/edit the task |
|
41 {% else %} |
|
42 Add another Mentor to this task |
|
43 {% endifequal %}</a> |
|
44 {% endif %} |
|
45 <br /> |
|
46 |
|
47 <hr /> |
|
48 <b>Description:</b><br /> |
|
49 {{ task.desc|linebreaksbr }} |
|
50 <br /><br /><hr /> |
|
51 {% if task.tags.count %} |
|
52 Tags: |
|
53 {% for tag in task.tags %} |
|
54 {{tag}} |
|
55 {% endfor %} |
|
56 <hr /> |
|
57 {% endif %} |
|
58 |
|
59 {% if deps %} |
|
60 |
|
61 <br />The task has following dependencies.<ul> |
|
62 {% for dep in deps %} |
|
63 <li><a href="/task/view/tid={{dep.id}}">{{dep.title}}</a></li> |
|
64 {% endfor %} |
|
65 </ul> |
|
66 |
|
67 {% if can_mod_tasks %} |
|
68 <a href="/task/addtask/tid={{task.id}}">add more dependencies</a> |
|
69 <a href="/task/remtask/tid={{task.id}}">remove an existing dependency</a> |
|
70 {% endif %} |
|
71 |
|
72 {% else %} |
|
73 |
|
74 {% if subs %} |
|
75 The task has following sub tasks.<ul> |
|
76 {% for sub in subs %} |
|
77 <li><a href="/task/view/tid={{sub.id}}">{{sub.title}}</a></li> |
|
78 {% endfor %} |
|
79 </ul> |
|
80 |
|
81 {% if can_mod_tasks %} |
|
82 <a href="/task/addtask/tid={{task.id}}">add more subtasks</a> |
|
83 <a href="/task/remtask/tid={{task.id}}">remove an existing subtask</a> |
|
84 {% endif %} |
|
85 |
|
86 {% else %} |
|
87 |
|
88 {% if can_mod_tasks %} |
|
89 <a href="/task/addtask/tid={{task.id}}">add a subtask/dependency </a> |
|
90 {% endif %} |
|
91 |
|
92 {% endif %} |
|
93 {% endif %} |
|
94 |
|
95 {% ifequal task.status "CD" %} |
|
96 Task has been closed by <a href="/user/view={{closing_notification.sent_from.id}}">{{closing_notification.sent_from.username}}</a> |
|
97 on {{closing_notification.sent_date|date:"D d M Y"}} at {{closing_notification.sent_date|time:"H:i"}}<br /> |
|
98 <b>Reason: </b>{{closing_notification.remarks}}<br /> |
|
99 {% endifequal %} |
|
100 |
|
101 {% ifequal task.status "CM" %} |
|
102 Task has been marked complete by <a href="/user/view={{completed_notification.sent_from.id}}"> |
|
103 {{completed_notification.sent_from.username}}</a> |
|
104 on {{completed_notification.sent_date|date:"D d M Y"}} at {{completed_notification.sent_date|time:"H:i"}}<br /> |
|
105 {% endifequal %} |
|
106 |
|
107 {% ifequal task.status "OP" %} |
|
108 <br />There are no users working on this task.<br /> |
|
109 {% endifequal %} |
|
110 |
|
111 {% if subs %} |
|
112 <br />This task cannot be claimed.. It exists only to show all of its sub tasks in one place.<br /> |
|
113 {% endif %} |
|
114 |
|
115 {% if assigned_users %} |
|
116 Users working on this task: |
|
117 {% for user in assigned_users %} |
|
118 <a href="/user/view/uid={{user.id}}">{{user.username}}</a> |
|
119 {% endfor %} |
|
120 {% if is_mentor %} |
|
121 <a href="/task/remuser/tid={{task.id}}">Remove an existing user</a> |
|
122 {% endif %} |
|
123 <br /> |
|
124 {% endif %} |
|
125 |
|
126 {% if can_assign_credits %} |
|
127 <a href="/task/assigncredits/tid={{task.id}}">View/Assign credits</a> |
|
128 {% endif %} |
|
129 |
|
130 {% if task_claimable %} |
|
131 <a href="/task/claim/tid={{task.id}}"> |
|
132 {% if is_mentor %} |
|
133 View claims |
|
134 {% else %} |
|
135 Claim the task |
|
136 {% endif %}</a> |
|
137 {% endif %} |
|
138 |
|
139 {% if comments %} |
|
140 <hr /> |
|
141 comments:<br /><br /> |
|
142 {% for comment in comments %} |
|
143 <a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> |
|
144 on {{ comment.creation_datetime|date:"D d M Y"}} at {{comment.creation_datetime|time:"H:i"}} wrote:<br /> |
|
145 {{ comment.data|linebreaksbr }}<br /><br /> |
|
146 {% endfor %} |
|
147 {% endif %} |
|
148 |
|
149 {% if not is_guest %} |
|
150 <hr /> |
|
151 {% if error_msg %} |
|
152 {{error_msg}}<br /> |
|
153 {% endif %} |
|
154 {% ifnotequal task.status "UP" %} |
|
155 Add comment:<br /> |
|
156 <form action="" method="post"> |
|
157 <!-- we might even want to use forms here --> |
|
158 <textarea name="data"></textarea><br /> |
|
159 <input type="submit" value="Submit"> |
|
160 </form> |
|
161 {% else %} |
|
162 {% if is_mentor %} |
|
163 Add comment:<br /> |
|
164 <form action="" method="post"> |
|
165 <!-- we might even want to use forms here --> |
|
166 <textarea name="data"></textarea><br /> |
|
167 <input type="submit" value="Submit"> |
|
168 </form> |
|
169 {% endif %} |
|
170 {% endifnotequal %} |
|
171 {% endif %} |
|
172 {% endblock %} |
|