internal/web/templates/edit.html

0666c9f622171df00f8e2c79a13d011522039624
gitbay/internal/web/templates/edit.html

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}}
Keyboard shortcuts

Global

⌘K
Command palette & jump
/
Focus search
?
Show this help
g d
Dashboard
g e
Explore repositories
g n
Notifications

Repository & editor

t
Find file in repository
y
Copy immutable SHA permalink
g c
Code tab
g i
Issues tab
g m
Merge requests tab
g b
Builds tab
⌘↵
Submit active form