header.tmpl 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 grey 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 grey 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 grey 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"><!-- start header -->
  27. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  28. <div class="content">
  29. <div class="ui huge breadcrumb"><!-- start breadcrumb -->
  30. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  31. <div class="divider"> / </div>
  32. <a href="{{$.RepoLink}}">{{.Name}}</a>
  33. {{if .IsMirror}}
  34. <div class="divider"></div>
  35. <div class="ui small label">{{$.i18n.Tr "mirror"}}</div>
  36. {{end}}
  37. {{if .IsFork}}
  38. <div class="sub header">
  39. <span class="ui text small">{{$.i18n.Tr "repo.forked_from"}}</span> <a href="{{.BaseRepo.RepoLink}}">{{SubStr .BaseRepo.RepoLink 1 -1}}</a>
  40. </div>
  41. {{end}}
  42. </div><!-- end breadcrumb -->
  43. </div><!-- end content -->
  44. </div><!-- end header -->
  45. </div><!-- end column -->
  46. </div><!-- end grid -->
  47. </div><!-- end container -->
  48. <div class="ui divider"></div>
  49. {{end}}