active.hbs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {{#if model.length}}
  2. <p class="lead">
  3. {{ngettext "%(users)s user has posted new messages in last %(days)s days." "%(users)s users have posted new messages in last %(days)s days." model.length users=model.length days=meta.ranking_length}}
  4. </p>
  5. <div class="panel panel-table users-table">
  6. <table class="table vertically-aligned">
  7. <thead class="hidden-xs hidden-sm">
  8. <tr>
  9. <th colspan="2">{{gettext "User"}}</th>
  10. <th>{{gettext "Position"}}</th>
  11. <th>{{gettext "Posts"}}</th>
  12. <th>{{gettext "Total"}}</th>
  13. </tr>
  14. </thead>
  15. <tbody>
  16. {{#each model as |user|}}
  17. <tr>
  18. <td class="col-avatar">
  19. {{#link-to 'user' user.url_name}}
  20. {{user-avatar user=user size=50}}
  21. {{/link-to}}
  22. </td>
  23. <td class="col-username">
  24. {{#link-to 'user' user.url_name}}
  25. {{user.username}}
  26. {{/link-to}}
  27. <p class="hidden-md hidden-lg">
  28. {{ngettext "#%(rank)s with %(score)s post and %(total)s total." "#%(rank)s with %(score)s posts and %(total)s total." user.meta.score rank=user.meta.ranking score=user.meta.score total=user.posts}}
  29. </p>
  30. </td>
  31. <td class="hidden-xs hidden-sm">
  32. #{{user.meta.ranking}}
  33. </td>
  34. <td class="hidden-xs hidden-sm">
  35. {{user.meta.score}}
  36. </td>
  37. <td class="hidden-xs hidden-sm">
  38. {{user.posts}}
  39. </td>
  40. </tr>
  41. {{/each}}
  42. </tbody>
  43. </table>
  44. </div>
  45. {{else}}
  46. <p class="lead">
  47. {{gettext "No users have posted during last %(days)s days." days=meta.ranking_length}}
  48. </p>
  49. {{/if}}