本站源代码
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

119 lignes
6.1KB

  1. <div class="header-wrapper">
  2. {{with .Repository}}
  3. <div class="ui container">
  4. <div class="repo-header">
  5. <div class="ui huge breadcrumb repo-title">
  6. {{if .RelAvatarLink}}
  7. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  8. {{else}}
  9. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  10. {{end}}
  11. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  12. <div class="divider"> / </div>
  13. <a href="{{$.RepoLink}}">{{.Name}}</a>
  14. {{if gt .NextPoint 0}}
  15. <div>项目红包剩余{{.Point}},下一贡献奖励{{.Percent}}%,即 {{.NextPoint}}个红包</div>
  16. {{end}}
  17. {{if and .RelAvatarLink .IsPrivate}}<i class="mega-octicon octicon-lock"></i>{{end}}
  18. {{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
  19. {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{MirrorAddress $.Mirror}}">{{MirrorAddress $.Mirror}}</a></div>{{end}}
  20. {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
  21. </div>
  22. {{if not .IsBeingCreated}}
  23. <div class="repo-buttons">
  24. <div class="ui labeled button" tabindex="0">
  25. <a class="ui compact basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
  26. <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
  27. </a>
  28. <a class="ui basic label" href="{{.Link}}/watchers">
  29. {{.NumWatches}}
  30. </a>
  31. </div>
  32. <div class="ui labeled button" tabindex="0">
  33. <a class="ui compact basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
  34. <i class="icon star{{if not $.IsStaringRepo}} outline{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
  35. </a>
  36. <a class="ui basic label" href="{{.Link}}/stars">
  37. {{.NumStars}}
  38. </a>
  39. </div>
  40. {{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
  41. <div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
  42. <a class="ui compact basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
  43. <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
  44. </a>
  45. <a class="ui basic label" href="{{.Link}}/forks">
  46. {{.NumForks}}
  47. </a>
  48. </div>
  49. {{end}}
  50. </div>
  51. {{end}}
  52. </div><!-- end grid -->
  53. </div><!-- end container -->
  54. {{end}}
  55. <div class="ui tabs container">
  56. {{if not .Repository.IsBeingCreated}}
  57. <div class="ui tabular stackable menu navbar">
  58. {{if .Permission.CanRead $.UnitTypeCode}}
  59. <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">
  60. <i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
  61. </a>
  62. {{end}}
  63. {{if .Permission.CanRead $.UnitTypeIssues}}
  64. <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
  65. <i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} <span class="ui {{if not .Repository.NumOpenIssues}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenIssues}}</span>
  66. </a>
  67. {{end}}
  68. {{if .Permission.CanRead $.UnitTypeExternalTracker}}
  69. <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
  70. <i class="octicon octicon-link-external"></i> {{.i18n.Tr "repo.issues"}} </span>
  71. </a>
  72. {{end}}
  73. {{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
  74. <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
  75. <i class="octicon octicon-git-pull-request"></i> {{.i18n.Tr "repo.pulls"}} <span class="ui {{if not .Repository.NumOpenPulls}}gray{{else}}blue{{end}} small label">{{.Repository.NumOpenPulls}}</span>
  76. </a>
  77. {{end}}
  78. {{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
  79. <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
  80. <i class="octicon octicon-tag"></i> {{.i18n.Tr "repo.releases"}} <span class="ui {{if not .Repository.NumReleases}}gray{{else}}blue{{end}} small label">{{.Repository.NumReleases}}</span>
  81. </a>
  82. {{end}}
  83. {{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
  84. <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
  85. <i class="octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
  86. </a>
  87. {{end}}
  88. {{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}}
  89. <a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
  90. <i class="octicon octicon-pulse"></i> {{.i18n.Tr "repo.activity"}}
  91. </a>
  92. {{end}}
  93. {{if not .Repository.IsFork}}
  94. <a class="{{if .PageIsFund}}active{{end}} item" href="{{.RepoLink}}/funds">
  95. <i class="octicon octicon-heart"></i> 捐赠
  96. </a>
  97. {{end}}
  98. {{template "custom/extra_tabs" .}}
  99. {{if .Permission.IsAdmin}}
  100. <div class="right menu">
  101. <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
  102. <i class="octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
  103. </a>
  104. </div>
  105. {{end}}
  106. </div>
  107. {{end}}
  108. </div>
  109. <div class="ui tabs divider"></div>
  110. </div>
上海开阖软件有限公司 沪ICP备12045867号-1