<!-- IMPORT SETTINGS -->
<div class="row">
	<div class="col-xs-12">
        <h1>Import Presets</h1>
        <p>
	        Change the default mapping of fields when importing posts into the plugin. You can define multiple import presets that can be chosen at the time of import.
	        <a class="btn" ng-click="showTags = showTags ? false : true">
				<span class="btn btn-default" ng-if="!showTags"><i class="glyphicon glyphicon-tag"></i>&nbsp;See a list of tags</span>
				<span class="btn btn-default" ng-if="showTags"><i class="glyphicon glyphicon-tag"></i>&nbsp;Hide list of tags</span>
			</a>
		</p>
    </div>
</div>

<!-- MAPPING KEY -->
<table class="import-fields table" ng-show="showTags">
	<thead>
		<td>Tag</td>
		<td>Description</td>
	</thead>
	<tbody>
		<tr ng-repeat="(key, value) in settings.importTags">
			<td class="code">{{key}}</td>
			<td>{{value}}</td>
		</tr>
	</tbody>
</table>

<table class="table">
	<BR/>
	
	<thead>
		<tr class="table-head">
			<td><b>Preset Name</b></td>
			<td><b>Entity Type</b></td>
			<td></td>
		</tr>
	</thead>
	
	<tbody>
		<tr ng-repeat="preset in settings.importPresets">
			<td>{{preset.name}}</td>
			<td>{{preset.entityType}}</td>
			<td class="text-right">
				<a class="btn btn-default" ng-click="edit_import_preset(preset)"><i class="glyphicon glyphicon-pencil"></i></a>
				&nbsp;
				<a class="btn btn-default" ng-click="delete_import_preset(preset)"><i class="glyphicon glyphicon-trash"></i></a>
				&nbsp;
			</td>
		</tr>
	</tbody>
		
</table> 

<!-- IMPORT PRESETS -->
<p class="text-center ng-scope">
    <a ng-click="add_import_preset();"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add Import Rule</a>
</p>