internal/web/templates/issuenew.html

28 lines · 1649 bytes

 1{{define "width"}}bounded{{end}}
 2{{define "title"}}new issue · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<div class="pagehead">
 5  <h1>New issue</h1>
 6  <span class="grow"></span>
 7  <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues">Back to issues</a>
 8</div>
 9{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
10{{if gt (len .Templates) 1}}<p class="meta">Template:
11{{range .Templates}}{{if eq .Name $.Template}}<strong>{{.Name}}</strong>{{else}}<a href="?template={{.Name}}">{{.Name}}</a>{{end}} {{end}}</p>{{end}}
12<section class="setcard">
13{{if .Draft.Is "body"}}{{template "previewblock" .Draft.HTML}}{{end}}
14<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/new" class="commentform">
15  <p><input type="text" name="title" aria-label="Title" placeholder="Title" value="{{.Title}}" required></p>
16  <p><textarea name="body" aria-label="Description" rows="12" placeholder="Describe the issue…">{{.Body}}</textarea></p>
17  {{template "formatpicker" .Format}}
18  {{if .CanWrite}}
19  <div class="meta-fields">
20    <input type="text" name="labels" aria-label="Labels" placeholder="labels, space-separated (optional)" value="{{.Labels}}">
21    <input type="text" name="milestone" aria-label="Milestone" placeholder="milestone (optional)" value="{{.Milestone}}">
22    <input type="text" name="assignee" aria-label="Assignee" placeholder="assignees, space-separated (optional)" value="{{.Assignee}}">
23  </div>
24  {{end}}
25  <p class="btngroup"><button type="submit">Open issue</button> {{template "previewbtn"}} <span class="meta">⌘↵ to submit</span></p>
26</form>
27</section>
28{{end}}