internal/web/templates/edit.html

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

14 lines · 874 bytes

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