summaryrefslogtreecommitdiff
path: root/app/views/users
diff options
context:
space:
mode:
authorspag <spag@golwen.net>2013-01-16 23:09:38 +0100
committerspag <spag@golwen.net>2013-01-16 23:09:38 +0100
commite398d40c7ae15af9c840d0cda901303db8f22c39 (patch)
tree7319eb2cc22339e4efee4caf5fd67bcaababf6bf /app/views/users
parent8fd56dfe3d2bca6ccd9353031947ae4a8dca4528 (diff)
parentc2f63b8bf288903a68c562cdf9353e6840a7cb61 (diff)
Merge branch 'develop' of github.com:amooma/GS5 into develop
Diffstat (limited to 'app/views/users')
-rw-r--r--app/views/users/_listing.html.haml6
-rw-r--r--app/views/users/_user_groups.html.haml1
2 files changed, 3 insertions, 4 deletions
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
diff --git a/app/views/users/_user_groups.html.haml b/app/views/users/_user_groups.html.haml
index 7e206b6..81191ae 100644
--- a/app/views/users/_user_groups.html.haml
+++ b/app/views/users/_user_groups.html.haml
@@ -5,4 +5,3 @@
%h2=t("user_groups.index.page_title")
- if user.user_groups.count > 0
= render "user_groups/index_core", :user_groups => user.user_groups.where(:tenant_id => tenant.id).order(:name)
- = render :partial => 'shared/create_link', :locals => {:parent => tenant, :child_class => UserGroup} \ No newline at end of file