From 0de6b0fe8f2b9a014bfc1400abf6366363d46a1d Mon Sep 17 00:00:00 2001 From: Antonio Terceiro Date: Mon, 25 May 2009 23:47:12 -0300 Subject: [PATCH] ActionItem1043: allowing to edit the limit of profile list block --- app/controllers/my_profile/profile_design_controller.rb | 2 ++ app/models/communities_block.rb | 2 -- app/models/profile_list_block.rb | 2 +- app/views/box_organizer/_profile_list_block.rhtml | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 app/views/box_organizer/_profile_list_block.rhtml diff --git a/app/controllers/my_profile/profile_design_controller.rb b/app/controllers/my_profile/profile_design_controller.rb index 44fb7ac..46c24fa 100644 --- a/app/controllers/my_profile/profile_design_controller.rb +++ b/app/controllers/my_profile/profile_design_controller.rb @@ -16,6 +16,8 @@ class ProfileDesignController < BoxOrganizerController if profile.person? blocks << FriendsBlock blocks << FavoriteEnterprisesBlock + blocks << CommunitiesBlock + blocks << EnterprisesBlock end # blocks exclusive for enterprises diff --git a/app/models/communities_block.rb b/app/models/communities_block.rb index 5e9908d..09811bd 100644 --- a/app/models/communities_block.rb +++ b/app/models/communities_block.rb @@ -1,7 +1,5 @@ class CommunitiesBlock < ProfileListBlock - settings_items :limit, :default => 3 - def self.description __('A block that displays your communities') end diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index 31373db..8268d7f 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -1,6 +1,6 @@ class ProfileListBlock < Block - settings_items :limit, :default => 6 + settings_items :limit, :type => :integer, :default => 6 def self.description _('A block that displays random profiles') diff --git a/app/views/box_organizer/_profile_list_block.rhtml b/app/views/box_organizer/_profile_list_block.rhtml new file mode 100644 index 0000000..391fe2d --- /dev/null +++ b/app/views/box_organizer/_profile_list_block.rhtml @@ -0,0 +1,4 @@ +
+ <%= labelled_form_field _('Limit of items'), text_field(:block, :limit, :size => 3) %> +
+ -- libgit2 0.21.2