internal/web/templates/symbols.html

4a511e42574ead9c92dc73fd320f296cc4dbea07
gitbay/internal/web/templates/symbols.html

36 lines · 1478 bytes

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