<h4>Persistent Organizations</h4>

<p>
	<small>It is necessary to persist the identifiers of the organizations associated to an Institutional Dashboard</small>
</p>	


<div class="row">
	<div class="col-sm-12">
		<input type="text" class="form-control form-control-sm mb-3" ng-model="poFilter" placeholder="Filter...">
		
		<form>
			<table class="table table-sm small">
				<thead class="thead-light">
					<tr>
						<th style="width: 200px">ID</th>
						<th style="width: 300px">OA Graph Node ID</th>
						<th>Name</th>
						<th style="width: 300px">Place</th>
						<th style="width: 40px"></th>
					</tr>
				</thead>
				<tbody ng-show="orgs.length > 0">
					<tr ng-repeat="o in orgs | filter:poFilter">
						<td><a href="#!/edit/0/{{o.id}}">{{o.id}}</a></td>
						<td>{{o.openaireId}}</td>
						<td>{{o.name}}</td>
						<td><img ng-src="resources/images/flags/{{o.country}}.gif" /> {{o.city || '-'}}, {{o.country}}</td>
						<td class="text-right">
							<button type="button" class="btn btn-sm  btn-outline-danger" ng-click="deletePersistentOrg(o.id)">
								<i class="fa fa-trash"></i>
							</button>
						</td>
					</tr>
				</tbody>
				<tbody ng-hide="orgs.length > 0">
					<tr>
						<td colspan="5" class="text-muted">No persistent organizazions</td>
					</tr> 
				</tbody>
				<tfoot>
					<tr ng-init="newId=''">
						<td colspan="4">
							<input type="text" class="form-control form-control-sm" placeholder="example: openorgs____::0123456789 (OpenOrgs ID, 24 chars) or openorgs____::781e5e245d69b566979b86e28d23f2c7 (OA Graph Node ID, 64 chars) ..." ng-model="newId" />
						</td>
						<td class="text-right">
							<button type="submit" class="btn btn-sm btn-outline-success" ng-click="addPersistentOrg(newId); newId=''" ng-disabled="!newId">
								<i class="fa fa-plus"></i>
							</button>
						</td>
					</tr>
				</tfoot>
			</table>
		</form>
	</div>
</div>
