internal/web/templates/mrnew.html

33 lines · 1749 bytes

 1{{define "width"}}bounded{{end}}
 2{{define "title"}}new merge request · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<div class="pagehead">
 5  <h1>New merge request</h1>
 6  <span class="grow"></span>
 7  <a class="button btn" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs">Back to merge requests</a>
 8</div>
 9{{if .Notice}}<p class="error" role="alert">{{.Notice}}</p>{{end}}
10<section class="setcard">
11{{if .Draft.Is "body"}}{{template "previewblock" .Draft.HTML}}{{end}}
12<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/new" class="commentform">
13  <p class="branchpick">
14    <label for="source">Merge</label>
15    <select id="source" name="source" required>
16      <option value="">Choose a branch…</option>
17      {{range .Sources}}<option value="{{.}}"{{if eq . $.Source}} selected{{end}}>{{.}}</option>{{end}}
18    </select>
19    <label for="target">into</label>
20    <select id="target" name="target">
21      {{range .Branches}}<option value="{{.Name}}"{{if eq .Name $.Target}} selected{{end}}>{{.Name}}</option>{{end}}
22    </select>
23  </p>
24  <p><input type="text" name="title" aria-label="Title" placeholder="Title" value="{{.Title}}" required></p>
25  <p><textarea name="body" aria-label="Description" rows="10" placeholder="what changes, and why">{{.Body}}</textarea></p>
26  {{template "formatpicker" .Format}}
27  <p class="btngroup"><button type="submit">Open merge request</button> {{template "previewbtn"}} <span class="meta">⌘↵ to submit</span></p>
28</form>
29</section>
30<p class="meta">Branches of a fork you can push to are offered as
31<code>owner/name:branch</code>. Fork this repository to propose a change
32without write access here: <code>gitbay repo fork {{.Repo.OwnerName}}/{{.Repo.Name}}</code></p>
33{{end}}