Class: ODDB::View::Interactions::BasketForm

Inherits:
Form
  • Object
show all
Defined in:
src/view/interactions/basket.rb

Constant Summary

COLSPAN_MAP =
{
  [0,0] =>  2,
  [0,2] =>  2,
  [0,3] =>  2,
  [0,4] =>  2,
}
COMPONENTS =
{
  [0,0]   => :interaction_basket_count,
  [0,1,0] =>  'interaction_basket_explain',
  [0,1,1] =>  :pub_med_search_link,
  [1,1,0] =>  :search_query,
  [1,1,1] =>  :submit,
  [0,2]   => View::Interactions::BasketSubstrates,
  [0,3]   => :clear_interaction_basket,
  [0,4]   =>  ExplainResult,
}
CSS_CLASS =
'composite'
EVENT =
:search
FORM_METHOD =
'GET'
SYMBOL_MAP =
{
  :search_query   => View::SearchBar,  
}
COMPONENT_CSS_MAP =
{
  [0,4] =>  'explain',
}
CSS_MAP =
{
  [0,0] =>  'result-found',
  [0,1] =>  'list',
  [1,1] =>  'search',  
  [0,3] =>  'list bg',
  [0,4] =>  'explain',
}

Constants included from FormMethods

ACCEPT_CHARSET, DEFAULT_CLASS, EVENT

Instance Method Summary (collapse)

Methods included from FormMethods

#delete_item, #delete_item_warn, #get_event_button, #post_event_button

Instance Method Details

- (Object) clear_interaction_basket(model, session)



257
258
259
# File 'src/view/interactions/basket.rb', line 257

def clear_interaction_basket(model, session)
  get_event_button(:clear_interaction_basket)
end

- (Object) interaction_basket_count(model, session)



246
247
248
249
# File 'src/view/interactions/basket.rb', line 246

def interaction_basket_count(model, session)
  count = session.interaction_basket_count
  @lookandfeel.lookup(:interaction_basket_count, count)
end


250
251
252
253
254
255
256
# File 'src/view/interactions/basket.rb', line 250

def pub_med_search_link(model, session)
  link = HtmlGrid::Link.new(:pub_med, @model, @session, self)
  link.css_class = 'list'
  link.target = '_blank'
  link.href = 'http://www.pubmedcentral.nih.gov/'
  link
end