Class: ODDB::View::Rss::FeedbackTemplate

Inherits:
HtmlGrid::Template
  • Object
show all
Defined in:
src/view/rss/feedback.rb

Constant Summary

LEGACY_INTERFACE =
false
COMPONENTS =
{
  [0,0] => :feedback, 
  [0,1] => :feedback_feed_link,
}
CSS_MAP =
{
  [0,1] => 'list',
}

Instance Method Summary (collapse)

Instance Method Details

- (Object) feedback(model)



21
22
23
24
25
26
27
28
29
# File 'src/view/rss/feedback.rb', line 21

def (model)
  view = case model.item.odba_instance
         when ODDB::Package
           View::Drugs::FeedbackList
         when ODDB::Migel::Product
           View::Migel::FeedbackList
         end
  view.new([model], @session, self)
end


30
31
32
33
34
35
# File 'src/view/rss/feedback.rb', line 30

def (model)
  link = HtmlGrid::Link.new(:feedback_feed_link, model, @session, self)
  link.href = @lookandfeel._event_url(:feedbacks, 
                                      :pointer => model.item.pointer)
  link
end