#tabs
  nav.preftab
    ul
      - @tabs.each do |tab|
        li[class=tab_class(tab)]
          = link_to tab.label, tab.url
          i class="icon-#{tab.label.downcase}"
          ul
            - tab.subtabs.each do |subtab|
              li[class=subtab_class(subtab.id)]
                = link_to subtab.label, subtab.url
      li[class="#{'active' if params[:controller] == 'shares'}"]
        = link_to t('shares'), shares_path
        i.icon-shares
      li[class="#{'active' if params[:controller] =='apps'}"]
        = link_to t('apps'), apps_path
        i.icon-apps
      - if debug_tab?
        li[class=""]
          = link_to t('debug'), '#'
          i.icon-debug

    = render "#{params[:controller]}/subtabs" unless @no_subtabs

#tabs
  nav.preftab
    ul
      - @tabs.each do |tab|
        li[class=tab_class(tab)]
          = link_to tab.label, tab.url
          i class="icon-#{tab.label.downcase}"
          -if params[:controller] == tab.label.downcase
            ul
              - tab.subtabs.each do |subtab|
                li[class=subtab_class(subtab.id)]
                  = link_to subtab.label, subtab.url
      li[class="#{'active' if params[:controller] == 'shares'}"]
        = link_to t('shares'), shares_path
        i.icon-shares
      li[class="#{'active' if params[:controller] =='apps'}"]
        = link_to t('apps'), apps_path
        i.icon-apps
      - if debug_tab?
        li[class=""]
          = link_to t('debug'), '#'
          i.icon-debug

    = render "#{params[:controller]}/subtabs" unless @no_subtabs

Fix for subtabs showing regardless if the parent tab is selected
Fix for subtabs showing regardless if the parent tab is selected

vik-y/platform,vik-y/platform,vik-y/platform,vik-y/platform