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.

sub_menu.tmpl 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <div class="ui segments">
  2. <div class="ui segment sub-menu repository-menu">
  3. <div class="ui two horizontal center link list">
  4. {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo)}}
  5. <div class="item{{if .PageIsCommits}} active{{end}}">
  6. <a class="ui" href="{{.RepoLink}}/commits{{if .IsViewBranch}}/branch{{else if .IsViewTag}}/tag{{else if .IsViewCommit}}/commit{{end}}/{{EscapePound .BranchName}}">{{svg "octicon-history" 16}} <b>{{.CommitsCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .CommitsCount "repo.commit" "repo.commits") }}</a>
  7. </div>
  8. {{end}}
  9. {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) }}
  10. <div class="item{{if .PageIsBranches}} active{{end}}">
  11. <a class="ui" href="{{.RepoLink}}/branches/">{{svg "octicon-git-branch" 16}} <b>{{.BranchesCount}}</b> {{.i18n.Tr (TrN .i18n.Lang .BranchesCount "repo.branch" "repo.branches") }}</a>
  12. </div>
  13. <div class="item">
  14. <a class="ui" href="#">{{svg "octicon-database" 16}} <b>{{SizeFmt .Repository.Size}}</b></a>
  15. </div>
  16. {{end}}
  17. </div>
  18. </div>
  19. {{if and (.Permission.CanRead $.UnitTypeCode) (not .IsEmptyRepo) .LanguageStats }}
  20. <div class="ui segment sub-menu language-stats-details" style="display: none">
  21. <div class="ui horizontal center link list">
  22. {{range .LanguageStats}}
  23. <div class="item">
  24. <i class="color-icon" style="background-color: {{ .Color }}"></i>
  25. <span class="ui"><b>
  26. {{if eq .Language "other" }}
  27. {{ $.i18n.Tr "repo.language_other" }}
  28. {{else}}
  29. {{ .Language }}
  30. {{end}}
  31. </b> {{ .Percentage }}%</span>
  32. </div>
  33. {{end}}
  34. </div>
  35. </div>
  36. <a class="ui segment language-stats">
  37. {{range .LanguageStats}}
  38. <div class="bar" style="width: {{ .Percentage }}%; background-color: {{ .Color }}">&nbsp;</div>
  39. {{end}}
  40. </a>
  41. {{end}}
  42. </div>