gitmote

gitmote / internal / webui / templates / browse_head.html  ·  history  ·  branches

655 bytes · raw

{{define "browse_head"}}
<h1>{{.Repo}}</h1>
<p>
  <a href="/{{.Repo}}/tree/{{.Ref}}">{{.Repo}}</a>
  {{range .Crumbs}} / <a href="/{{$.Repo}}/tree/{{$.Ref}}/{{.Path}}">{{.Name}}</a>{{end}}
  &nbsp;·&nbsp;
  <a href="/{{.Repo}}/commits/{{.Ref}}{{if .Path}}/{{.Path}}{{end}}">history</a>
  &nbsp;·&nbsp;
  <a href="/{{.Repo}}/refs">branches</a>
</p>
{{if .Refs}}
<form class="inline">
  <label>Ref
    <select onchange="location.href='/{{.Repo}}/tree/'+this.value{{if .Path}}+'/{{.Path}}'{{end}}">
      {{range .Refs}}<option value="{{.Ref}}"{{if eq .Ref $.Ref}} selected{{end}}>{{.Name}}</option>{{end}}
    </select>
  </label>
</form>
{{end}}
{{end}}