<h3>Import</h3>
<fieldset>
	<p>Data to import can be found in the files named <a target="_blank" href="http://code.google.com/p/andors-trail/source/browse/#git%2FAndorsTrail%2Fres%2Fraw">res/raw/*.json</a> in the source code.</p>
	Import as
	<select ng-model="selectedSection" ng-options="s.name for s in sections"></select>
	
	<p>
		<label for="importExisting">
			<input type="radio" name="importType" id="importExisting" value="existing" ng-model="importType"></input>
			Import content from existing files
		</label>
		<label for="importPasted">
			<input type="radio" name="importType" id="importPasted" value="paste" ng-model="importType"></input>
			Paste data to import
		</label>
	</p>

	<div ng-show="importType == 'paste'">
		<p>
			<textarea id="importExportTextArea" rows="9" cols="80" ng-model="content" placeholder="paste json or old resource format here"></textarea>
		</p>
		<button ng-click="importPastedData()" class="btn btn-primary pull-right"><i class="icon-upload"></i> Import</button>
	</div>
	
	<div ng-show="importType == 'existing'">
		<p>
			<select ng-model="selectedFile" ng-options="f for f in availableFiles[selectedSection.id]"></select>
		</p>
		<button ng-click="importExistingData()" class="btn btn-primary pull-right"><i class="icon-upload"></i> Import</button>
	</div>
	
	<div style="color: red;" ng-ds-fade="errorMsg">{{errorMsg}}</div>
	<div style="color: green;" ng-ds-fade="importedMsg">{{importedMsg}}</div>
</div>
