<div ng-controller="DashLinksController">
	<div class="editor-row">
		<div class="tight-form-section">
			<h5>Links and Dash Navigation</h5>

			<div ng-repeat="link in panel.links">
				<div class="tight-form" >
					<ul class="tight-form-list">
						<li class="tight-form-item">
							<i class="fa fa-remove pointer" ng-click="deleteLink(link)"></i>
						</li>

						<li class="tight-form-item" style="width: 80px;">Link title</li>
						<li>
							<input type="text" ng-model="link.title" class="input-medium tight-form-input">
						</li>

						<li class="tight-form-item">Type</li>
						<li>
							<select class="input-medium tight-form-input" style="width: 101px;" ng-model="link.type" ng-options="f for f in ['dashboard','absolute']"></select>
						</li>

						<li class="tight-form-item" ng-show="link.type === 'dashboard'">Dashboard</li>
						<li ng-show="link.type === 'dashboard'">
							<input type="text"
							ng-model="link.dashboard"
							bs-typeahead="searchDashboards"
							class="input-large tight-form-input">
						</li>

						<li class="tight-form-item" ng-show="link.type === 'absolute'">Url</li>
						<li ng-show="link.type === 'absolute'">
							<input type="text" ng-model="link.url" class="input-xlarge tight-form-input">
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
				<div class="tight-form">
					<ul class="tight-form-list" role="menu">
						<li class="tight-form-item">
							<i class="fa fa-remove invisible"></i>
						</li>
						<li class="tight-form-item" style="width: 80px;">
							Params
							<tip>Use var-variableName=value to pass templating variables.</tip>
						</li>
						<li>
							<input type="text" ng-model="link.params" class="input-xxlarge tight-form-input">
						</li>
					</ul>
					<div class="clearfix"></div>
				</div>
			</div>

		</div>
	</div>

	<div class="editor-row">
		<br>
		<button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>
	</div>
</div>
