Sha256: a03c6348ff7c7cb1adcd45c25bea7e8564269b2e1400abd765c3556abb9ccde5

Contents?: true

Size: 1.06 KB

Versions: 39

Compression:

Stored size: 1.06 KB

Contents

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

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

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

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
mumuki-laboratory-9.23.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.22.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.21.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.20.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.20.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.19.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.18.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.18.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.17.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.16.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.15.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.14.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.14.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.13.2 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.13.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.13.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.12.1 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.12.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.11.0 app/helpers/editor_tabs_helper.rb
mumuki-laboratory-9.10.0 app/helpers/editor_tabs_helper.rb