Sha256: 87e5acf6f195e2fbb9e3e5fd55ec5fa4da05623d72361fb9e0b05d03b2981b4b

Contents?: true

Size: 724 Bytes

Versions: 11

Compression:

Stored size: 724 Bytes

Contents

module Refinery
  module Admin
    module ImagesHelper
      def other_image_views
        Refinery::Images.image_views.reject do |image_view|
          image_view.to_s == Refinery::Images.preferred_image_view.to_s
        end
      end

      def thumbnail_urls(image)
        thumbnail_urls = {
          :"data-original" => image_path(image.url),
          :"data-grid" => image_path(image.thumbnail(:geometry => '135x135#c').url)
        }

        Refinery::Images.user_image_sizes.sort_by{ |key, geometry| geometry}.each do |size, pixels|
          thumbnail_urls[:"data-#{size.to_s.parameterize}"] = image_path(image.thumbnail(:geometry => pixels).url)
        end

        thumbnail_urls
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
refinerycms-images-4.0.3 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-4.0.2 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-4.0.1 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.6 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-4.0.0 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.5 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.4 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.3 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.2 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.1 app/helpers/refinery/admin/images_helper.rb
refinerycms-images-3.0.0 app/helpers/refinery/admin/images_helper.rb