<topnav icon="fa fa-fw fa-users" title="Organization" subnav="true">
	<ul class="nav">
		<li class="active"><a href="org/apikeys">API Keys</a></li>
	</ul>
</topnav>

<div class="page-container" style="background: transparent; border: 0;">
	<div class="page-wide">
		<h2>
			API Keys
		</h2>

		<form name="addTokenrForm" class="form-inline tight-form last">
			<ul class="tight-form-list">
				<li class="tight-form-item" style="width: 100px">
					Add a key
				</li>
				<li>
					<input type="text" class="input-xlarge tight-form-input" ng-model='token.name' placeholder="Name"></input>
				</li>
				<li class="tight-form-item">
					Role
				</li>
				<li>
					<select class="input-small tight-form-input" ng-model="token.role" ng-options="r for r in roleTypes"></select>
				</li>
				<li style="float: right">
					<button class="btn btn-success tight-form-btn" ng-click="addToken()">Add</button>
				</li>
				<div class="clearfix"></div>
			</ul>
		</form>

		<table class="filter-table">
			<thead>
				<tr>
					<th>Name</th>
					<th>Role</th>
					<th style="width: 34px;"></th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="t in tokens">
					<td>{{t.name}}</td>
					<td>{{t.role}}</td>
					<td>
						<a ng-click="removeToken(t.id)" class="btn btn-danger btn-mini">
							<i class="fa fa-remove"></i>
						</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>

</div>


