user_cards.tmpl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <div class="ui container user-cards">
  2. <h2 class="ui dividing header">
  3. {{.CardsTitle}}
  4. </h2>
  5. <ul class="list">
  6. {{range .Cards}}
  7. <li class="item ui segment">
  8. <a href="{{.HomeLink}}">
  9. <img class="avatar" src="{{.RelAvatarLink}}"/>
  10. </a>
  11. <h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
  12. <div class="meta">
  13. {{if .Website}}
  14. <span class="octicon octicon-link"></span> <a href="{{.Website}}" target="_blank" rel="noopener noreferrer">{{.Website}}</a>
  15. {{else if .Location}}
  16. <span class="octicon octicon-location"></span> {{.Location}}
  17. {{else}}
  18. <span class="octicon octicon-clock"></span> {{$.i18n.Tr "user.join_on"}} {{DateFmtShort .Created}}
  19. {{end}}
  20. </div>
  21. {{if $.IsAdmin}}
  22. <form class="display inline" action="{{$.RepoLink}}/action/unwatch?redirect_to={{$.Link}}" method="POST">
  23. {{$.CSRFTokenHTML}}
  24. <input type="hidden" name="user_id" value="{{.ID}}">
  25. <div class="ui labeled button" tabindex="0">
  26. <button class="ui red small button">{{$.i18n.Tr "repo.unwatch"}}</button>
  27. </div>
  28. </form>
  29. {{end}}
  30. </li>
  31. {{end}}
  32. </ul>
  33. {{with .Page}}
  34. {{if gt .TotalPages 1}}
  35. <div class="center page buttons">
  36. <div class="ui borderless pagination menu">
  37. <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}>
  38. <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}}
  39. </a>
  40. {{range .Pages}}
  41. {{if eq .Num -1}}
  42. <a class="disabled item">...</a>
  43. {{else}}
  44. <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a>
  45. {{end}}
  46. {{end}}
  47. <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}>
  48. {{$.i18n.Tr "repo.issues.next"}}&nbsp;<i class="icon right arrow"></i>
  49. </a>
  50. </div>
  51. </div>
  52. {{end}}
  53. {{end}}
  54. </div>