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.

56 lines
1.8 KiB

  1. {{template "base/head" .}}
  2. <div class="repository watchers">
  3. {{template "repo/header" .}}
  4. <div class="ui container">
  5. <h2 class="ui dividing header">
  6. {{if .PageIsWatchers}}
  7. {{.i18n.Tr "repo.watchers"}}
  8. {{else}}
  9. {{.i18n.Tr "repo.stargazers"}}
  10. {{end}}
  11. </h2>
  12. <ul class="list">
  13. {{range .Watchers}}
  14. <li class="item ui segment">
  15. <a href="{{.HomeLink}}">
  16. <img class="avatar" src="{{.AvatarLink}}"/>
  17. </a>
  18. <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
  19. <div class="meta">
  20. {{if .Website}}
  21. <span class="icon octicon octicon-link"></span> <a href="{{.Website}}" target="_blank">{{.Website}}</a>
  22. {{else if .Location}}
  23. <span class="icon octicon octicon-location"></span> {{.Location}}
  24. {{else}}
  25. <span class="icon octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
  26. {{end}}
  27. </div>
  28. </li>
  29. {{end}}
  30. </ul>
  31. {{with .Page}}
  32. {{if gt .TotalPages 1}}
  33. <div class="center page buttons">
  34. <div class="ui borderless pagination menu">
  35. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  36. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  37. </a>
  38. {{range .Pages}}
  39. {{if eq .Num -1}}
  40. <a class="disabled item">...</a>
  41. {{else}}
  42. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  43. {{end}}
  44. {{end}}
  45. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  46. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  47. </a>
  48. </div>
  49. </div>
  50. {{end}}
  51. {{end}}
  52. </div>
  53. </div>
  54. {{template "base/footer" .}}