Class: Ecm::Downloads::DownloadCategoryDecorator
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- Ecm::Downloads::DownloadCategoryDecorator
- Defined in:
- app/decorators/ecm/downloads/download_category_decorator.rb
Instance Method Summary collapse
- #display_code ⇒ Object
- #ecm_downloads_downloads_count_label ⇒ Object
- #index_name ⇒ Object
- #locale_label ⇒ Object
- #tree_name ⇒ Object
Instance Method Details
#display_code ⇒ Object
5 6 7 |
# File 'app/decorators/ecm/downloads/download_category_decorator.rb', line 5 def display_code "<%= render_download_category '#{name}' %>" end |
#ecm_downloads_downloads_count_label ⇒ Object
9 10 11 |
# File 'app/decorators/ecm/downloads/download_category_decorator.rb', line 9 def ecm_downloads_downloads_count_label h.content_tag(:span, ecm_downloads_downloads_count, class: 'badge') end |
#index_name ⇒ Object
21 22 23 24 25 26 27 |
# File 'app/decorators/ecm/downloads/download_category_decorator.rb', line 21 def index_name if self.root? "[#{locale}] #{name}" else "#{'    ' * level} |-- #{name}".html_safe end end |
#locale_label ⇒ Object
13 14 15 |
# File 'app/decorators/ecm/downloads/download_category_decorator.rb', line 13 def locale_label h.content_tag(:span, locale, class: 'label label-default') end |
#tree_name ⇒ Object
17 18 19 |
# File 'app/decorators/ecm/downloads/download_category_decorator.rb', line 17 def tree_name name end |