Sha256: 118333889d6b275db78dcbd3f5ac97bf67e636e331d6a35c3222e61870e71838
Contents?: true
Size: 1.58 KB
Versions: 2
Compression:
Stored size: 1.58 KB
Contents
format :html do BRIDGE_TABS = { account_tab: "Account", engage_tab: "Engage", history_tab: "History", related_tab: "Related", rules_tab: "Rules" }.freeze wrapper :bridge do class_up "modal-dialog", "no-gaps" voo.hide! :modal_footer wrap_with_modal size: :full, title: bridge_breadcrumbs do haml :bridge end end def bridge_tabs wrap do lazy_loading_tabs visible_bridge_tabs, bridge_tab, _render(bridge_tab) end end def bridge_tab @bridge_tab ||= bridge_param :tab end def bridge_param key params.dig(:bridge, key)&.to_sym || try("default_bridge_#{key}") end def bridge_breadcrumbs <<-HTML.strip_heredoc <nav aria-label="breadcrumb"> <ol class="breadcrumb _bridge-breadcrumb"> <li class="breadcrumb-item">#{card.name}</li> <li class="breadcrumb-item active">Edit</li> </ol> </nav> HTML end def bridge_link_opts opts={} opts[:"data-slot-selector"] = bridge_slot_selector opts[:remote] = true add_class opts, "slotter" opts.bury :path, :layout, :overlay opts[:path][:view] ||= :content opts end def bridge_slot_selector ".bridge-main > .overlay-container > .card-slot._bottomlay-slot," \ ".bridge-main > ._overlay-container-placeholder > .card-slot" end def default_bridge_tab show_account_tab? ? :account_tab : :engage_tab end def breadcrumb_data title, html_class=nil html_class ||= title.underscore { "data-breadcrumb": title, "data-breadcrumb-class": html_class } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
card-1.98.0 | mod/edit/set/all/bridge.rb |
card-1.97.0.1 | mod/edit/set/all/bridge.rb |