Sha256: 10ff3168d4e3596edd2647a7e5fea7c0a0e5eb4af39811c43fb0523c36298d5a
Contents?: true
Size: 800 Bytes
Versions: 10
Compression:
Stored size: 800 Bytes
Contents
module Admin::ImagesHelper def image_views RefinerySetting.find_or_set(:image_views, [:grid, :list]) end def current_image_view RefinerySetting.find_or_set(:preferred_image_view, :list) 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 unless params[:action] != "index" or params[:view].blank? or !image_views.include? params[:view].to_sym RefinerySetting[:preferred_image_view] = params[:view] end end def images_paginator(collection, dialog = false) will_paginate collection, :previous_label => '« Previous', :next_label => 'Next »', :renderer => Refinery::LinkRenderer end end
Version data entries
10 entries across 10 versions & 1 rubygems