internal/web/templates/edit.html

bd5cf5d7d1f34fa780660fd7562b9ffd9746ee27
gitbay/internal/web/templates/edit.html history · blame · raw

21 lines · 1157 bytes

 1{{define "width"}}wide{{end}}
 2{{define "title"}}edit {{.Path}} · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<h1>edit {{.Repo.OwnerName}}/{{.Repo.Name}} : {{.Path}} @ {{.Ref}}</h1>
 5<div class="blobgrid">
 6{{template "filenav" .Nav}}
 7<div class="blobmain">
 8{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
 9{{if .Blocked}}<p class="empty-note">{{.Blocked}}</p>{{else}}
10{{if .Creating}}<p class="meta"><code>{{.Path}}</code> does not exist on {{.Ref}}; committing creates it.</p>{{end}}
11{{if .Draft.Is "content"}}{{template "previewblock" .Draft.HTML}}{{end}}
12<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/edit/{{.Ref}}/{{.Path}}" class="editform">
13<p><textarea name="content" aria-label="File contents" rows="24" spellcheck="false">{{.Content}}</textarea></p>
14<p><input name="message" aria-label="Commit message" placeholder="commit message" value="{{.Draft.Or "content" "message" ""}}">
15<button type="submit">Commit to {{.Ref}}</button>{{if .Markup}} {{template "previewbtn"}}{{end}}</p>
16<p class="crumbs">this commit will be unsigned and authored as {{.Viewer}}</p>
17</form>
18{{end}}
19</div>
20</div>
21{{end}}