Class: ODDB::Html::View::LimitComposite

Inherits:
HtmlGrid::DivComposite
  • Object
show all
Defined in:
lib/oddb/html/view/limit.rb

Constant Summary collapse

COMPONENTS =
{
  [0,0] => InlineSearch, 
  [0,1] => :query_limit,
  [0,2] => 'query_limit_welcome',
  [0,2] => 'query_limit_new_user',
  [1,2] => :query_limit_more_info,
  [0,3] => :query_limit_explain,
  [0,4] => 'query_limit_poweruser',
  [0,5] =>  LimitForm,
  [0,6] => 'query_limit_login',
  [0,7] => LoginForm,
  [0,8] => 'query_limit_thanks',
  [0,9] => 'query_limit_thanks0',
  [1,9] => :query_limit_email,
  [2,9] => 'query_limit_thanks1',
}
CSS_ID_MAP =
['result-search', 'title']
CSS_MAP =
{ 1 => 'heading', 2 => 'divider', 3 => 'explain',
4 => 'explain', 6 => 'divider', 8 => 'divider', 9 => 'explain' }

Instance Method Summary collapse

Instance Method Details

#query_limit(model) ⇒ Object



79
80
81
# File 'lib/oddb/html/view/limit.rb', line 79

def query_limit(model)
  @lookandfeel.lookup(:query_limit, ODDB.config.query_limit)
end

#query_limit_download(model) ⇒ Object



82
83
84
85
86
87
# File 'lib/oddb/html/view/limit.rb', line 82

def query_limit_download(model)
  link = HtmlGrid::Link.new(:query_limit_download, 
    model, @session, self)
  link.value = link.href = @lookandfeel._event_url(:download_export)
  link
end

#query_limit_email(model) ⇒ Object



88
89
90
91
92
93
# File 'lib/oddb/html/view/limit.rb', line 88

def query_limit_email(model)
  link = HtmlGrid::Link.new(:ywesee_contact_email, 
    model, @session, self)
  link.href = @lookandfeel.lookup(:ywesee_contact_href)
  link
end

#query_limit_explain(model) ⇒ Object



94
95
96
97
# File 'lib/oddb/html/view/limit.rb', line 94

def query_limit_explain(model)
  @lookandfeel.lookup(:query_limit_explain, @session.remote_ip,
                      ODDB.config.query_limit)
end

#query_limit_more_info(model) ⇒ Object



98
99
100
101
102
# File 'lib/oddb/html/view/limit.rb', line 98

def query_limit_more_info(model)
  link = HtmlGrid::Link.new(:query_limit_more_info, model, @session, self)
  link.href = "http://wiki.oddb.org/wiki.php/Main/DeODDB"
  link
end