<div class="navbar navbar-static-top" ng-controller='DashboardNavCtrl' ng-init="init()">
	<div class="navbar-inner">
		<div class="container-fluid">

			<div class="top-nav">
				<a class="pointer top-nav-menu-btn" ng-if="!contextSrv.sidemenu" ng-click="contextSrv.toggleSideMenu()">
					<img class="logo-icon" src="img/fav32.png"></img>
					<i class="fa fa-bars"></i>
				</a>

				<div class="top-nav-dashboards-btn">
					<a class="pointer" ng-click="openSearch()">
						<i class="fa fa-th-large"></i>
						<span class="dashboard-title">{{dashboard.title}}</span>
						<i class="fa fa-caret-down"></i>
					</a>
				</div>
			</div>

			<ul class="nav pull-left top-nav-dash-actions">
				<li ng-show="dashboardMeta.canStar">
					<a class="pointer" ng-click="starDashboard()">
						<i class="fa" ng-class="{'fa-star-o': !dashboardMeta.isStarred, 'fa-star': dashboardMeta.isStarred}" style="color: orange;"></i>
					</a>
				</li>
				<li ng-show="dashboardMeta.canShare">
					<a class="pointer" ng-click="shareDashboard()" bs-tooltip="'Share dashboard'" data-placement="bottom"><i class="fa fa-share-square-o"></i></a>
				</li>
				<li ng-show="dashboardMeta.canSave">
					<a ng-click="saveDashboard()" bs-tooltip="'Save dashboard'" data-placement="bottom"><i class="fa fa-save"></i></a>
				</li>
				<li class="dropdown">
					<a class="pointer" ng-click="hideTooltip($event)" bs-tooltip="'Manage dashboard'" data-placement="bottom" data-toggle="dropdown"><i class="fa fa-cog"></i></a>
					<ul class="dropdown-menu">
						<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('settings');">Settings</a></li>
						<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('annotations');">Annotations</a></li>
						<li ng-if="dashboardMeta.canEdit"><a class="pointer" ng-click="openEditView('templating');">Templating</a></li>
						<li><a class="pointer" ng-click="exportDashboard();">Export</a></li>
						<li><a class="pointer" ng-click="editJson();">View JSON</a></li>
						<li ng-if="contextSrv.isEditor"><a class="pointer" ng-click="saveDashboardAs();">Save As...</a></li>
						<li ng-if="dashboardMeta.canSave"><a class="pointer" ng-click="deleteDashboard();">Delete dashboard</a></li>
					</ul>
				</li>
			</ul>

			<ul class="nav dash-playlist-actions" ng-if="playlistSrv">
				<li>
					<a ng-click="playlistSrv.prev()"><i class="fa fa-step-backward"></i></a>
				</li>
				<li>
					<a ng-click="playlistSrv.stop()"><i class="fa fa-stop"></i></a>
				</li>
				<li>
					<a ng-click="playlistSrv.next()"><i class="fa fa-step-forward"></i></a>
				</li>
			</ul>

			<ul class="nav pull-right">
				<li ng-show="dashboardViewState.fullscreen" class="back-to-dashboard-link">
					<a ng-click="exitFullscreen()">
						Back to dashboard
					</a>
				</li>
				<li ng-if="dashboard">
					<gf-time-picker dashboard="dashboard"></gf-time-picker>
				</li>
			</ul>
		</div>
	</div>
</div>

