Class: ODDB::View::User::InvalidUserComposite

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

Constant Summary

CSS_CLASS =
'composite'
COMPONENTS =
{
  [0,0] =>  'invalid_user_welcome',
  [0,1] =>  :invalid_user_explain,
  #[0,1,1] => :renew_poweruser,
  [0,2] =>  View::LimitForm,
}
CSS_MAP =
{
  [0,0] =>  'th',
  [0,1] =>  'list',
}
LEGACY_INTERFACE =
false

Instance Method Summary (collapse)

Methods inherited from HtmlGrid::Composite

event_link, #hash_insert_col, #hash_insert_row

Instance Method Details

- (Object) invalid_user_explain(model)



23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'src/view/user/invalid_user.rb', line 23

def invalid_user_explain(model)
  lkey = 'query_limit_poweruser_'
  user = @session.user
  salutation = name_first = name_last = ''
  if(user.is_a?(YusUser))
    lkey += user.poweruser_duration.to_s
    salutation = @lookandfeel.lookup(user.salutation)
    name_first = user.name_first
    name_last = user.name_last
  end
  usertype = @lookandfeel.lookup(lkey)
  @lookandfeel.lookup(:invalid_user_explain, 
    salutation, name_first, name_last, usertype)
end

- (Object) renew_poweruser(model)



37
38
39
40
41
42
43
44
# File 'src/view/user/invalid_user.rb', line 37

def renew_poweruser(model)
  link = HtmlGrid::Link.new(:renew_poweruser, model, @session, self)
  args = {
    :pointer =>  @session.user.pointer,
  }
  link.href = @lookandfeel._event_url(:renew_poweruser, args)
  link
end