header.tmpl 2.2 KB

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