Module: Card::Set::All::HistoryBridge::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb
Instance Method Summary collapse
-
#act_link_list(acts, context) ⇒ Object
-
#act_link_list_item(act, seq = nil, _context = nil) ⇒ Object
-
#act_list_group(acts, context, &block) ⇒ Object
-
#acts_bridge_layout(acts, context = :bridge) ⇒ Object
-
#view: bridge_act ⇒ Object
-
#view: creator_credit ⇒ Object
-
#view: updated_by ⇒ Object
Instance Method Details
#act_link_list(acts, context) ⇒ Object
33 34 35 36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb', line 33 def act_link_list acts, context items = acts_for_accordion(acts, context) do |act, seq| act_link_list_item act, seq, context end bridge_pills items end |
#act_link_list_item(act, seq = nil, _context = nil) ⇒ Object
40 41 42 43 44 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb', line 40 def act_link_list_item act, seq=nil, _context=nil opts = act_listing_opts_from_params(seq) opts[:slot_class] = "revision-#{act.id} history-slot nav-item" act_renderer(:bridge).new(self, act, opts).bridge_link end |
#act_list_group(acts, context, &block) ⇒ Object
46 47 48 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb', line 46 def act_list_group acts, context, &block list_group acts_for_accordion(acts, context, &block), class: "clear-both" end |
#acts_bridge_layout(acts, context = :bridge) ⇒ Object
25 26 27 28 29 30 31 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb', line 25 def acts_bridge_layout acts, context=:bridge output [ _render_creator_credit, act_link_list(acts, context), act_paging(acts, context) ] end |
#view: bridge_act ⇒ Object
50 51 52 53 54 55 56 57 58 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.rb', line 50 view :bridge_act, cache: :never do opts = act_listing_opts_from_params(nil) act = act_from_context ar = act_renderer(:bridge).new(self, act, opts) class_up "action-list", "my-3" title: ar., slot: ("History") do act_listing(act, opts[:act_seq], :bridge) end end |
#view: creator_credit ⇒ Object
9 10 11 12 13 14 15 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.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_by ⇒ Object
17 18 19 20 21 22 23 |
# File 'platypus/tmp/set/gem-defaults/mod015-history/all/history_bridge.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 |