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