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.

60 lines
4.2 KiB

10 years ago
10 years ago
  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="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></span>{{end}}
  11. </h1>
  12. <ul id="repo-header-meta" class="right menu menu-line">
  13. <li id="repo-header-download" class="drop">
  14. <a id="repo-header-download-btn" href="#">
  15. <button class="btn btn-black text-bold btn-radius">
  16. <i class="octicon octicon-cloud-download"></i>
  17. </button>
  18. </a>
  19. <div id="repo-header-download-drop" class="drop-down">
  20. <div id="repo-clone" class="clear">
  21. <button class="btn btn-blue left left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button>
  22. <button class="btn btn-gray left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button>
  23. <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{$.CloneLink.SSH}}" readonly />
  24. <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button>
  25. <p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" "http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository" | Str2html}}</p>
  26. <hr/>
  27. <div class="text-center" id="repo-clone-zip">
  28. <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a>
  29. <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{EscapePound $.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a>
  30. </div>
  31. </div>
  32. </div>
  33. </li>
  34. <li id="repo-header-watch">
  35. <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch">
  36. <button class="btn btn-gray text-bold btn-radius">
  37. <i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span>
  38. </button>
  39. </a>
  40. </li>
  41. <li id="repo-header-star">
  42. <a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star">
  43. <button class="btn btn-gray text-bold btn-radius">
  44. <i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
  45. <span class="num">{{.NumStars}}</span>
  46. </button>
  47. </a>
  48. </li>
  49. <li id="repo-header-fork">
  50. <a id="repo-header-fork-btn" {{if or (not $.IsRepositoryTrueOwner) $.Owner.IsOrganization}}href="{{AppSubUrl}}/repo/fork?fork_id={{.Id}}"{{end}}>
  51. <button class="btn btn-gray text-bold btn-radius">
  52. <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
  53. <span class="num">{{.NumForks}}</span>
  54. </button>
  55. </a>
  56. </li>
  57. </ul>
  58. </div>
  59. </div>
  60. {{end}}