Skip to content

Commit 9307614

Browse files
committed
Add Assignee to Kanban cards
1 parent 55fd91f commit 9307614

File tree

1 file changed

+88
-62
lines changed

1 file changed

+88
-62
lines changed

tickets/templates/kanban.html

Lines changed: 88 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
<!-- 'New' Column -->
2222
<div class="col-md-4 kanban-col">
2323
<div class="jumbotron kanban-new">
24-
<h5 class="text-center bg-info-light"><i class="material-icons-outlined align-bottom">local_activity</i> New
25-
({{ new_tickets|length }})</h5>
24+
<h5 class="text-center bg-info-light"><i class="material-icons-outlined align-bottom">local_activity</i>
25+
New ({{ new_tickets|length }})
26+
</h5>
2627
{% for ticket in new_tickets %}
2728
<div class="card">
2829
<div class="card-body">
@@ -31,18 +32,9 @@ <h6 class="card-title">
3132
title="{{ ticket.description }}">{{ ticket.summary }}
3233
</a>
3334

34-
<!-- Priority Badge -->
35-
<span class="text-muted">
36-
<span class="badge
37-
{% if ticket.priority == 'Low' %}
38-
badge-success
39-
{% elif ticket.priority == 'Medium' %}
40-
badge-warning
41-
{% elif ticket.priority == 'High' %}
42-
badge-danger
43-
{% endif %}
44-
float-right">{{ ticket.priority }}
45-
</span>
35+
<!-- Assigned To -->
36+
<span class="float-right text-muted" data-toggle="tooltip" title="Assignee">
37+
{{ ticket.assigned_to }}
4638
</span>
4739
</h6>
4840

@@ -55,6 +47,20 @@ <h6 class="card-title">
5547
data-placement="left">build</i>
5648
{% endif %}
5749

50+
<!-- Priority Badge -->
51+
<span class="text-muted">
52+
<span class="badge
53+
{% if ticket.priority == 'Low' %}
54+
badge-success
55+
{% elif ticket.priority == 'Medium' %}
56+
badge-warning
57+
{% elif ticket.priority == 'High' %}
58+
badge-danger
59+
{% endif %}
60+
">{{ ticket.priority }}
61+
</span>
62+
</span>
63+
5864
<!-- Tags -->
5965
{% if ticket.tags.names %}
6066
<span>
@@ -67,8 +73,9 @@ <h6 class="card-title">
6773
<!-- Status change via dropdown only available if User is Submitter or Staff -->
6874
{% if request.user == ticket.submitted_by or request.user.is_staff %}
6975
<div class="btn-group float-right">
70-
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
71-
aria-expanded="false">...
76+
<button class="btn btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
77+
aria-expanded="false"><span class="material-icons text-muted">
78+
more_vert</span>
7279
</button>
7380
<div class="dropdown-menu dropdown-menu-right">
7481
<h6 class="dropdown-header">Move to:</h6>
@@ -82,6 +89,7 @@ <h6 class="dropdown-header">Move to:</h6>
8289
</div>
8390
</div>
8491
{% endif %}
92+
8593
</div>
8694
</div>
8795
{% endfor %}
@@ -102,30 +110,35 @@ <h6 class="card-title">
102110
title="{{ ticket.description }}">{{ ticket.summary }}
103111
</a>
104112

105-
<!-- Priority Badge -->
106-
<span class="text-muted">
107-
<span class="badge
108-
{% if ticket.priority == 'Low' %}
109-
badge-success
110-
{% elif ticket.priority == 'Medium' %}
111-
badge-warning
112-
{% elif ticket.priority == 'High' %}
113-
badge-danger
114-
{% endif %}
115-
float-right">{{ ticket.priority }}
116-
</span>
113+
<!-- Assigned To -->
114+
<span class="float-right text-muted" data-toggle="tooltip" title="Assignee"> {{ ticket.assigned_to }}
117115
</span>
116+
118117
</h6>
119118

120119
<!-- Bug/Feature Icon -->
121120
{% if ticket.ticket_type == "Bug" %}
122-
<i class="material-icons-outlined float-left" data-toggle="tooltip" data-placement="left"
121+
<i class="material-icons-outlined align-middle" data-toggle="tooltip" data-placement="left"
123122
title="Bug">bug_report</i>
124123
{% elif ticket.ticket_type == "Feature" %}
125-
<i class="material-icons-outlined float-left" data-toggle="tooltip" data-placement="left"
124+
<i class="material-icons-outlined align-middle" data-toggle="tooltip" data-placement="left"
126125
title="Feature">build</i>
127126
{% endif %}
128127

128+
<!-- Priority Badge -->
129+
<span class="text-muted">
130+
<span class="badge
131+
{% if ticket.priority == 'Low' %}
132+
badge-success
133+
{% elif ticket.priority == 'Medium' %}
134+
badge-warning
135+
{% elif ticket.priority == 'High' %}
136+
badge-danger
137+
{% endif %}
138+
">{{ ticket.priority }}
139+
</span>
140+
</span>
141+
129142
<!-- Tags -->
130143
{% if ticket.tags.names %}
131144
<span>
@@ -138,8 +151,9 @@ <h6 class="card-title">
138151
<!-- Status change via dropdown only available if User is Submitter or Staff -->
139152
{% if request.user == ticket.submitted_by or request.user.is_staff %}
140153
<div class="btn-group float-right">
141-
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
142-
aria-expanded="false">...
154+
<button class="btn btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
155+
aria-expanded="false">
156+
<span class="material-icons text-muted">more_vert</span>
143157
</button>
144158
<div class="dropdown-menu dropdown-menu-right">
145159
<h6 class="dropdown-header">Move to:</h6>
@@ -172,30 +186,35 @@ <h6 class="card-title">
172186
<a href="{% url 'view_ticket' ticket.id %}" data-toggle="tooltip" data-placement="bottom"
173187
title="{{ ticket.description }}">{{ ticket.summary }}
174188
</a>
175-
<!-- Priority Badge -->
176-
<span class="text-muted">
177-
<span class="badge
178-
{% if ticket.priority == 'Low' %}
179-
badge-success
180-
{% elif ticket.priority == 'Medium' %}
181-
badge-warning
182-
{% elif ticket.priority == 'High' %}
183-
badge-danger
184-
{% endif %}
185-
float-right">{{ ticket.priority }}
186-
</span>
189+
190+
<!-- Assigned To -->
191+
<span class="float-right text-muted" data-toggle="tooltip" title="Assignee"> {{ ticket.assigned_to }}
187192
</span>
188193
</h6>
189194

190195
<!-- Bug/Feature Icon -->
191196
{% if ticket.ticket_type == "Bug" %}
192-
<i class="material-icons-outlined float-left" data-toggle="tooltip" data-placement="left"
197+
<i class="material-icons-outlined align-middle" data-toggle="tooltip" data-placement="left"
193198
title="Bug">bug_report</i>
194199
{% elif ticket.ticket_type == "Feature" %}
195-
<i class="material-icons-outlined float-left" data-toggle="tooltip" data-placement="left"
200+
<i class="material-icons-outlined align-middle" data-toggle="tooltip" data-placement="left"
196201
title="Feature">build</i>
197202
{% endif %}
198203

204+
<!-- Priority Badge -->
205+
<span class="text-muted">
206+
<span class="badge
207+
{% if ticket.priority == 'Low' %}
208+
badge-success
209+
{% elif ticket.priority == 'Medium' %}
210+
badge-warning
211+
{% elif ticket.priority == 'High' %}
212+
badge-danger
213+
{% endif %}
214+
">{{ ticket.priority }}
215+
</span>
216+
</span>
217+
199218
<!-- Tags -->
200219
{% if ticket.tags.names %}
201220
<span>
@@ -208,8 +227,9 @@ <h6 class="card-title">
208227
<!-- Status change via dropdown only available if User is Submitter or Staff -->
209228
{% if request.user == ticket.submitted_by or request.user.is_staff %}
210229
<div class="btn-group float-right">
211-
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
212-
aria-expanded="false">...
230+
<button class="btn btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
231+
aria-expanded="false">
232+
<span class="material-icons text-muted">more_vert</span>
213233
</button>
214234
<div class="dropdown-menu dropdown-menu-right">
215235
<h6 class="dropdown-header">Move to:</h6>
@@ -243,19 +263,10 @@ <h6 class="card-title">
243263
title="{{ ticket.description }}">{{ ticket.summary }}
244264
</a>
245265

246-
<!-- Priority Badge -->
247-
<span class="text-muted">
248-
<span class="badge
249-
{% if ticket.priority == 'Low' %}
250-
badge-success
251-
{% elif ticket.priority == 'Medium' %}
252-
badge-warning
253-
{% elif ticket.priority == 'High' %}
254-
badge-danger
255-
{% endif %}
256-
float-right">{{ ticket.priority }}
257-
</span>
266+
<!-- Assigned To -->
267+
<span class="float-right text-muted" data-toggle="tooltip" title="Assignee"> {{ ticket.assigned_to }}
258268
</span>
269+
259270
</h6>
260271

261272
<!-- Bug/Feature Icon -->
@@ -267,6 +278,20 @@ <h6 class="card-title">
267278
data-placement="left">build</i>
268279
{% endif %}
269280

281+
<!-- Priority Badge -->
282+
<span class="text-muted">
283+
<span class="badge
284+
{% if ticket.priority == 'Low' %}
285+
badge-success
286+
{% elif ticket.priority == 'Medium' %}
287+
badge-warning
288+
{% elif ticket.priority == 'High' %}
289+
badge-danger
290+
{% endif %}
291+
">{{ ticket.priority }}
292+
</span>
293+
</span>
294+
270295
<!-- Tags -->
271296
{% if ticket.tags.names %}
272297
<span>
@@ -279,8 +304,9 @@ <h6 class="card-title">
279304
<!-- Status change via dropdown only available if User is Submitter or Staff -->
280305
{% if request.user == ticket.submitted_by or request.user.is_staff %}
281306
<div class="btn-group float-right">
282-
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
283-
aria-expanded="false">...
307+
<button class="btn btn-sm" type="button" data-toggle="dropdown" aria-haspopup="true"
308+
aria-expanded="false">
309+
<span class="material-icons text-muted">more_vert</span>
284310
</button>
285311
<div class="dropdown-menu dropdown-menu-right">
286312
<h6 class="dropdown-header">Move to:</h6>

0 commit comments

Comments
 (0)