Module: OverlappedButtonsHelper

Defined in:
app/helpers/overlapped_buttons_helper.rb

Instance Method Summary collapse

Instance Method Details

#expand_iconObject



2
3
4
# File 'app/helpers/overlapped_buttons_helper.rb', line 2

def expand_icon
  overlapped_link :fullscreen, :expand, class: 'editor-resize'
end

#format_iconObject



6
7
8
# File 'app/helpers/overlapped_buttons_helper.rb', line 6

def format_icon
  overlapped_link :format, :indent, class: 'editor-format'
end


14
15
16
17
18
19
20
21
# File 'app/helpers/overlapped_buttons_helper.rb', line 14

def restart_guide_link(guide)
  all_options = tooltip_options(:restart).merge!(
    {class: 'mu-content-toolbar-item mu-restart-guide',
     data: {confirm: t(:confirm_restart)}, method: :delete, 'data-bs-placement': 'top'})

  link_to overlapped_button_icon(:undo), guide_progress_path(guide), all_options if show_content_element?

end

#restart_icon(source = 'console', **options) ⇒ Object



10
11
12
# File 'app/helpers/overlapped_buttons_helper.rb', line 10

def restart_icon(source='console', **options)
  overlapped_link :restart, :undo, class: "#{source}-reset submission-reset", **options
end