Class: ODDB::View::Interactions::ResultForm

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

Overview

class User < SBSM::KnownUser; end class UnknownUser < SBSM::UnknownUser; end class AdminUser < View::Drugs::User; end class CompanyUser < View::Drugs::User; end

Constant Summary

COLSPAN_MAP =
{
  [0,2] => 2,
  [0,3] => 2,
}
COMPONENTS =
{
  [0,0]   => :title_found,
  [0,1]   => 'add_to_interaction',
  [1,1,0] =>  :search_query,
  [1,1,1] =>  :submit,
  [0,2]   => View::Interactions::ResultList,
  [0,3]   => :interaction_basket,
}
CSS_CLASS =
'composite'
EVENT =
:search
FORM_METHOD =
'GET'
SYMBOL_MAP =
{
  :search_query   => View::SearchBar,  
}
CSS_MAP =
{
  [0,0] =>  'result-found',
  [0,1] =>  'list',
  [1,1] =>  'search',  
  [0,3] =>  'list bg', 
}

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) interaction_basket(model, session)



42
43
44
45
# File 'src/view/interactions/result.rb', line 42

def interaction_basket(model, session)
  get_event_button(:interaction_basket, 
                   :substance_ids => @session.interaction_basket_ids)
end


46
47
48
49
50
51
# File 'src/view/interactions/result.rb', line 46

def interaction_basket_link(model, session)
  link = HtmlGrid::Link.new(:interaction_basket, model, session, self)
  link.href = @session.interaction_basket_link
  link.label = true
  link
end

- (Object) title_found(model, session)



52
53
54
55
# File 'src/view/interactions/result.rb', line 52

def title_found(model, session)
  query = session.persistent_user_input(:search_query)
  @lookandfeel.lookup(:title_found, query, session.state.object_count)
end