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_button_icon :fullscreen, :expand
end

#format_iconObject



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

def format_icon
  overlapped_button_icon :format, :indent
end

#overlapped_button_icon(key, icon, data_placement = 'left') ⇒ Object



22
23
24
# File 'app/helpers/overlapped_buttons_helper.rb', line 22

def overlapped_button_icon(key, icon, data_placement='left')
  fa_icon(icon, title: t(key), class: 'fa-fw', role: 'button', 'aria-label': t(key), 'data-placement': data_placement)
end


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

def restart_guide_link(guide)
  link_to restart_icon('top'),
          guide_progress_path(guide),
          class: 'mu-content-toolbar-item mu-restart-guide',
          data: {confirm: t(:confirm_restart)},
          method: :delete
end

#restart_icon(data_placement = 'left') ⇒ Object



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

def restart_icon(data_placement='left')
  overlapped_button_icon :restart, :undo, data_placement
end