maestrano/mno-enterprise-angular

View on GitHub
src/app/components/dashboard-menu/dashboard-menu.html

Summary

Maintainability
Test Coverage

<!---------------------------->
<!--    Responsive Navbar   -->
<!---------------------------->
<nav class="navbar navbar-fixed-top navbar-inverse visible-xs hidden-print" role="navigation">
  <div class="navbar-header">
    <button type="button" class="navbar-toggle" ng-init="navCollapsed = true" ng-click="navCollapsed = !navCollapsed">
      <span class="sr-only">{{ 'mno_enterprise.templates.dashboard.menu.toggle_navigation' | translate }}</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <a class="navbar-brand" href="#">{{ 'mno_enterprise.templates.dashboard.menu.dashboard' | translate }}</a>
  </div>
  <div class="collapse navbar-collapse" uib-collapse="navCollapsed">
    <ul class="nav navbar-nav">
      <!-- ------------------------- -->
      <!-- My account section        -->
      <!-- ------------------------- -->

      <li ng-if="!isImpacAvailable || !isDockEnabled">
        <a ui-sref="home.apps" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.dashboard' | translate }}</a>
      </li>

      <li ng-if="isImpacAvailable && isDockEnabled">
        <a ui-sref="home.impac" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.dashboard' | translate }}</a>
      </li>

      <li ng-if="isImpacAvailable && !isDockEnabled">
        <a ui-sref="home.impac" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.impac' | translate }}</a>
      </li>

      <li>
        <a ui-sref="home.account" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.my_account' | translate }}</a>
      </li>

      <li ng-if="isOrganizationManagementEnabled">
        <a ui-sref="home.company" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.company' | translate }}</a>
      </li>

      <li ng-if="isMarketplaceEnabled">
        <a ui-sref="home.marketplace" ui-sref-active="active">{{ 'mno_enterprise.templates.dashboard.menu.marketplace' | translate }}</a>
      </li>

      <li>
        <a ui-sref="logout">{{ 'mno_enterprise.templates.dashboard.menu.logout' | translate }}</a>
      </li>
    </ul>
  </div>
</nav>

<!-------------------------->
<!--    Side Navbar       -->
<!-------------------------->
<div class="menu-wrapper col-xs-1 hidden-xs hidden-print">
  <nav class="menu vertical">
    <!--Home page link-->
    <a ui-sref="home.impac">
      <div class='brand-logo'></div>
    </a>

    <a ng-if="!isImpacAvailable || !isDockEnabled" ui-sref="home.apps" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.dashboard' | translate }}</div>
      <i class="dhb-icon-dashboard"></i>
    </a>

    <a ng-if="isImpacAvailable && isDockEnabled" ui-sref="home.impac" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.dashboard' | translate }}</div>
      <i class="dhb-icon-impac"></i>
    </a>

    <a ng-if="isImpacAvailable && !isDockEnabled" ui-sref="home.impac" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.impac' | translate }}</div>
      <i class="dhb-icon-impac"></i>
    </a>

    <a ui-sref="home.account" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.my_account' | translate }}</div>
      <i class="dhb-icon-account"></i>
    </a>

    <a ng-if="isOrganizationManagementEnabled" ui-sref="home.company" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.company' | translate }}</div>
      <i class="dhb-icon-company"></i>
    </a>

    <a ng-if="isMarketplaceEnabled" ui-sref="home.marketplace" class="dashboard-button top-buffer-1" ui-sref-active="active">
      <div class='content'>{{ 'mno_enterprise.templates.dashboard.menu.marketplace' | translate }}</div>
      <i class="dhb-icon-marketplace"></i>
    </a>
  </nav>
</div>