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.

77 lines
4.6 KiB

10 years ago
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header" .}}
  5. <div id="repo-content" class="clear container">
  6. <div id="repo-main" class="left grid-5-6">
  7. <p id="repo-desc">
  8. {{if .Repository.DescriptionHtml}}<span class="description">{{.Repository.DescriptionHtml}}</span>{{else}}<span class="no-description text-italic">{{.i18n.Tr "repo.no_desc"}}</span>{{end}}
  9. <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
  10. </p>
  11. <ul id="repo-file-nav" class="clear menu menu-line">
  12. <!-- <li>
  13. <a href="#">
  14. <button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
  15. </a>
  16. </li> -->
  17. <li id="repo-branch-switch" class="down drop">
  18. <a>
  19. <button class="btn btn-gray btn-medium btn-radius">
  20. <i class="octicon octicon-git-branch"></i> {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
  21. <strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
  22. </button>
  23. </a>
  24. <div class="drop-down panel">
  25. <p class="panel-header text-bold">{{.i18n.Tr "repo.branch_and_tags"}}</p>
  26. <!-- <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/> -->
  27. <div id="repo-branch-tag">
  28. <ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav">
  29. <li class="js-tab-nav {{if not .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-branch-list"><a>{{.i18n.Tr "repo.branches"}}</a></li>
  30. <li class="js-tab-nav {{if .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-tag-list"><a>{{.i18n.Tr "repo.tags"}}</a></li>
  31. </ul>
  32. <ul class="menu menu-vertical switching-list {{if .IsTag}}hide{{end}}" id="repo-branch-list">
  33. {{range .Branches}}
  34. <li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
  35. {{end}}
  36. </ul>
  37. <ul class="menu menu-vertical switching-list {{if not .IsTag}}hide{{end}}" id="repo-tag-list">
  38. {{range .Tags}}
  39. <li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{EscapePound .}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
  40. {{end}}
  41. </ul>
  42. </div>
  43. </div>
  44. </li>
  45. <li id="repo-bread" class="breads">
  46. <a class="title bread" href="{{.RepoLink}}/src/{{EscapePound .BranchName}}">{{.Repository.Name}}</a>
  47. {{ $n := len .Treenames}}
  48. {{ $l := Subtract $n 1}}
  49. {{range $i, $v := .Treenames}}
  50. {{if eq $i $l}}
  51. <span class="bread">{{EscapePound $v}}</span>
  52. {{else}}
  53. <span class="bread"><a href="{{EscapePound $.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a></span>
  54. {{end}}
  55. {{end}}
  56. </li>
  57. <!-- <li id="repo-commits-jump" class="repo-jump right">
  58. <a href="#">
  59. <button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button>
  60. </a>
  61. </li>
  62. <li id="repo-find-jump" class="repo-jump right">
  63. <a href="#">
  64. <button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button>
  65. </a>
  66. </li> -->
  67. </ul>
  68. {{if .IsFile}}
  69. {{template "repo/view_file" .}}
  70. {{else}}
  71. {{template "repo/view_list" .}}
  72. {{end}}
  73. </div>
  74. {{template "repo/sidebar" .}}
  75. </div>
  76. </div>
  77. {{template "ng/base/footer" .}}