Class: ODDB::Html::View::Drugs::FeedbackComposite

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Includes:
Drugs::PackageMethods, Snapback
Defined in:
lib/oddb/html/view/drugs/feedback.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => :snapback, 
  [0,1] => InlineSearch, 
  [0,2] => :feedback_for,
  [0,3] => :feedbacks,
  [0,4] => :feedback_form,
}
CSS_ID_MAP =
[ 'snapback', 'result-search', 'title', 'feedbacks' ]
CSS_MAP =
{ 
  0 => 'before-searchbar', 
  3 => 'mezzo righthand', 
  4 => 'mezzo lefthand', 
}

Instance Method Summary collapse

Methods included from Snapback

#snapback

Instance Method Details

#feedback_for(model) ⇒ Object



215
216
217
218
219
220
221
# File 'lib/oddb/html/view/drugs/feedback.rb', line 215

def feedback_for(model)
  if size = size(model)
    @lookandfeel.lookup(:feedback_for, model.name, size)
  else
    @lookandfeel.lookup(:feedback_for_sequence, model.name)
  end
end

#feedback_form(model) ⇒ Object



222
223
224
# File 'lib/oddb/html/view/drugs/feedback.rb', line 222

def feedback_form(model)
  FeedbackForm.new(model.current, @session, self)
end

#feedbacks(model) ⇒ Object



212
213
214
# File 'lib/oddb/html/view/drugs/feedback.rb', line 212

def feedbacks(model)
  FeedbackList.new(model.feedbacks.reverse, @session, self)
end