1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{% extends "layout.html" %}
{% block title %}new issue · {{ owner.username }}/{{ repo.name }} — kitgit{% endblock %}
{% block content %}
<section class="kg-section">
<h1 class="kg-title">New issue</h1>
{% let tab = "issues" %}
{% let archive_ref = repo.default_branch %}
{% include "partials/repo_tabs.html" %}
{% if let Some(err) = error %}
<div class="kg-flash">{{ err }}</div>
{% endif %}
<form class="kg-form" method="post" action="/{{ owner.username }}/{{ repo.name }}/issues">
<label>
title
<input type="text" name="title" required autofocus />
</label>
<label>
body
<textarea name="body" rows="8"></textarea>
</label>
{% if !labels.is_empty() %}
<fieldset class="kg-fieldset">
<legend>labels</legend>
{% for l in labels %}
<label class="row">
<input type="checkbox" name="label_id" value="{{ l.id }}" />
<span class="kg-label-chip" style="background:{{ l.bg_color() }};color:{{ l.text_color() }}">{{ l.name }}</span>
</label>
{% endfor %}
</fieldset>
{% endif %}
{% if !milestones.is_empty() %}
<label>
milestone
<select name="milestone_id">
<option value="">none</option>
{% for m in milestones %}
<option value="{{ m.id }}">{{ m.title }}</option>
{% endfor %}
</select>
</label>
{% endif %}
<div class="kg-actions">
<button class="kg-btn" type="submit">create</button>
<a class="kg-btn kg-btn--ghost" href="/{{ owner.username }}/{{ repo.name }}/issues">cancel</a>
</div>
</form>
</section>
{% endblock %}