Class: Pageflow::Admin::Timestamp

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/timestamp.rb

Overview

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

#build(time) ⇒ Object

Since:

  • 12.2



6
7
8
9
10
11
12
13
# File 'app/views/components/pageflow/admin/timestamp.rb', line 6

def build(time)
  if time
    span class: 'tooltip_clue' do
      text_node(l(time, format: time.today? ? :time_today : :date))
      span(l(time, format: :long), class: 'tooltip_bubble')
    end
  end
end

#tag_nameObject

Since:

  • 12.2



15
16
17
# File 'app/views/components/pageflow/admin/timestamp.rb', line 15

def tag_name
  'span'
end