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.

home.tmpl 4.9KB

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