Sha256: cffea2d48fff2e965e229bb5ca1a5307bb1583b45928c7e38e4be2a087e95c53

Contents?: true

Size: 745 Bytes

Versions: 1

Compression:

Stored size: 745 Bytes

Contents

#!/usr/bin/env ruby
# Html::View::DownloadExport -- de.oddb.org -- 29.07.2008 -- hwyss@ywesee.com

require 'htmlgrid/component'
require 'oddb/export/csv'

module ODDB
  module Html
    module View
      module Drugs
class DownloadExport < HtmlGrid::Component
  def http_headers
    {
      "Content-Type"        => "text/csv",
      "Cache-Control"       => "no-cache, max-age=3600, must-revalidate",
      "Content-Disposition" => "attachment; filename=#{@model.filename}",
      "Refresh"             => "0; URL=#{@lookandfeel._event_url(:home)}",
    }
  end
  def to_html(context)
    Export::Csv::Packages.export @model, @lookandfeel.csv_components, 
                                 @session.language
  end
end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ramaze.ch.oddb.org-1.0.0 lib/oddb/html/view/drugs/download_export.rb