Sha256: cc2bfa2bd037a30e46b6ef4f53d71ee10e186a90138cc3539f4e8fd59b954f63

Contents?: true

Size: 938 Bytes

Versions: 1

Compression:

Stored size: 938 Bytes

Contents

class TokyoMetro::App::Renderer::Document::Link < TokyoMetro::App::Renderer::Concerns::Link::Normal::MetaClass

  def initialize( request , title_ja , title_en , url_action , model_name , icon_name: nil )
    @model_name = model_name
    url = url_helpers.url_for( controller: :document , action: url_action , only_path: true )
    super(
      request , title_ja , title_en , url ,
      icon_name: icon_name ,
      class_name_of_link: :link ,
      class_name_of_div_domain: :link_to_document ,
      open_another_window: false ,
      size: :normal ,
      additional_info: additional_info ,
      additional_info_position: :in_text
    )
  end

  private

  def additional_info
    ::Proc.new {
      h.render inline: <<-HAML , type: :haml , locals: { model_name: @model_name }
%div{ class: [ :model_name , :text_en ] }<
  = "Model: " + model_name
      HAML
    }
  end

  def link_for_page_on_the_same_category?
    nil
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/app/renderer/document/link.rb