Module: ContentViewHelper

Defined in:
app/helpers/content_view_helper.rb

Instance Method Summary collapse

Instance Method Details

#full_title_for(content) ⇒ Object



2
3
4
# File 'app/helpers/content_view_helper.rb', line 2

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

#short_title_for(content) ⇒ Object



6
7
8
# File 'app/helpers/content_view_helper.rb', line 6

def short_title_for(content)
  content.name
end

#show_content?(content) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/helpers/content_view_helper.rb', line 10

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

#show_content_element?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/helpers/content_view_helper.rb', line 14

def show_content_element?
  current_access_mode.show_content_element?
end