internal/web/templates/edit.html
15 lines · 904 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{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
6{{if .Blocked}}<p class="empty-note">{{.Blocked}}</p>{{else}}
7{{if .Creating}}<p class="meta"><code>{{.Path}}</code> does not exist on {{.Ref}}; committing creates it.</p>{{end}}
8<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/edit/{{.Ref}}/{{.Path}}" class="editform">
9<p><textarea name="content" aria-label="File contents" rows="24" spellcheck="false">{{.Content}}</textarea></p>
10<p><input name="message" aria-label="Commit message" placeholder="commit message">
11<button type="submit">Commit to {{.Ref}}</button></p>
12<p class="crumbs">this commit will be unsigned and authored as {{.Viewer}}</p>
13</form>
14{{end}}
15{{end}}