Sha256: 290b573b811a213368e654ef08f2e9d9c6dd5aca1f2032d1aaba42d77d4384ce
Contents?: true
Size: 960 Bytes
Versions: 1
Compression:
Stored size: 960 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", 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
scrivito_tabbed_content_widget-0.0.1 | app/views/tabbed_content_widget/show.html.haml |