Module: DownloadsHelper

Defined in:
vendor/plugins/hydra_repository/app/helpers/downloads_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) list_downloadables(datastreams, mime_types = ["application/pdf"])



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'vendor/plugins/hydra_repository/app/helpers/downloads_helper.rb', line 3

def list_downloadables( datastreams, mime_types=["application/pdf"])
  result = "<ul>" 
         
  datastreams.each_value do |ds|
    result << "<li>"
    result << link_to(ds.label, asset_downloads_path(ds.pid, :download_id=>ds.dsid))
    # if editor?
    #   result << " <span>#{ds.attributes["mimeType"]}</span>"
    # end
    result << "</li>"     
  end
      
  result << "</ul>"
  return result
end