josie / simplegit

{{define "title"}}new pull request · {{.Owner}}/{{.RepoName}} · simplegit{{end}}
{{define "content"}}
{{template "repo_nav" .}}
<h2>new pull request</h2>
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
{{if lt (len .Branches) 2}}
<p class="muted">Two branches are needed to open a pull request.</p>
{{else}}
<form method="post" action="/{{.Owner}}/{{.RepoName}}/pulls/new" class="panel">
  <p><label for="head">head branch</label><br>
     <select id="head" name="head">
       {{range .Branches}}<option value="{{.}}" {{if eq . $.Head}}selected{{end}}>{{.}}</option>{{end}}
     </select>
     <span class="muted">→ merge into</span>
     <label for="base">base branch</label>
     <select id="base" name="base">
       {{range .Branches}}<option value="{{.}}" {{if eq . $.Base}}selected{{end}}>{{.}}</option>{{end}}
     </select></p>
  <p><label for="title">title</label><br>
     <input id="title" name="title" value="{{.Title}}" maxlength="300" required></p>
  <p><label for="body">description</label><br>
     <textarea id="body" name="body" rows="10">{{.Body}}</textarea></p>
  {{if not .IsOwner}}{{template "guest_fields" "author_"}}{{end}}
  <p class="hp"><label>website <input name="website" tabindex="-1" autocomplete="off"></label></p>
  <p><button type="submit">open pull request</button></p>
</form>
{{end}}
{{end}}