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.

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