diff --git a/src/custom/lookandfeelwrapper.rb b/src/custom/lookandfeelwrapper.rb index 9ac7fb1..77b9644 100644 --- a/src/custom/lookandfeelwrapper.rb +++ b/src/custom/lookandfeelwrapper.rb @@ -786,6 +786,7 @@ module ODDB :explain_sort, :compare_backbutton, :custom_tab_navigation, + :ddd_chart, :external_css, :ajax, :home_drugs, @@ -793,6 +794,7 @@ module ODDB :faq_link, :patinfos, :sequences, + :price_history, :ywesee_contact, ] DISABLED = [ :atc_ddd, :legal_note, :navigation, :price_request ] @@ -835,6 +837,14 @@ module ODDB [8,0] => :deductible, } end + PH_END = Date.new(2010,4,10) + def enabled?(event, default=false) + if event == :price_history && @@today < PH_END + true + else + super + end + end def explain_result_components { [0,1] => :explain_original, diff --git a/src/util/exporter.rb b/src/util/exporter.rb index 23571e2..1935ce2 100644 --- a/src/util/exporter.rb +++ b/src/util/exporter.rb @@ -53,9 +53,11 @@ module ODDB export_doc_csv export_index_therapeuticus_csv export_price_history_csv +=begin # inoperable atm. run_on_monthday(1) { export_fachinfo_pdf } +=end nil end def export_helper(name) diff --git a/src/util/persistence.rb b/src/util/persistence.rb index 3fa6645..b1eabad 100644 --- a/src/util/persistence.rb +++ b/src/util/persistence.rb @@ -4,6 +4,10 @@ require 'rockit/rockit' require 'odba' +class Hash + alias :key :index +end + module ODBA class Stub def odba_replace(name=nil) diff --git a/src/util/session.rb b/src/util/session.rb index 85e5176..f4bedb3 100644 --- a/src/util/session.rb +++ b/src/util/session.rb @@ -16,6 +16,7 @@ module ODDB DEFAULT_LANGUAGE = "de" DEFAULT_STATE = State::Drugs::Init DEFAULT_ZONE = :drugs + EXPIRES = 30 * 60 SERVER_NAME = 'www.oddb.org' PERSISTENT_COOKIE_NAME = 'oddb-preferences' QUERY_LIMIT = 5 diff --git a/src/view/drugs/price_history.rb b/src/view/drugs/price_history.rb index 533c927..dda7944 100644 --- a/src/view/drugs/price_history.rb +++ b/src/view/drugs/price_history.rb @@ -56,7 +56,7 @@ class PriceHistoryList < HtmlGrid::List end def origins(model) collect_data(model, :origin).inject([]) do |memo, url_and_date| - url, date = url_and_date.split(' ') + url, date = url_and_date.to_s.split(' ') link = HtmlGrid::Link.new :origin, model, @session, self if match = /#{ODDB.config.bsv_archives}/u.match(url) url = "http://bag.e-mediat.net/SL2007.WEb.external/BSV_xls_20#{match[1]}.zip"