| 1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}Milestones · {{ 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>Milestones <small>{{ rows.len() }}</small></h1></div> |
| 8 |
{% if let Some(n) = notice %}<p class="note">{{ n }}</p>{% endif %} |
| 9 |
{% if rows.is_empty() %}<p class="empty">No milestones.</p>{% else %} |
| 10 |
<ul class="rows"> |
| 11 |
{% for (ms, open, closed) in rows %} |
| 12 |
<li><div><a class="name" href="{{ repo.url }}/issues?q=milestone:{{ ms.title }}"><strong>{{ ms.title }}</strong></a> {% if ms.state == "closed" %}<span class="tag">closed</span>{% endif %} |
| 13 |
<p class="small">{{ ms.description }}{% if let Some(d) = ms.due_ms %} · due {{ d|when_i }}{% endif %} · {{ open }} open, {{ closed }} closed</p></div> |
| 14 |
<div class="right">{% if can_triage %}<form class="tiny" method="post" action="{{ repo.url }}/milestones"><input type="hidden" name="_csrf" value="{{ shell.csrf }}"><input type="hidden" name="title" value="{{ ms.title }}"><button name="state" value="{% if ms.state == "open" %}closed{% else %}open{% endif %}">{% if ms.state == "open" %}close{% else %}reopen{% endif %}</button></form>{% endif %}</div></li> |
| 15 |
{% endfor %} |
| 16 |
</ul> |
| 17 |
{% endif %} |
| 18 |
{% if can_triage %} |
| 19 |
<form class="card" method="post" action="{{ repo.url }}/milestones"> |
| 20 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 21 |
<h2>Add or change a milestone</h2> |
| 22 |
<label for="title">Title</label><input type="text" id="title" name="title" required> |
| 23 |
<label for="description">Description</label><input type="text" id="description" name="description"> |
| 24 |
<label for="due">Due (YYYY-MM-DD, optional)</label><input type="text" id="due" name="due" pattern="\d{4}-\d{2}-\d{2}"> |
| 25 |
<button type="submit">SAVE</button> |
| 26 |
</form> |
| 27 |
{% endif %} |
| 28 |
{% endblock %} |