summaryrefslogtreecommitdiff
path: root/app/views/users/_listing.html.haml
blob: 9b7b6534fe8246bf299e28946b7f0293a7879f77 (plain)
1
2
3
4
5
6
7
8
- amount_of_users = users.count
- if amount_of_users > 0
  - if amount_of_users < GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
    = users.map{|user| user}.join(', ')
  - else
    = users.limit((GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ') + ', '
    = '[...]'
    = users.offset(amount_of_users - (GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ')