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

repo_list.tmpl 4.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <h2 class="ui left floated medium header">
  2. {{.i18n.Tr "explore.repos"}}
  3. </h2>
  4. <div class="ui right floated secondary filter menu">
  5. <!-- Sort -->
  6. <div class="ui right dropdown type jump item">
  7. <span class="text">
  8. {{.i18n.Tr "repo.issues.filter_sort"}}
  9. <i class="dropdown icon"></i>
  10. </span>
  11. <div class="menu">
  12. <a class="{{if eq .SortType "newest"}}active{{end}} item" href="{{$.Link}}?sort=newest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
  13. <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?sort=oldest&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
  14. <a class="{{if eq .SortType "alphabetically"}}active{{end}} item" href="{{$.Link}}?sort=alphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.alphabetically"}}</a>
  15. <a class="{{if eq .SortType "reversealphabetically"}}active{{end}} item" href="{{$.Link}}?sort=reversealphabetically&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.label.filter_sort.reverse_alphabetically"}}</a>
  16. <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?sort=recentupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
  17. <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?sort=leastupdate&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
  18. <a class="{{if eq .SortType "moststars"}}active{{end}} item" href="{{$.Link}}?sort=moststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.moststars"}}</a>
  19. <a class="{{if eq .SortType "feweststars"}}active{{end}} item" href="{{$.Link}}?sort=feweststars&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.feweststars"}}</a>
  20. <a class="{{if eq .SortType "mostforks"}}active{{end}} item" href="{{$.Link}}?sort=mostforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.mostforks"}}</a>
  21. <a class="{{if eq .SortType "fewestforks"}}active{{end}} item" href="{{$.Link}}?sort=fewestforks&q={{$.Keyword}}&tab={{$.TabName}}">{{.i18n.Tr "repo.issues.filter_sort.fewestforks"}}</a>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="ui clearing divider"></div>
  26. <div class="ui repository list">
  27. {{range .Repos}}
  28. <div class="item">
  29. <div class="ui header">
  30. {{if .RelAvatarLink}}
  31. <img class="ui avatar image" src="{{.RelAvatarLink}}">
  32. {{end}}
  33. <a class="name" href="{{.Link}}">
  34. {{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
  35. {{if .IsArchived}}<i class="archive icon archived-icon"></i>{{end}}
  36. </a>
  37. {{if .IsPrivate}}
  38. <span class="middle text gold">{{svg "octicon-lock" 16}}</span>
  39. {{else if .IsFork}}
  40. <span class="middle">{{svg "octicon-repo-forked" 16}}</span>
  41. {{else if .IsMirror}}
  42. <span class="middle">{{svg "octicon-repo-clone" 16}}</span>
  43. {{else if .Owner}}
  44. {{if .Owner.Visibility.IsPrivate}}
  45. <span class="text gold">{{svg "octicon-lock" 16}}</span>
  46. {{end}}
  47. {{end}}
  48. <div class="ui right metas">
  49. {{if .PrimaryLanguage }}
  50. <span class="text grey"><i class="color-icon" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
  51. {{end}}
  52. <span class="text grey">{{svg "octicon-star" 16}} {{.NumStars}}</span>
  53. <span class="text grey">{{svg "octicon-git-branch" 16}} {{.NumForks}}</span>
  54. </div>
  55. </div>
  56. <div class="description">
  57. {{if .DescriptionHTML}}<p class="has-emoji">{{.DescriptionHTML}}</p>{{end}}
  58. {{if .Topics }}
  59. <div class="ui tags">
  60. {{range .Topics}}
  61. {{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
  62. {{end}}
  63. </div>
  64. {{end}}
  65. <p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSinceUnix .UpdatedUnix $.i18n.Lang}}</p>
  66. </div>
  67. </div>
  68. {{else}}
  69. <div>
  70. {{$.i18n.Tr "explore.repo_no_results"}}
  71. </div>
  72. {{end}}
  73. </div>