Class: Ecm::Downloads::DownloadDecorator
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- Ecm::Downloads::DownloadDecorator
- Defined in:
- app/decorators/ecm/downloads/download_decorator.rb
Instance Method Summary collapse
- #display_code ⇒ Object
- #ecm_downloads_downloads_count_label ⇒ Object
- #filesize ⇒ Object
- #locale_label ⇒ Object
- #tree_name ⇒ Object
Instance Method Details
#display_code ⇒ Object
21 22 23 |
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 21 def display_code "<%= render_download '#{name}' %>" end |
#ecm_downloads_downloads_count_label ⇒ Object
5 6 7 |
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 5 def ecm_downloads_downloads_count_label h.content_tag(:span, ecm_downloads_downloads_count, class: 'badge') end |
#filesize ⇒ Object
9 10 11 |
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 9 def filesize h.number_to_human_size(asset_file_size) end |
#locale_label ⇒ Object
13 14 15 |
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 13 def locale_label h.content_tag(:span, locale, class: 'label label-info') end |
#tree_name ⇒ Object
17 18 19 |
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 17 def tree_name name end |