- if @view.controls.kind_of? String
  - begin
    .row
      .event-header= render @view.controls
  - rescue ActionView::MissingTemplate
    .row.alert.alert-error
      %b Error:
      There is a missing form here. Contact your administrator.
- elsif @view.controls.kind_of? Hash
  - if @view.controls.count == 1
    .row
      .event-header= render @view.controls.values.first
  .row
    %ul.nav.nav-pills{:style => "margin-bottom:10px;"}
      - @view.controls.each do |k,v|
        %li
          %a{:href => "##{k.tr(" ","").underscore}", "data-toggle" => "tab"}= k
  .tab-content.row
    - @view.controls.each do |k,v|
      .tab-pane{:id => k.tr(" ","").underscore}
        .event-header= render v

- if @view.controls.kind_of? String
  - begin
    .row
      .event-header= render @view.controls
  - rescue ActionView::MissingTemplate
    .row.alert.alert-error
      %b Error:
      There is a missing form here. Contact your administrator.
- elsif @view.controls.kind_of? Hash
  - if @view.controls.count == 1
    .row
      .event-header= render @view.controls.values.first
  - else
    .row
      %ul.nav.nav-pills{:style => "margin-bottom:10px;"}
        - @view.controls.each do |k,v|
          %li
            %a{:href => "##{k.tr(" ","").underscore}", "data-toggle" => "tab"}= k
    .tab-content.row
      - @view.controls.each do |k,v|
        .tab-pane{:id => k.tr(" ","").underscore}
          .event-header= render v

Fix showing controls twice if there's only one!
Fix showing controls twice if there's only one!
