X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=lib%2Flocmare%2Flist_group%2Flist%2Fbase.rb;fp=lib%2Flocmare%2Flist_group%2Flist%2Fbase.rb;h=9855fd83084976d6561cc6b040bfb787db35943f;hb=476df12eb97c9ed7be0f82e7482aa9047deeecfd;hp=7e71f68c4fa4ab5a878eb23bf8500fc4e0aebff8;hpb=2c570e30788ce6cbf0f939d5dbf3c42de86ef1c7;p=pettanr%2Fpettanr.git diff --git a/lib/locmare/list_group/list/base.rb b/lib/locmare/list_group/list/base.rb index 7e71f68c..9855fd83 100644 --- a/lib/locmare/list_group/list/base.rb +++ b/lib/locmare/list_group/list/base.rb @@ -91,6 +91,21 @@ module Locmare Kaminari.paginate_array(Array.new(c, nil)).page(offset).per(page_size) end + def boost_manifests + @model.my_peta.boost.select do |boost_name, boost_manifest| + boost_manifest.level == 'show' + end + end + + def boost items + manifests = self.boost_manifests + items.each do |item| + manifests.each do |boost_manifest| + item.boost_manifest + end + end + end + def open operators, options page = self.page_number(options[:page]) page_size = self.page_size options[:page_size] @@ -98,6 +113,7 @@ module Locmare items = self.items operators, options, offset, page_size count = self.count operators, options pg = self.paginate count, offset, page_size + self.boost items ListResult.new items, pg end