Sha256: 9fc96db53007c247ae5493a22b358a2e84e2605c43e5029338c8ae1f28d8d011

Contents?: true

Size: 1.28 KB

Versions: 14

Compression:

Stored size: 1.28 KB

Contents

= simple_form_for(<%= form_for %>) do |f|
  %div{role: 'tabpanel'}
    %ul.nav.nav-tabs{role: 'tablist'}
      %li.active{role: 'presentation'}
        %a{'data-toggle': 'tab', role: 'tab', 'aria-controls': '<%= resource.name %>-tab', href: '#<%= resource.name %>-tab'}
          <%= resource.human_name.titleize %>

<% resource.nested_resources.each do |nested_resource| -%>
      %li{role: 'presentation'}
        %a{'data-toggle': 'tab', role: 'tab', 'aria-controls': '<%= nested_resource.plural_name %>-tab', href: '#<%= nested_resource.plural_name %>-tab'}
          <%= nested_resource.plural_name.titleize %>

<% end -%>
  %br
  .tab-content
    #<%= resource.name %>-tab.tab-pane.active{role: 'tabpanel'}
      = render 'form_<%= resource.name %>', f: f

<% resource.nested_resources.each do |nested_resource| -%>
    #<%= nested_resource.plural_name %>-tab.tab-pane{role: 'tabpanel'}
      = render 'form_<%= nested_resource.plural_name %>', f: f
<% end -%>

  %hr

  .form-actions
  <% if defined?(EffectiveResources) -%>
  = simple_form_submit(f)
  <% else -%>
  = f.button :submit, 'Save', data: { disable_with: 'Saving...' }
  = f.button :submit, 'Save and Continue', data: { disable_with: 'Saving...' }
  = f.button :submit, 'Save and Add New', data: { disable_with: 'Saving...' }
  <% end -%>

Version data entries

14 entries across 11 versions & 1 rubygems

Version Path
effective_developer-0.3.0 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.3.0 lib/scaffolds/simple_form/tabpanel/_form.html.haml
effective_developer-0.2.14 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.14 lib/scaffolds/simple_form/tabpanel/_form.html.haml
effective_developer-0.2.13 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.13 lib/scaffolds/simple_form/tabpanel/_form.html.haml
effective_developer-0.2.12 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.11 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.10 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.9 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.8 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.7 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.6 lib/scaffolds/forms/tabpanel/_form.html.haml
effective_developer-0.2.5 lib/scaffolds/forms/tabpanel/_form.html.haml