Fork to maintain patches against the official gitea for https://code.ceondo.com https://github.com/go-gitea/gitea

header.tmpl 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <div class="header-wrapper">
  2. {{with .Repository}}
  3. <div class="ui container"><!-- start container -->
  4. <div class="ui vertically padded grid head"><!-- start grid -->
  5. <div class="column"><!-- start column -->
  6. <div class="ui header">
  7. <div class="ui huge breadcrumb">
  8. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  9. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  10. <div class="divider"> / </div>
  11. <a href="{{$.RepoLink}}">{{.Name}}</a>
  12. {{if .IsMirror}}<div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener" href="{{$.Mirror.Address}}">{{$.Mirror.Address}}</a></div>{{end}}
  13. {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{SubStr .BaseRepo.RelLink 1 -1}}</a></div>{{end}}
  14. </div>
  15. <div class="ui right">
  16. <div class="ui compact labeled button" tabindex="0">
  17. <a class="ui compact button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
  18. <i class="icon fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
  19. </a>
  20. <a class="ui basic label" href="{{.Link}}/watchers">
  21. {{.NumWatches}}
  22. </a>
  23. </div>
  24. <div class="ui compact labeled button" tabindex="0">
  25. <a class="ui compact button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
  26. <i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
  27. </a>
  28. <a class="ui basic label" href="{{.Link}}/stars">
  29. {{.NumStars}}
  30. </a>
  31. </div>
  32. {{if .CanBeForked}}
  33. <div class="ui compact labeled button" tabindex="0">
  34. <a class="ui compact button {{if not $.CanSignedUserFork}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
  35. <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
  36. </a>
  37. <a class="ui basic label" href="{{.Link}}/forks">
  38. {{.NumForks}}
  39. </a>
  40. </div>
  41. {{end}}
  42. </div>
  43. </div>
  44. </div><!-- end column -->
  45. </div><!-- end grid -->
  46. </div><!-- end container -->
  47. {{end}}
  48. {{if not .IsDiffCompare}}
  49. <div class="ui tabs container">
  50. <div class="ui tabular stackable menu navbar">
  51. {{if .Repository.UnitEnabled $.UnitTypeCode}}
  52. <a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}">
  53. <i class="octicon octicon-code"></i> {{.i18n.Tr "repo.code"}}
  54. </a>
  55. {{end}}
  56. {{if .Repository.UnitEnabled $.UnitTypeIssues}}
  57. <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
  58. <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>
  59. </a>
  60. {{end}}
  61. {{if .Repository.UnitEnabled $.UnitTypeExternalTracker}}
  62. <a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
  63. <i class="octicon octicon-issue-opened"></i> {{.i18n.Tr "repo.issues"}} </span>
  64. </a>
  65. {{end}}
  66. {{if .Repository.AllowsPulls}}
  67. <a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
  68. <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>
  69. </a>
  70. {{end}}
  71. {{if and (.Repository.UnitEnabled $.UnitTypeCode) (not .IsBareRepo)}}
  72. <a class="{{if (or (.PageIsCommits) (.PageIsDiff))}}active{{end}} item" href="{{.RepoLink}}/commits/{{EscapePound .BranchName}}">
  73. <i class="octicon octicon-history"></i> {{.i18n.Tr "repo.commits"}} <span class="ui {{if not .CommitsCount}}gray{{else}}blue{{end}} small label">{{.CommitsCount}}</span>
  74. </a>
  75. {{end}}
  76. {{if and (.Repository.UnitEnabled $.UnitTypeReleases) (not .IsBareRepo) }}
  77. <a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
  78. <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>
  79. </a>
  80. {{end}}
  81. {{if or (.Repository.UnitEnabled $.UnitTypeWiki) (.Repository.UnitEnabled $.UnitTypeExternalWiki)}}
  82. <a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Repository.UnitEnabled $.UnitTypeExternalWiki)}} target="_blank" {{end}}>
  83. <i class="octicon octicon-book"></i> {{.i18n.Tr "repo.wiki"}}
  84. </a>
  85. {{end}}
  86. {{if and (.Repository.AnyUnitEnabled $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsBareRepo)}}
  87. <a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
  88. <i class="octicon octicon-pulse"></i> {{.i18n.Tr "repo.activity"}}
  89. </a>
  90. {{end}}
  91. {{if .IsRepositoryAdmin}}
  92. <div class="right menu">
  93. <a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
  94. <i class="octicon octicon-tools"></i> {{.i18n.Tr "repo.settings"}}
  95. </a>
  96. </div>
  97. {{end}}
  98. </div>
  99. </div>
  100. <div class="ui tabs divider"></div>
  101. {{else}}
  102. <div class="ui divider"></div>
  103. {{end}}
  104. </div>