Sha256: 94af8325869498e9d2072ebd268025be4b0257fe09858dabd182d0ef4e716af1

Contents?: true

Size: 433 Bytes

Versions: 18

Compression:

Stored size: 433 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 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

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
refinerycms-0.9.5.31 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.30 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.29 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.28 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.27 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.26 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.25 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.24 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.23 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.22 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.21 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.20 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.19 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.18 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.17 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.16 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.15 vendor/plugins/images/app/helpers/admin/images_helper.rb
refinerycms-0.9.5.14 vendor/plugins/images/app/helpers/admin/images_helper.rb