Class: Ecm::Downloads::DownloadDecorator

Inherits:
Draper::Decorator
  • Object
show all
Defined in:
app/decorators/ecm/downloads/download_decorator.rb

Instance Method Summary collapse

Instance Method Details

#display_codeObject



21
22
23
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 21

def display_code
  "<%= render_download '#{name}' %>"
end

#ecm_downloads_downloads_count_labelObject



5
6
7
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 5

def ecm_downloads_downloads_count_label
  h.(:span, ecm_downloads_downloads_count, class: 'badge')
end

#filesizeObject



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_labelObject



13
14
15
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 13

def locale_label
  h.(:span, locale, class: 'label label-info')
end

#tree_nameObject



17
18
19
# File 'app/decorators/ecm/downloads/download_decorator.rb', line 17

def tree_name
  name
end