Module: Card::Set::All::HistoryBoard::HtmlFormat

Extended by:
Card::Set::AbstractFormat
Defined in:
platypus/tmp/set/gem-defaults/mod015-history/all/history_board.rb

Instance Method Summary collapse

Instance Method Details

#acts_board_layout(acts, context = :board) ⇒ Object



35
36
37
38
39
40
41
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_board.rb', line 35

def acts_board_layout acts, context=:board
  output [
    _render_creator_credit,
    act_link_list(acts, context),
    act_paging(acts, context)
  ]
end

#view: board_actObject



25
26
27
28
29
30
31
32
33
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_board.rb', line 25

view :board_act, cache: :never do
  opts = act_listing_opts_from_params(nil)
  act = act_from_context
  ar = act_renderer(:board).new(self, act, opts)
  class_up "action-list", "my-3"
  wrap_with_overlay title: ar.overlay_title, slot: breadcrumb_data("History") do
    act_listing(act, opts[:act_seq], :board)
  end
end

#view: creator_creditObject



9
10
11
12
13
14
15
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_board.rb', line 9

view :creator_credit,
     wrap: { div: { class: "text-muted creator-credit" } }, cache: :never do
  return "" unless card.real?

  "Created by #{nest card.creator, view: :link} "\
  "#{time_ago_in_words(card.created_at)} ago"
end

#view: updated_byObject



17
18
19
20
21
22
23
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_board.rb', line 17

view :updated_by, wrap: { div: { class: "text-muted" } } do
  updaters = Card.search(updater_of: { id: card.id }) if card.id
  return "" unless updaters.present?

  links = updater_links updaters, others_target: card.fetch(:editors)
  "Updated by #{links}"
end