internal/web/templates/symbols.html

727e9773591679858f7e89e6a9b2942db20cc2d2
gitbay/internal/web/templates/symbols.html

32 lines · 1327 bytes

 1{{define "width"}}wide{{end}}
 2{{define "title"}}symbols · {{.Repo.OwnerName}}/{{.Repo.Name}}{{end}}
 3{{define "content"}}
 4<h1>Symbols</h1>
 5<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/symbols" class="searchform">
 6  <input type="search" name="q" aria-label="Find a definition" value="{{.Query}}" placeholder="a name or its start, on {{.Repo.DefaultBranch}}">
 7  <select name="kind" aria-label="Kind">
 8    <option value="">any kind</option>
 9    {{range .Kinds}}<option value="{{.}}"{{if eq . $.Kind}} selected{{end}}>{{.}}</option>
10    {{end}}
11  </select>
12  <button type="submit" class="btn">Find</button>
13</form>
14{{if .Problem}}<p class="empty-note">{{.Problem}}</p>
15{{else if .Query}}
16{{if .Note}}<p class="meta">{{.Note}}</p>{{end}}
17{{if .Rows}}
18<div class="tablewrap"><table class="refs">
19<thead><tr><th scope="col">Name</th><th scope="col">Kind</th><th scope="col">Defined at</th></tr></thead>
20<tbody>
21{{range .Rows}}<tr>
22  <td><a href="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/blob/{{$.Commit}}/{{.Path}}#L{{.Line}}"><code>{{.Name}}</code></a></td>
23  <td>{{.Kind}}</td>
24  <td class="sha">{{.Path}}:{{.Line}}</td>
25</tr>
26{{end}}
27</tbody>
28</table></div>
29{{if .Next}}<p><a href="{{.Next}}">next page</a></p>{{end}}
30{{else}}<p class="empty-note">no definitions matching “{{.Query}}”</p>{{end}}
31{{end}}
32{{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