Sha256: 5699b7bbcd97814bb129d0c8762f026ae08f56884471e93ec9c81eecbecca43d

Contents?: true

Size: 977 Bytes

Versions: 2

Compression:

Stored size: 977 Bytes

Contents

.tabs-wrapper
  = scrivito_tag(:div, widget, :tabs, style: 'display:none')

  %ul.nav.nav-tabs
    - widget.tabs.each_with_index do |tab, index|
      - active_class = index == 0 ? 'active' : nil
      %li{class: active_class}
        = scrivito_tag(:a, tab, :headline, href: "##{tab.id}", 'data-toggle' => 'tab')

    - if scrivito_in_editable_view?
      %li.new_tab
        %a{id: "add_new_tab", pageid: @obj.id, widgetid: widget.id, href: "#", style: "background-color: #439439; color: white;"}
          New Tab

  .tab-content
    - widget.tabs.each_with_index do |tab, index|
      - active_class = index == 0 ? 'active' : nil
      -# still toying around with this a bit: 
      - if false
        = scrivito_tag(:div, widget, tabs[index], class: "tab-pane fade in #{active_class}", id: tab.id)

      .tab-pane.fade.in{id: tab.id, class: active_class}
        = scrivito_tag(:div, tab, :content)

    - if widget.tabs.blank?
      = scrivito_tag(:div, widget, :tabs)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
scrivito_tabbed_content_widget-0.0.60 app/views/tabbed_content_widget/show.html.haml
scrivito_tabbed_content_widget-0.0.2 app/views/tabbed_content_widget/show.html.haml