Module: Card::Set::All::History::Views::HtmlFormat

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

Instance Method Summary collapse

Instance Method Details

#view: actObject



18
19
20
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 18

view :act, cache: :never do
  act_listing act_from_context
end

#view: act_legendObject



22
23
24
25
26
27
28
29
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 22

view :act_legend do
  bs_layout do
    row md: [12, 12], lg: [7, 5], class: "pb-3" do
      col action_legend
      col content_legend, class: "text-end"
    end
  end
end

#view: action_expandedObject



39
40
41
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 39

view :action_expanded do
  action_content action_from_context, :expanded
end

#view: action_summaryObject



35
36
37
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 35

view :action_summary do
  action_content action_from_context, :summary
end

#view: changeObject



43
44
45
46
47
48
49
50
51
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 43

view :change do
  voo.show :title_link
  voo.hide :menu
  wrap do
    [_render_title,
     _render_menu,
     _render_last_action]
  end
end

#view: draft_legendObject



31
32
33
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 31

view :draft_legend do
  "#{action_icon(:draft)} unsaved draft"
end

#view: historyObject

why no cache?



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

view :history, cache: :never do # why no cache?
  frame do
    class_up "d0-card-body",  "history-slot"
    relative_history
  end
end

#view: last_actionObject



53
54
55
56
57
58
59
60
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 53

view :last_action do
  %(
    <span class="last-update">
      #{render_last_action_verb} #{render_acted_at} ago by
      #{nest card.last_actor, view: :link}
    </span>
  )
end

#view: last_action_verbObject



62
63
64
65
66
67
68
69
70
71
72
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history/views.rb', line 62

view :last_action_verb, cache: :never do
  return unless (act = card.last_act)
  return unless (action = act.action_on card.id)

  case action.action_type
  when :create then "added"
  when :delete then "deleted"
  else
    link_to_view :history, "edited", class: "last-edited", rel: "nofollow"
  end
end