| 1 |
{% extends "base.html" %} |
| 2 |
{% import "repo_tabs.html" as m %} |
| 3 |
{% block title %}New issue · {{ 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>New issue <small>{{ repo.owner }}/{{ repo.name }}</small></h1></div> |
| 8 |
{% if let Some(e) = error %}<p class="error">{{ e }}</p>{% endif %} |
| 9 |
{% if !templates.is_empty() && template.is_empty() %} |
| 10 |
<section class="panel"><h2>Templates</h2><ul class="plain">{% for t in templates %}<li><a href="?template={{ t.0 }}">{{ t.0 }}</a></li>{% endfor %}<li><a href="?template=blank">blank</a></li></ul></section> |
| 11 |
{% else %} |
| 12 |
<form class="card wide" method="post" action="{{ repo.url }}/issues/new"> |
| 13 |
<input type="hidden" name="_csrf" value="{{ shell.csrf }}"> |
| 14 |
<label for="title">Title</label><input type="text" id="title" name="title" required autofocus> |
| 15 |
<label for="body">Description (Markdown; #12, owner/name#12, @user and change hashes become links)</label><textarea id="body" name="body" class="md" rows="12">{{ template }}</textarea> |
| 16 |
<button type="submit">OPEN ISSUE</button> |
| 17 |
</form> |
| 18 |
{% endif %} |
| 19 |
{% endblock %} |