Sha256: cf51cd93661280845d4195785f77162d2419da00ba016f930ac816e95a82386a

Contents?: true

Size: 1002 Bytes

Versions: 14

Compression:

Stored size: 1002 Bytes

Contents

module EditorTabsHelper
  def extra_code_tab
    "<li role='presentation'> <a data-target='#visible-extra' aria-controls='visible-extra' role='tab' data-toggle='tab' class='editor-tab'>#{fa_icon 'code'} #{t 'activerecord.attributes.exercise.extra'}</a> </li>".html_safe
  end

  def console_tab(active: false)
    "<li role='presentation' class='#{'active' if active}'>
        <a data-target='#console' aria-controls='console' tabindex='0' role='tab' data-toggle='tab' class='editor-tab'>
          #{fa_icon 'terminal'}#{t :console }
        </a>
     </li>".html_safe
  end

  def messages_tab(exercise, organization = Organization.current)
    "<li id='messages-tab' role='presentation'>
        <a data-target='#messages' tabindex='0' aria-controls='console' role='tab' data-toggle='tab' class='editor-tab'>
          #{fa_icon 'comments', type: :regular} #{t :messages }
        </a>
     </li>".html_safe if organization.raise_hand_enabled? && exercise.has_messages_for?(current_user)
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mumuki-laboratory-9.0.6 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.5 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.4 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.3 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.2 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.0.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.6.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.6.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.5.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.4.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.3.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.2.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-8.2.0 app/helpers/editor_tabs_helper.rb