Class: ODDB::Html::View::PayPal::ReturnDownloads

Inherits:
HtmlGrid::List
  • Object
show all
Defined in:
lib/oddb/html/view/paypal/collect.rb

Constant Summary collapse

COMPONENTS =
{
	[0,0]	=>	:download_link	
}
LEGACY_INTERFACE =
false
OMIT_HEADER =
true
STRIPED_BG =
false

Instance Method Summary collapse

Instance Method Details



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/oddb/html/view/paypal/collect.rb', line 18

def download_link(model)
	if(model.expired?)
		time = model.expiry_time
		timestr = (time) \
			? time.strftime(@lookandfeel.lookup(:time_format_long)) \
			: @lookandfeel.lookup(:paypal_e_invalid_time)
		@lookandfeel.lookup(:paypal_e_expired, model.text, timestr)
   elsif(@session.allowed?('view', ODDB.config.auth_domain))
     @lookandfeel.lookup(:paypal_explain_poweruser)
   else
		link = HtmlGrid::Link.new(:paypal_explain_login1, model, @session, self)
		link.href = @lookandfeel._event_url(:login)
     [ 
       @lookandfeel.lookup(:paypal_explain_login0),  
       link, 
       @lookandfeel.lookup(:paypal_explain_login2),  
     ]
	end
end