Class: Wallaby::Resources::Index::DaterangeHtml

Inherits:
Cell
  • Object
show all
Defined in:
app/views/wallaby/resources/index/daterange_html.rb

Overview

Html cell

Direct Known Subclasses

TsrangeHtml, TstzrangeHtml

Instance Method Summary collapse

Instance Method Details

#renderString

Returns:

  • (String)


9
10
11
12
13
14
15
16
17
18
# File 'app/views/wallaby/resources/index/daterange_html.rb', line 9

def render
  if value.nil?
    null
  else
    concat (:span, I18n.l(value.first, format: :short), class: 'from')
    concat '...'
    concat (:span, I18n.l(value.last, format: :short), class: 'to')
    itooltip "#{I18n.l value.first} ... #{I18n.l value.last}", 'time'
  end
end