internal/web/templates/mrs.html

03fe6e44370f8129c9ac68f13fe674cc271f5ffa
gitbay/internal/web/templates/mrs.html

25 lines · 1534 bytes

 1{{define "title"}}merge requests · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 2{{define "content"}}
 3<div class="listhead">
 4  <h1>Merge requests</h1>
 5  <nav class="filters">
 6    <a {{if eq .State "open"}}class="active" aria-current="page" {{end}}href="?state=open">open</a>
 7    <a {{if eq .State "merged"}}class="active" aria-current="page" {{end}}href="?state=merged">merged</a>
 8    <a {{if eq .State "closed"}}class="active" aria-current="page" {{end}}href="?state=closed">closed</a>
 9    <a {{if eq .State "all"}}class="active" aria-current="page" {{end}}href="?state=all">all</a>
10  </nav>
11  {{range .Filters}}<p class="meta">{{.Key}}: <b>{{.Value}}</b> <a href="{{.Clear}}">clear</a></p>{{end}}
12</div>
13{{if .Viewer}}<p class="meta"><a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs/new">New merge request</a></p>{{end}}
14<ul class="issuelist">
15{{range .MRs}}<li>
16  <div class="issuemain">
17    <p class="title"><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/mrs/{{.Number}}">{{.Title}}</a></p>
18    <p class="meta">!{{.Number}} by <a href="/{{.Author}}">{{.Author}}</a> · {{if .SourcePath}}{{.SourcePath}}:{{end}}{{.SourceRef}} → {{.TargetRef}}</p>
19  </div>
20  <span class="chip chip-{{.State}}">{{.State}}</span>
21</li>
22{{else}}<li class="empty">no {{if ne .State "all"}}{{.State}} {{end}}merge requests — open one with <code>gitbay mr create {{.Repo.OwnerName}}/{{.Repo.Name}} --source ... --target {{.Repo.DefaultBranch}}</code></li>{{end}}
23</ul>
24{{if .Older}}<p class="pager"><a href="{{.Older}}">older →</a></p>{{end}}
25{{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