user_cards.tmpl 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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="{{.HomeURLPath}}">
  9. <img class="avatar" src="{{.AvatarURLPath}}"/>
  10. </a>
  11. <h3 class="name"><a href="{{.HomeURLPath}}">{{.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. <button class="ui red small button">{{$.i18n.Tr "repo.unwatch"}}</button>
  26. </form>
  27. {{end}}
  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>