Method: ModelModalHelper#model_modal_tabs

Defined in:
app/helpers/model_modal_helper.rb

#model_modal_tabs(model, _options = {}) ⇒ Object



100
101
102
103
104
105
106
107
108
109
110
111
112
# File 'app/helpers/model_modal_helper.rb', line 100

def model_modal_tabs(model, _options = {})
  (:div, class: 'col s12') do
    concat((:ul, class: 'tabs tabs-fixed-width') do
      concat((:li, class: 'tab') do
        (:a, href: "#field-tab-#{model.id}") { model.class.to_s.titleize }
      end)
      concat((:li, class: 'tab') { (:a, href: "#standard-tab-#{model.id}") { 'Details' } })
      if model.respond_to?(:logs)
        concat((:li, class: 'tab') { (:a, href: "#logs-tab-#{model.id}") { 'Logs' } })
      end
    end)
  end
end