blob: 1b25927ef977d0ec2fce657013a0b722670bd896 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
{% extends 'base.html' %}
{% block title %}
{{task.title}}
{% endblock %}
{% block content %}
{% if task_viewable %}
<h3>{{ task.title }}</h3><br />
<!-- we have to write our own datetime.strftime filter and use in the next line -->
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 is_mentor %}
{% ifequal task.status "UP" %}
<a href="/task/edit/tid={{task.id}}">Edit task</a>
{% else %}
<a href="/task/close/tid={{task.id}}">Close this task</a>
{% endifequal %}
{% if can_publish %}
<a href="/task/publish/tid={{task.id}}">Publish task</a>
{% endif %}
<br />
{% endif %}
{% ifequal task.status "UP" %}
Task can be viewed by:
{% else %}
Mentors:
{% endifequal %}
{% for mentor in mentors %}
<a href="/user/view/uid={{mentor.id}}">{{mentor.username}}|</a>
{% endfor %}
{% if can_mod_mentors %}
<a href="/task/addmentor/tid={{task.id}}">
{% ifequal task.status "UP" %}
Request others to view/edit the task
{% else %}
Add another Mentor to this task
{% endifequal %}</a><br />
{% endif %}
{% if deps %}
<br />The task has following dependencies.<br />
{% for dep in deps %}
<a href="/task/view/tid={{dep.id}}">{{dep.title}}</a><br />
{% endfor %}
{% if can_mod_tasks %}
<a href="/task/addtask/tid={{task.id}}">add more dependencies</a>
<a href="/task/remtask/tid={{task.id}}">remove an existing dependency</a>
{% endif %}
{% else %}
{% if subs %}
<br />The task has following sub tasks.<br />
{% for sub in subs %}
<a href="/task/view/tid={{sub.id}}">{{sub.title}}</a><br />
{% endfor %}
{% if can_mod_tasks %}
<a href="/task/addtask/tid={{task.id}}">add more subtasks</a>
<a href="/task/remtask/tid={{task.id}}">remove an existing subtask</a>
{% endif %}
{% else %}
{% if can_mod_tasks %}
<a href="/task/addtask/tid={{task.id}}">add a subtask/dependency </a>
{% endif %}
{% endif %}
{% endif %}
<hr>
<br />Description:<br />
<br />{{ task.desc }}<br />
<hr>
{% ifnotequal task.status "CM" %}
{% if assigned_users %}
Users working on this task:
{% for user in assigned_users %}
<a href="/user/view/uid={{user.id}}">{{user.username}}</a>|
{% endfor %}
{% if is_mentor %}
<a href="/task/remuser/tid={{task.id}}">Remove an existing user</a>
<br />
{% endif %}
{% else %}
There are no users currently working on this task.<br />
{% endif %}
{% if can_assign_credits %}
<a href="/task/assigncredits/tid={{task.id}}">View/Assign credits</a>
{% endif %}
{% if not is_guest and task_claimable %}
<a href="/task/claim/tid={{task.id}}">View claims</a><br />
{% endif %}
{% else %}
{% ifequal task.status "CD" %}
The task has been closed by .. due to ..
{% else %}
The task is complete.
{% endifequal %}
{% endifnotequal %}
{% if comments %}
<hr />
<br/>comments:<br />
{% for comment in comments %}
<br /><a href="/user/view/uid={{comment.created_by.id}}">{{ comment.created_by.username }}</a> at {{ comment.creation_datetime.ctime }} wrote:<br />
{{ comment.data }}<br />
{% endfor %}
{% endif %}
{% if not is_guest %}
{% ifnotequal task.status "CM" %}
<br />Add comment:<br />
<form action="" method="post">
<!-- we might even want to use forms here -->
<textarea name="data"></textarea><br />
<input type="submit" value="Submit">
</form>
{% endifnotequal %}
{% endif %}
{% else %}
You are not authorised to view this task. <a href="/task/browse/">click here</a> to return to browsing the tasks.
{% endif %}
{% endblock %}
|