Show labels in ticket list and detail views

This commit is contained in:
Ivan Habunek 2018-10-15 13:18:51 +02:00 committed by Drew DeVault
parent 0c629db4c2
commit fb70ccd774
3 changed files with 25 additions and 1 deletions

View File

@ -152,6 +152,11 @@ select.form-control {
border: 1px solid black;
padding: .1rem .5rem;
display: inline-block;
&.small {
font-size: .7rem;
padding: 0 .3rem;
}
}
.label-list > .row {

View File

@ -123,6 +123,16 @@
<dd class="col-md-9 ellipsis" title="{{ ticket.user_agent }}">
{{ ticket.user_agent }}
</dd>
<dt class="col-md-3">Labels</dt>
<dd class="col-md-9">
{% for tl in ticket.labels %}
<div
class="label"
style="color: {{ tl.label.text_color }}; background-color: {{ tl.label.color }}"
>{{ tl.label.name }}
</div>
{% endfor %}
</dd>
</dl>
</div>
<div class="col-md-6">

View File

@ -143,7 +143,16 @@
owner=tracker.owner.canonical_name(),
name=tracker.name,
ticket_id=ticket.scoped_id)}}">#{{ticket.scoped_id}}</a></div>
<div class="title">{{ ticket.title }}</div>
<div class="title">
{{ ticket.title }}
{% for tl in ticket.labels %}
<div
class="small label"
style="color: {{ tl.label.text_color }}; background-color: {{ tl.label.color }}"
>{{ tl.label.name }}
</div>
{% endfor %}
</div>
<div class="updated">{{ ticket.updated | date }}</div>
<div class="submitter">
<a href="{{url_for("html.user_GET",