You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

header.tmpl 1.7KB

123456789101112131415161718192021222324252627
  1. {{with .Repository}}
  2. <div class="ui head container">
  3. <div class="ui huge breadcrumb">
  4. <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i>
  5. <a href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a>
  6. <div class="divider"> / </div>
  7. <a href="{{$.RepoLink}}">{{.Name}}</a>
  8. {{if .IsMirror}}<div class="ui label">{{$.i18n.Tr "mirror"}}</div>{{end}}
  9. {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></div>{{end}}
  10. </div>
  11. <div class="ui right">
  12. <a class="ui black basic button" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
  13. <i class="fa fa-eye{{if not $.IsWatchingRepo}}-slash{{end}}"></i>
  14. {{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}} <span class="num">{{.NumWatches}}</span>
  15. </a>
  16. <a class="ui black basic button" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
  17. <i class="fa fa-star{{if not $.IsStaringRepo}}-o{{end}}"></i>
  18. {{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}} <span class="num">{{.NumStars}}</span>
  19. </a>
  20. <a class="ui black basic button {{if $.IsRepositoryOwner}}poping up{{end}}" {{if not $.IsRepositoryOwner}}href="{{AppSubUrl}}/repo/fork/{{.Id}}"{{end}} {{if $.IsRepositoryOwner}}data-content="{{$.i18n.Tr "repo.fork_from_self"}}" data-position="top right"{{end}}>
  21. <i class="octicon octicon-repo-forked"></i>
  22. {{$.i18n.Tr "repo.fork"}} <span class="num">{{.NumForks}}</span>
  23. </a>
  24. </div>
  25. </div>
  26. <div class="ui divider"></div>
  27. {{end}}