Class: ODDB::View::Migel::CenteredSearchComposite

Inherits:
CenteredSearchComposite show all
Defined in:
src/view/migel/centeredsearchform.rb

Constant Summary

COMPONENTS =
{ 
  [0,0]   => :language_chooser,
  [0,1]   => View::CenteredSearchForm,
  [0,2]   => 'migel_search_explain', 
  [0,3]   => View::CenteredNavigation,
  [0,4,0] =>  'download_migel0',
  [0,4,1] =>  :download_migel,
  [0,4,2] =>  'download_migel2',
  [0,5,0] =>  :migel_count,
  [0,5,1] =>  'migel_count_text',
  [0,5,2] =>  'comma_separator',
  [0,5,6] =>  'database_last_updated_txt',
  [0,5,7] =>  :database_last_updated,
  [0,6]   => :legal_note,
  [0,7]   => :paypal,
}
CSS_MAP =
{
  [0,0,1,8]   => 'list center',
}
COMPONENT_CSS_MAP =
{ }

Constants inherited from CenteredSearchComposite

COMPONENTS, COMPONENT_CSS_MAP, CSS_CLASS, CSS_MAP, HTML_ATTRIBUTES, SYMBOL_MAP

Instance Method Summary (collapse)

Methods inherited from CenteredSearchComposite

#atc_chooser, #atc_ddd_size, #beta, #database_last_updated, #database_size, #ddd_count_text, #divider, #download_ebook, #download_export, #download_generics, #export_divider, #fachinfo_size, #fipi_offer, #interactions, #limitation_size, #mailinglist, #narcotics_size, #new_feature, #patinfo_size, #paypal, #plugin, #recent_registrations, #vaccines_size

Methods included from UserSettings

#language_chooser, #language_chooser_short

Methods included from ExternalLinks

#contact_link, #data_declaration, #external_link, #faq_link, #generic_definition, #help_link, #legal_note, #meddrugs_update, #wiki_link

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) download_migel(model, session)



59
60
61
62
63
# File 'src/view/migel/centeredsearchform.rb', line 59

def download_migel(model, session)
  link = HtmlGrid::Link.new(:download_migel1, model, session, self)
  link.href = @lookandfeel._event_url(:download_export)
  link
end

- (Object) init



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'src/view/migel/centeredsearchform.rb', line 31

def init
  if(@lookandfeel.enabled?(:just_medical_structure, false))
    @components = {
      [0,0]   => :language_chooser,
      [0,1]   => View::CenteredSearchForm,
      [0,2]   => 'migel_search_explain', 
    }
    @css_map = { [0,0,1,3] => 'center' }
  elsif(@lookandfeel.enabled?(:atupri_web, false))
    @components = {
      [0,0]   => View::CenteredSearchForm,
      [0,1]   => 'migel_search_explain', 
      [0,2,0] =>  'download_migel0',
      [0,2,1] =>  :download_migel,
      [0,2,2] =>  'download_migel2',
      [0,3,0] =>  :migel_count,
      [0,3,1] =>  'migel_count_text',
      [0,3,2] =>  'comma_separator',
      [0,3,6] =>  'database_last_updated_txt',
      [0,3,7] =>  :database_last_updated,
    }
    @css_map = { [0,0,1,4] => 'center' }
  end
  super
end

- (Object) migel_count(model, session)



56
57
58
# File 'src/view/migel/centeredsearchform.rb', line 56

def migel_count(model, session)
  @session.migel_count.to_s << '&nbsp;'
end