Class: ODDB::View::User::FiPiOfferInputComposite

Inherits:
HtmlGrid::Composite show all
Defined in:
src/view/user/fipi_offer_input.rb

Constant Summary

COMPONENTS =
{
  [0,0,0] =>  'fipi_offer_input',
  [0,0,1] =>  :amzv_link,
  [0,0,2] =>  'comma_separator',
  [0,0,3] =>  :amzv_article13_link,
  [0,0,4] =>  'nbsp_and_nbsp',
  [0,0,5] =>  :amzv_article14_link,
  [0,0,6] =>  'point',
  [0,1]   => :fipi_offer_input_explanation,
  [0,2] =>    :pi_upload_link,
  [0,3] =>    :fi_upload_link,
  [0,4]   => View::User::FiPiOfferInputForm,
}
CSS_CLASS =
'composite'
CSS_MAP =
{
  [0,0] =>  'th',
  [0,1] =>  'list',
  [0,2] =>  'list',
  [0,3] =>  'list',
}
DEFAULT_CLASS =
HtmlGrid::Value

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details



170
171
172
173
174
175
176
# File 'src/view/user/fipi_offer_input.rb', line 170

def amzv_article13_link(model, session)
  link = HtmlGrid::Link.new(:azmv_article13, model, session, self)
  link.href = @lookandfeel.lookup(:amzv_article13_href)
  link.value = @lookandfeel.lookup(:amzv_article13)
  link.set_attribute('class', 'th')
  link
end


177
178
179
180
181
182
183
# File 'src/view/user/fipi_offer_input.rb', line 177

def amzv_article14_link(model, session)
  link = HtmlGrid::Link.new(:azmv_article14, model, session, self)
  link.href = @lookandfeel.lookup(:amzv_article14_href)
  link.value = @lookandfeel.lookup(:amzv_article14)
  link.set_attribute('class', 'th')
  link
end


163
164
165
166
167
168
169
# File 'src/view/user/fipi_offer_input.rb', line 163

def amzv_link(model, session)
  link = HtmlGrid::Link.new(:azmv, model, session, self)
  link.href = @lookandfeel.lookup(:amzv_href)
  link.value = @lookandfeel.lookup(:amzv)
  link.set_attribute('class', 'th')
  link
end


190
191
192
193
194
195
# File 'src/view/user/fipi_offer_input.rb', line 190

def create_link(text_key, href)
  link = HtmlGrid::Link.new(text_key, @model, @session, self)
  link.href = href
  link.set_attribute('class', 'list')
  link
end


187
188
189
# File 'src/view/user/fipi_offer_input.rb', line 187

def fi_upload_link(model, session)
  create_link(:fi_upload_link, 'http://wiki.oddb.org/wiki.php?pagename=ODDB.Fi-Upload')
end

- (Object) fipi_offer_input_explanation(model, session)



196
197
198
199
200
201
202
203
204
205
206
# File 'src/view/user/fipi_offer_input.rb', line 196

def fipi_offer_input_explanation(model, session)
  text = HtmlGrid::RichText.new(model, session, self)
  link = HtmlGrid::Link.new(:ywesee, model, session, self)
  link.href = @lookandfeel.lookup(:fipi_cost_link)
  link.value = @lookandfeel.lookup(:ywesee)
  link.set_attribute('class', 'list')
  text << @lookandfeel.lookup(:fipi_offer_input_explanation0)
  text << link
  text << @lookandfeel.lookup(:fipi_offer_input_explanation1)
  text
end


184
185
186
# File 'src/view/user/fipi_offer_input.rb', line 184

def pi_upload_link(model, session)
  create_link(:pi_upload_link, 'http://wiki.oddb.org/wiki.php?pagename=ODDB.Pi-Upload')
end