<div class='self_clear'>
  <ul id="tabs" class='round'>
  <% if active_menu == nil %>
    <li></li>
  <% elsif active_menu == :account || active_menu == :personal %>
    <% if can? :manage, current_user %>
      <%= main_menu_item :personal, "#{icon('user')} Personal Settings".html_safe, edit_provider_admin_user_personal_details_path %>
    <% end %>
    <% if can? :manage, current_account %>
      <%= main_menu_item :account, "#{icon('cogs')} Account".html_safe, provider_admin_account_path %>
    <% end %>
  <% else %>
    <%= main_menu_item :dashboard, 'Dashboard', provider_admin_dashboard_path  %>

    <% if can? :manage, :partners %>
      <%= main_menu_item :buyers, 'Developers',  admin_buyers_accounts_path %>
      <%= main_menu_item :applications, 'Applications', admin_buyers_applications_path %>
    <% end %>

    <%= main_menu_item :finance, 'Billing', admin_finance_root_path, :switch => :finance, :upgrade_notice => true %>

    <% if can?(:manage, :monitoring) %>
      <%= main_menu_item :monitoring, 'Analytics', admin_stats_root_path %>
    <% end %>

    <% if can?(:manage, :plans) %>
      <%= main_menu_item :serviceadmin, current_account.multiservice? ? 'APIs' : 'API', admin_services_path %>
    <% end -%>

    <% if can? :manage, :portal %>
      <%= main_menu_item :cms, 'Developer Portal', provider_admin_cms_root_path %>
    <% end -%>

    <% if can? :manage, :settings %>
      <%= main_menu_item :settings, 'Settings', edit_admin_site_usage_rules_path %>
    <% end -%>
  <% end %>
  </ul>
</div>
