Module: Boxroom::FoldersHelper
- Included in:
- Boxroom::Folder::Cell::Show
- Defined in:
- app/helpers/boxroom/folders_helper.rb
Instance Method Summary collapse
Instance Method Details
#breadcrumbs(folder, breadcrumbs = '') ⇒ Object
3 4 5 6 7 |
# File 'app/helpers/boxroom/folders_helper.rb', line 3 def (folder, = '') = "<li>#{link_to(folder.parent.name, folder.parent)}</li> #{}" = (folder.parent, ) unless folder.parent == Folder.root .html_safe end |
#file_icon(extension) ⇒ Object
9 10 11 12 13 14 15 |
# File 'app/helpers/boxroom/folders_helper.rb', line 9 def file_icon(extension) if extension && FileTest.exists?(Rails.root.join('app', 'assets', 'images', 'fileicons', "#{extension.downcase}.png")) "boxroom/fileicons/#{extension.downcase}.png" else 'boxroom/file.png' end end |