Class: ODDB::Html::View::Drugs::Init

Inherits:
Template
  • Object
show all
Defined in:
lib/oddb/html/view/drugs/init.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => :head,
  [0,1] => :sidebar_left,
  [0,2] => :sidebar_right,
  [0,3] => :content,  
  [0,4] => NavigationFoot,  
  [0,5] => :foot,
}
CONTENT =
Search
CSS_MAP =
{ 1 => 'sidebar lefthand', 2 => 'sidebar righthand' }
CSS_ID_MAP =
{ 0 => 'head', 3 => 'home-search', 
4 => 'navigation', 5 => 'foot' }
HEAD =
WelcomeHead

Constants inherited from Template

Template::DOJO_DEBUG, Template::DOJO_PARSE_WIDGETS, Template::DOJO_REQUIRE, Template::FOOT, Template::HTTP_HEADERS

Instance Method Summary collapse

Methods inherited from Template

#_title, #css_links, #title

Instance Method Details

#other_html_headers(context) ⇒ Object



37
38
39
40
41
42
43
44
45
46
# File 'lib/oddb/html/view/drugs/init.rb', line 37

def other_html_headers(context)
  headers = super 
  if(@lookandfeel.enabled?(:feedback_rss))
    url = [ 'http:/', @session.server_name, 'rss', 
            @session.language, "feedback.rss" ].join('/')
    headers << context.link(:href => url, :type => "application/rss+xml",
                            :title => 'feedback.rss', :rel => "alternate")
  end
  headers
end


27
28
29
30
31
# File 'lib/oddb/html/view/drugs/init.rb', line 27

def sidebar_left(model)
  if(@lookandfeel.enabled?(:google_ads) && !@session.logged_in?)
    GoogleAds.new 
  end
end


32
33
34
35
36
# File 'lib/oddb/html/view/drugs/init.rb', line 32

def sidebar_right(model)
  if(@lookandfeel.enabled?(:feedback_rss))
    RssFeedbacks.new ODDB::Util::Feedback.newest, @session, self
  end
end