1f1943eb
qijun
initial commit
|
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
134
|
{% extends "base.html" %}
{% block content %}
{{ super() }}
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="jumbotron">
<table id="datable" class="table table-striped table-bordered dt-head-right"
cellspacing="0"
width="100%">
{# <thead>#}
{# <tr>#}
{# <th><strong>INFO</strong></th>#}
{# <th><strong>VALUE</strong></th>#}
{# </tr>#}
{# </thead>#}
<tbody>
<tr>
<td align="center"><strong>Task Name</strong>
</td>
<td align="center" class="text-info">
<strong><em>{{ task.name }}</em></strong>
</tr>
<tr>
<td align="center"><strong>Pub Date</strong></td>
<td align="center">{{ task.pubdate }}</td>
</tr>
<tr>
<td align="center"><strong>Due Date</strong></td>
<td align="center">{{ task.duedate }}</td>
</tr>
<tr>
<td align="center"><strong>Description</strong></td>
<td align="center">{{ task.description }}</td>
</tr>
<tr>
<td align="center"><strong>Attached File</strong></td>
<td align="center">{% if task.attachfile != None %}
<a href="{{ url_for('download', filename=task.attachfile) }}"
target="_blank">{{ task.attachfile }}</a>{% endif %}</td>
</tr>
<tr>
<td align="center"><strong>Priority</strong></td>
{% if task.priority ==0 %}
<td align="center"
class="text-success">
{{ task.priority }} ({{ task.enum_priority[task.priority] }})
</td>
{% elif task.priority ==1 %}
<td align="center"
class="text-primary">
{{ task.priority }} ({{ task.enum_priority[task.priority] }})
</td>
{% elif task.priority ==2 %}
<td align="center"
class="text-warning">
{{ task.priority }} ({{ task.enum_priority[task.priority] }})
</td>
{% elif task.priority ==3 %}
<td align="center"
class="text-danger">
{{ task.priority }} ({{ task.enum_priority[task.priority] }})
</td>
{% endif %}
</tr>
<tr>
<td align="center"><strong>Status</strong></td>
{% if task.status ==0 %}
<td align="center"
class="text-info">
{{ task.status }} ({{ task.enum_status[task.status] }})
</td>
{% elif task.status ==1 %}
<td align="center"
class="text-muted">
{{ task.status }} ({{ task.enum_status[task.status] }})
</td>
{% elif task.status ==-1 %}
<td align="center" class="text-warning">
{{ task.status }} ({{ task.enum_status[task.status] }})
</td>
{% endif %}
</tr>
<tr>
<td align="center"><strong>Workers</strong></td>
<td align="center">
{% for user in users %}
<span class="label colored">{{ user.username }}</span>
{% endfor %}
</td>
</tr>
</tbody>
</table>
<div class="form-actions">
{% if current_user in users %}
<button type="button" class="btn btn-danger"
onclick="location.href='{{ url_for('untake',task_id=task.id) }}'">
Detach
</button>
{% else %}
<button type="button" class="btn btn-primary"
onclick="location.href='{{ url_for('take',task_id=task.id) }}'">
Take
</button>
{% endif %}
{% if current_user.is_authenticated() and current_user.username == 'admin' %}
<button type="button" class="btn btn-warning"
onclick="location.href='{{ url_for('edit',task_id=task.id) }}'">
Edit
</button>
{% endif %}
<button type="button" class="btn"
onclick="location.href='{{ request.path }}'">
Cancel
</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
|