Sha256: f253e082c503ba68558cb349b23d9fc7c18865972495e0547976b42db61d2bcf

Contents?: true

Size: 523 Bytes

Versions: 16

Compression:

Stored size: 523 Bytes

Contents

module ContentViewHelper
  def full_title_for(content)
    "#{t(content_type_number(content), number: content.number)}: #{content.name}"
  end

  def short_title_for(content)
    content.name
  end

  def show_content?(content)
    current_access_mode.show_content?(content)
  end

  def show_content_element?
    current_access_mode.show_content_element?
  end

  private

  def content_type_number(content)
    "#{content_type(content)}_number"
  end

  def content_type(content)
    content.model_name.element
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.22.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.21.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.20.1 app/helpers/content_view_helper.rb
mumuki-laboratory-9.20.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.19.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.18.1 app/helpers/content_view_helper.rb
mumuki-laboratory-9.18.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.17.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.16.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.15.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.14.1 app/helpers/content_view_helper.rb
mumuki-laboratory-9.14.0 app/helpers/content_view_helper.rb
mumuki-laboratory-9.13.2 app/helpers/content_view_helper.rb
mumuki-laboratory-9.13.1 app/helpers/content_view_helper.rb
mumuki-laboratory-9.13.0 app/helpers/content_view_helper.rb