From 9ffaaeeb42b364f2c7d9b7d17a272c530f546c83 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 21:46:37 +0100 Subject: Refactoring and adding user_groups to tenant#show #105 --- app/views/users/_listing.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/users/_listing.html.haml') diff --git a/app/views/users/_listing.html.haml b/app/views/users/_listing.html.haml index 0a97ad1..9b7b653 100644 --- a/app/views/users/_listing.html.haml +++ b/app/views/users/_listing.html.haml @@ -1,8 +1,8 @@ - amount_of_users = users.count - if amount_of_users > 0 - - if amount_of_users < 30 + - if amount_of_users < GsParameter.get('NUMBER_OF_SHOWN_ITEMS') = users.map{|user| user}.join(', ') - else - = users.limit(15).map{|user| user}.join(', ') + ', ' + = users.limit((GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ') + ', ' = '[...]' - = users.offset(amount_of_users - 15).map{|user| user}.join(', ') \ No newline at end of file + = users.offset(amount_of_users - (GsParameter.get('NUMBER_OF_SHOWN_ITEMS') / 2).floor).map{|user| user}.join(', ') \ No newline at end of file -- cgit v1.2.3