watchers.tmpl 1.9 KB

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