| 18e381ea Andy McCall ↶ |
1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}Labels · {{ repo.owner }}/{{ repo.name }}{% endblock %} |
| 4 |
{% block bodyattrs %} data-repo="{{ repo.url }}"{% endblock %} |
| 5 |
{% block tabs %}{% call m::tabs(repo, "issues") %}{% endblock %} |
| 6 |
{% block content %} |
| 7 |
<div class="head"><h1>Labels <small>{{ labels.len() }}</small></h1></div> |
| 8 |
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %} |
| 9 |
<div class="table"><table><tr><th>Label</th><th>Description</th><th></th></tr> |
| 10 |
{% for l in labels %}<tr><td><span class="label" style="--c: {{ l.colour }}">{{ l.name }}</span></td><td>{{ l.description }}</td><td>{% if can_triage %}<form class="tiny" method="post" action="{{ repo.url }}/labels"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="name" value="{{ l.name }}"><button name="delete" value="1">delete</button></form>{% endif %}</td></tr>{% endfor %} |
| 11 |
</table></div> |
| 12 |
{% if can_triage %} |
| 13 |
<form class="card" method="post" action="{{ repo.url }}/labels"> |
| 14 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 15 |
<h2>Add or change a label</h2> |
| 16 |
<div class="row"><div><label for="name">Name</label><input type="text" id="name" name="name" required></div><div><label for="colour">Colour</label><input type="color" id="colour" name="colour" value="#0072ff"></div></div> |
| 17 |
<label for="description">Description</label><input type="text" id="description" name="description"> |
| 18 |
<button type="submit">SAVE</button> |
| 19 |
</form> |
| 20 |
{% endif %} |
| 21 |
{% endblock %} |