Module: Card::Set::All::Board::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb
Instance Method Summary collapse
-
#board_breadcrumbs ⇒ Object
-
#board_link_opts(opts = {}) ⇒ Object
-
#board_menu ⇒ Object
-
#board_param(key) ⇒ Object
-
#board_slot_selector ⇒ Object
-
#board_tab ⇒ Object
-
#board_tabs ⇒ Object
-
#breadcrumb_data(title, html_class = nil) ⇒ Object
-
#default_board_tab ⇒ Object
-
#switch_to_edit_link ⇒ Object
Instance Method Details
#board_breadcrumbs ⇒ Object
44 45 46 47 48 49 50 51 52 53 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 44 def <<-HTML.strip_heredoc <nav aria-label="breadcrumb"> <ol class="breadcrumb _board-breadcrumb"> <li class="breadcrumb-item">#{card.name}</li> <li class="breadcrumb-item active">Edit</li> </ol> </nav> HTML end |
#board_link_opts(opts = {}) ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 55 def board_link_opts opts={} opts[:"data-slot-selector"] = board_slot_selector opts[:"data-slotter-mode"] = :override opts[:remote] = true add_class opts, "slotter" opts.bury :path, :layout, :overlay opts.bury :path, :slot, :items, :view, :closed opts[:path][:view] ||= :content opts end |
#board_menu ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 80 def do [ render_close_modal_link, switch_to_edit_link ] end end |
#board_param(key) ⇒ Object
40 41 42 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 40 def board_param key params.dig(:board, key)&.to_sym || try("default_board_#{key}") end |
#board_slot_selector ⇒ Object
66 67 68 69 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 66 def board_slot_selector ".board-main > .overlay-container > .card-slot._bottomlay-slot," \ ".board-main > ._overlay-container-placeholder > .card-slot" end |
#board_tab ⇒ Object
36 37 38 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 36 def board_tab @board_tab ||= board_param :tab end |
#board_tabs ⇒ Object
28 29 30 31 32 33 34 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 28 def board_tabs wrap do tabs(visible_board_tabs, BOARD_TAB_NAMES[board_tab], load: :lazy) do _render board_tab end end end |
#breadcrumb_data(title, html_class = nil) ⇒ Object
75 76 77 78 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 75 def title, html_class=nil html_class ||= title.underscore { "data-breadcrumb": title, "data-breadcrumb-class": html_class } end |
#default_board_tab ⇒ Object
71 72 73 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 71 def default_board_tab show_guide_tab? ? :guide_tab : :engage_tab end |
#switch_to_edit_link ⇒ Object
89 90 91 92 93 94 95 96 |
# File 'platypus/tmp/set/gem-defaults/mod011-edit/all/board.rb', line 89 def switch_to_edit_link edit_link_opts = { "data-slotter-mode": "modal-replace", "data-modal-class": "modal-lg" } confirm_edit_loss(edit_link_opts) link_to_view(:edit, , edit_link_opts) end |