Module: Card::Set::All::RichHtml::Menu::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod021-standard/all/rich_html/menu.rb
Instance Method Summary collapse
- #edit_in_bridge_link(opts = {}) ⇒ Object
- #edit_link(view = :edit, opts = {}) ⇒ Object
- #edit_link_opts(modal: nil) ⇒ Object
- #full_page_icon ⇒ Object
- #full_page_link ⇒ Object
- #menu_icon ⇒ Object
- #menu_link ⇒ Object
- #menu_link_classes ⇒ Object
- #show_menu_item_edit? ⇒ Boolean
Instance Method Details
#edit_in_bridge_link(opts = {}) ⇒ Object
39 40 41 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 39 def edit_in_bridge_link opts={} edit_link :bridge, opts end |
#edit_link(view = :edit, opts = {}) ⇒ Object
43 44 45 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 43 def edit_link view=:edit, opts={} link_to_view view, , edit_link_opts(opts.reverse_merge(modal: :lg)) end |
#edit_link_opts(modal: nil) ⇒ Object
48 49 50 51 52 53 54 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 48 def edit_link_opts modal: nil opts = { class: classy("edit-link") } if modal opts.merge! "data-slotter-mode": "modal", "data-modal-class": "modal-#{modal}" end opts end |
#full_page_icon ⇒ Object
64 65 66 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 64 def full_page_icon icon_tag :open_in_new end |
#full_page_link ⇒ Object
35 36 37 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 35 def full_page_link link_to_card card, full_page_icon, class: classy("full-page-link") end |
#menu_icon ⇒ Object
60 61 62 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 60 def material_icon "edit" end |
#menu_link ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 16 def case voo.edit when :inline edit_inline_link when :full edit_in_bridge_link else # :standard edit_link end end |
#menu_link_classes ⇒ Object
56 57 58 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 56 def "nodblclick" + (show_view?(:hover_link) ? " _show-on-hover" : "") end |
#show_menu_item_edit? ⇒ Boolean
68 69 70 71 72 |
# File 'tmpsets/set/mod021-standard/all/rich_html/menu.rb', line 68 def return unless card.real? card.ok?(:update) || structure_editable? end |