Sha256: 395b4e4ac6a4d44f007f39063d90347f34d21996646c92ac3685aa7fd01f72ad
Contents?: true
Size: 717 Bytes
Versions: 26
Compression:
Stored size: 717 Bytes
Contents
module Admin module ImagesHelper def image_views RefinerySetting.find_or_set(:image_views, [:grid, :list]) end def current_image_view RefinerySetting.find_or_set(:preferred_image_view, :grid) end def other_image_views image_views.reject {|image_view| image_view.to_s == current_image_view.to_s } end def change_list_mode_if_specified if action_name == 'index' and params[:view].present? and image_views.include?(params[:view].to_sym) RefinerySetting.set(:preferred_image_view, params[:view]) end end def images_paginator(collection, dialog = false) will_paginate collection, :renderer => Refinery::LinkRenderer end end end
Version data entries
26 entries across 26 versions & 2 rubygems