header_old.tmpl 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{with .Repository}}
  2. <div id="repo-header" class="clear">
  3. <div class="container clear">
  4. <h1 id="repo-header-name" class="left public">
  5. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  6. <a class="author" href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  7. <span class="divider">/</span>
  8. <a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a>
  9. {{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}}
  10. {{if .IsFork}}<span class="fork-flag">forked from <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></span>{{end}}
  11. </h1>
  12. <ul id="repo-header-meta" class="right menu menu-line">
  13. <li id="repo-header-watch">
  14. <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch">
  15. <button class="btn btn-gray text-bold btn-radius">
  16. <i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span>
  17. </button>
  18. </a>
  19. </li>
  20. <li id="repo-header-star">
  21. <a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star">
  22. <button class="btn btn-gray text-bold btn-radius">
  23. <i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
  24. <span class="num">{{.NumStars}}</span>
  25. </button>
  26. </a>
  27. </li>
  28. {{if .CanBeForked}}
  29. <li id="repo-header-fork">
  30. <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryAdmin) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{end}}>
  31. <button class="btn btn-gray text-bold btn-radius">
  32. <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
  33. <span class="num">{{.NumForks}}</span>
  34. </button>
  35. </a>
  36. </li>
  37. {{end}}
  38. </ul>
  39. </div>
  40. </div>
  41. {{end}}