navid/veinsforge / f19b5da8080ed8686dfea72c79bec23d4628b62386bdf7c391249f8a5ff2e44a / internal/web/templates/pull_new.html

pull_new.html

← internal/web/templates · 1176 bytes · raw · download

{{define "content"}}
<p class="kicker"><a href="{{repoURL .Data.Repo}}">{{.Data.Repo.OwnerName}}/{{.Data.Repo.Name}}</a> / pull requests</p>
<h1>New pull request</h1>

{{if .Data.EnoughBranches}}
<form class="form-narrow" method="post" action="{{repoURL .Data.Repo}}/pulls">
  <input type="hidden" name="csrf" value="{{.CSRF}}">
  <label>Base bookmark
    <select name="base">
      {{range .Data.Branches}}<option value="{{.Name}}" {{if eq .Name $.Data.Base}}selected{{end}}>{{.Name}}</option>{{end}}
    </select>
  </label>
  <label>Head bookmark
    <select name="head">
      {{range .Data.Branches}}<option value="{{.Name}}" {{if eq .Name $.Data.Head}}selected{{end}}>{{.Name}}</option>{{end}}
    </select>
  </label>
  <label>Title <input name="title" required maxlength="256" autofocus></label>
  <label>Description <textarea name="body" rows="10" maxlength="65536" placeholder="Markdown is supported."></textarea></label>
  <button class="btn" type="submit">Open pull request</button>
</form>
{{else}}
<p>A pull request needs at least two bookmarks. Push another bookmark first.</p>
<p><a href="{{repoURL .Data.Repo}}/branches">View branches</a></p>
{{end}}
{{end}}