Only show labels which haven't been linked yet
...in the dropbox for adding new labels to a ticket.
This commit is contained in:
parent
5730d360aa
commit
aba4f78345
|
@ -57,8 +57,12 @@ def ticket_GET(owner, name, ticket_id):
|
|||
|
||||
is_subscribed = bool(sub)
|
||||
|
||||
ticket_labels = TicketLabel.query.filter(TicketLabel.ticket_id == ticket.id)
|
||||
labels = [tl.label for tl in ticket_labels]
|
||||
|
||||
return render_template("ticket.html", tracker=tracker, ticket=ticket,
|
||||
access=access, is_subscribed=is_subscribed, tracker_sub=tracker_sub)
|
||||
access=access, is_subscribed=is_subscribed, tracker_sub=tracker_sub,
|
||||
labels=labels)
|
||||
|
||||
@ticket.route("/<owner>/<name>/<int:ticket_id>/enable_notifications", methods=["POST"])
|
||||
@loginrequired
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
}}">
|
||||
<select id="label_id" name="label_id">
|
||||
<option>-- Pick one --</option>
|
||||
{% for label in tracker.labels %}
|
||||
{% for label in tracker.labels if label not in labels %}
|
||||
<option value="{{ label.id }}">
|
||||
{{ label.name }}
|
||||
</option>
|
||||
|
|
Loading…
Reference in New Issue