Sha256: 4c422ba0b931b2f6d50006c6d2bfc51065bfe30e8b66f737e046eb38e7adf893

Contents?: true

Size: 917 Bytes

Versions: 6

Compression:

Stored size: 917 Bytes

Contents

module C80NewsTz
  module AdvertisersHelper

    # собрать информацию для отрисовки логотипа компании в блоке "публикации рекламодателя"
    # отрисовка логотипа происходит с помощью метода render_image_link_lazy_holder
    # если логотипа нет - вернёт nil
    def arrange_logo_for_aapub(advertiser)
      # :alt_image => pub.title,
      # :image => photo_preview,
      # :ww => ww,
      # :hh => hh,
      # :a_href => url_for_fact(pub)

      result = nil

      if advertiser.logo_for_aapub.present?
        result = {
            :alt_image => advertiser.title,
            :image => advertiser.logo_for_aapub,
            :ww => 282,
            :hh => 82,
            :a_href => apph_url_for_advertiser(advertiser.slug)
        }
      end

      result
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
c80_news_tz-0.1.1.26 app/helpers/c80_news_tz/advertisers_helper.rb
c80_news_tz-0.1.1.25 app/helpers/c80_news_tz/advertisers_helper.rb
c80_news_tz-0.1.1.24 app/helpers/c80_news_tz/advertisers_helper.rb
c80_news_tz-0.1.1.23 app/helpers/c80_news_tz/advertisers_helper.rb
c80_news_tz-0.1.1.22 app/helpers/c80_news_tz/advertisers_helper.rb
c80_news_tz-0.1.1.21 app/helpers/c80_news_tz/advertisers_helper.rb