Class: ODDB::View::FeedbackList

Inherits:
HtmlGrid::List show all
Defined in:
src/view/feedbacks.rb

Direct Known Subclasses

Drugs::FeedbackList, Migel::FeedbackList

Constant Summary

COLSPAN_MAP =
{
  [0,0] =>  2,
}
CSS_MAP =
{
  [0,0,2,7] =>  'list top',
  [0,3,1,4] =>  'list bold',
}
SYMBOL_MAP =
{ 
  :email_label          => HtmlGrid::LabelText,
  :message_label        =>  HtmlGrid::LabelText,
}
DEFAULT_CLASS =
HtmlGrid::Value
OMIT_HEADER =
true
OFFSET_STEP =
[0,7]
BACKGROUND_SUFFIX =
' bg'
SORT_DEFAULT =
nil

Constants inherited from HtmlGrid::List

BACKGROUND_SUFFIX

Instance Method Summary (collapse)

Instance Method Details

- (Object) experience(model, session)



122
123
124
# File 'src/view/feedbacks.rb', line 122

def experience(model, session)
  result(model.experience)
end

- (Object) helps(model, session)



138
139
140
# File 'src/view/feedbacks.rb', line 138

def helps(model, session)
  result(model.helps)
end

- (Object) impression(model, session)



135
136
137
# File 'src/view/feedbacks.rb', line 135

def impression(model, session)
  result(model.impression)
end

- (Object) recommend(model, session)



132
133
134
# File 'src/view/feedbacks.rb', line 132

def recommend(model, session)
  result(model.recommend)
end

- (Object) result(bool)



141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'src/view/feedbacks.rb', line 141

def result(bool)
  div = HtmlGrid::Div.new(bool, @session, self)
  css = 'square '
  if(bool)
    div.value = '+'
    css << 'plus'
  else
    div.value = '-'
    css << 'minus'
  end
  div.css_class = css
  div
end

- (Object) show_email(model, session)



125
126
127
128
129
130
131
# File 'src/view/feedbacks.rb', line 125

def show_email(model, session)
  if(model.show_email)
    model.
  else
    @lookandfeel.lookup(:email_text)
  end
end

- (Object) time(model, session)



154
155
156
# File 'src/view/feedbacks.rb', line 154

def time(model, session)
  model.time.strftime(@lookandfeel.lookup(:time_format))
end