Sha256: 8c923c684231951cb4e94a5898eae03634a3feebe30f29ac6e6726eec0ae06b5

Contents?: true

Size: 557 Bytes

Versions: 7

Compression:

Stored size: 557 Bytes

Contents

module Pageflow
  module ExternalLinks
    module SitesHelper
      include RevisionFileHelper

      def external_links_site_css_class(site)
        ['link-item', site.title.blank? && site.description.blank? ? 'no_text' : ''].compact.join(' ')
      end


      def external_links_site_thumbnail_css_class(site)
        classes = ['link-thumbnail']

        if file = find_file_in_entry(ImageFile, site.thumbnail)
          classes << file_thumbnail_css_class(file, :link_thumbnail_large)
        end

        classes.join(' ')
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
pageflow-external-links-2.6.0 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.5.0 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.4.1 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.4.0 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.3.0 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.2.1 app/helpers/pageflow/external_links/sites_helper.rb
pageflow-external-links-2.2.0 app/helpers/pageflow/external_links/sites_helper.rb