<!--

    Copyright (C) 2015-2016 Jeeva Kandasamy (jkandasa@gmail.com)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

            http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<div class="container-fluid row mc-top-space">

  <!-- Loading icon disaplay -->
  <div ng-show="showLoadingMain">
    <div ng-include src="'partials/common-html/loading.html'"></div>
  </div>

  <div ng-if="!showLoadingMain"> <!-- Main Message -->

    <ul class="nav nav-tabs nav-tabs-pf">
      <li ng-repeat="item in dashboards | orderBy:'title'" ng-class="{'active' : item.id === dId}"><a href="" ng-click="changeDashboard(item)">{{item.title}}</a></li>
      <li ng-if="!mchelper.userSettings.hideMenu" class="pull-right" uib-tooltip="{{ 'NEW_DASHBOARD' | translate }}" tooltip-placement="left"><span ng-disabled="dashboards.length >= mchelper.cfg.dashboardLimit" class="btn btn-primary mc-margin" style="margin-top:5px;" type="button" ng-click="createNewDashboad()"><i class="fa fa-plus"></i> {{ 'NEW' | translate }}</span></li>
      <li ng-if="!mchelper.userSettings.hideMenu" class="pull-right" uib-tooltip="{{ 'DELETE_DASHBOARD' | translate }}" tooltip-placement="left"><span ng-disabled="dashboards.length == 1 && dId" class="btn btn-danger mc-margin" style="margin-top:5px;" type="button" ng-click="deleteDashboad()"><i class="fa fa-trash"></i> {{ 'DELETE' | translate }}</span></li>
    </ul>

      <!-- Loading icon disaplay -->
    <div ng-show="showLoading">
      <div ng-include src="'partials/common-html/loading.html'"></div>
    </div>

    <div ng-hide="showLoading">
      <div ng-if="model" adf-dashboard name="{{model.name}}" collapsible="true" enableConfirmDelete="false" adf-model="model"></div>
    </div>

  </div>

</div>
