You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.6 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="body" class="container">
  6. <div id="source">
  7. <div class="source-toolbar">
  8. {{ $n := len .Treenames}}
  9. {{if not .IsFile}}<button class="btn btn-default pull-right hidden"><i class="fa fa-plus-square"></i>Add File</button>{{end}}
  10. <div class="dropdown branch-switch">
  11. <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>{{if .IsBranch}}{{.BranchName}}{{else}}{{ShortSha .CommitId}}{{end}}&nbsp;&nbsp;
  12. <b class="caret"></b></a>
  13. <ul class="dropdown-menu">
  14. {{range .Branches}}
  15. <li><a {{if eq . $.BranchName}}class="current" {{end}}href="/{{$.Username}}/{{$.Reponame}}/src/{{.}}">{{.}}</a></li>
  16. {{end}}
  17. </ul>
  18. </div>
  19. {{ $l := Subtract $n 1}}
  20. <ol class="breadcrumb">
  21. <li class="root dir">
  22. <a href="{{.BranchLink}}">{{.Repository.Name}}</a></li>
  23. {{range $i, $v := .Treenames}}
  24. <li class="dir">
  25. {{if eq $i $l}}{{$v}}
  26. {{else}}
  27. <a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a>&nbsp;
  28. {{end}}
  29. </li>
  30. {{end}}
  31. </ol>
  32. </div>
  33. {{if .IsFile}}
  34. {{template "repo/single_file" .}}
  35. {{else}}
  36. {{template "repo/single_list" .}}
  37. {{end}}
  38. </div>
  39. </div>
  40. {{template "base/footer" .}}