header.tmpl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {{with .Repository}}
  2. <div class="ui container"><!-- start container -->
  3. <div id="repoheader" class="ui vertically padded grid head"><!-- start grid -->
  4. <div class="column"><!-- start column -->
  5. <div class="ui black small compact menu floated right count labelled">
  6. <a class="item{{if $.IsRepositoryOwner}} poping up{{end}}"{{if not $.IsRepositoryOwner}} href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top center" data-variation="tiny"{{end}}>
  7. <i class="icon octicon octicon-repo-forked"></i>
  8. {{$.i18n.Tr "repo.fork"}}
  9. </a>
  10. <span class="active item num">{{.NumForks}}</span>
  11. </div>
  12. <div class="ui black small compact menu floated right count labelled">
  13. <a class="item" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
  14. <i class="icon fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>
  15. {{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}}
  16. </a>
  17. <span class="active item num">{{.NumStars}}</span>
  18. </div>
  19. <div class="ui black small compact menu floated right count labelled">
  20. <a class="item" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
  21. <i class="icon fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>
  22. {{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}
  23. </a>
  24. <span class="active item num">{{.NumWatches}}</span>
  25. </div>
  26. <div class="ui header">
  27. <div class="ui huge breadcrumb">
  28. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  29. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  30. <div class="divider"> / </div>
  31. <a href="{{$.RepoLink}}">{{.Name}}</a>
  32. {{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
  33. {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a></div>{{end}}
  34. </div>
  35. </div>
  36. </div><!-- end column -->
  37. </div><!-- end grid -->
  38. </div><!-- end container -->
  39. <div class="ui divider"></div>
  40. {{end}}