Commit 5d03dfe1 authored by Gerrit Hübbers's avatar Gerrit Hübbers 🃏
Browse files

WIP

parent 4bbcf410
......@@ -81,6 +81,10 @@ public class BundlesSourceResource {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert("bundlesSource", "idexists", "A new bundlesSource cannot already have an ID")).body(null);
}
BundlesSource result = bundlesSourceRepository.save(bundlesSource);
if ( result.getType().equals(BundlesSourceType.XML_XSLT_FILE) ) {
result.setReference("xmlxslt-bundlessource-" + result.getId() );
result = bundlesSourceRepository.save(result);
}
return ResponseEntity.created(new URI("/api/bundlesSources/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert("bundlesSource", result.getId().toString()))
.body(result);
......
......@@ -276,12 +276,6 @@
<script src="scripts/app/entities/elementOption/elementOption-delete-dialog.controller.js"></script>
<script src="scripts/app/entities/elementOption/elementOption-detail.controller.js"></script>
<script src="scripts/components/entities/elementOption/elementOption.service.js"></script>
<script src="scripts/app/entities/harvest_metadata/harvest_metadata.js"></script>
<script src="scripts/app/entities/harvest_metadata/harvest_metadata.controller.js"></script>
<script src="scripts/app/entities/harvest_metadata/harvest_metadata-dialog.controller.js"></script>
<script src="scripts/app/entities/harvest_metadata/harvest_metadata-delete-dialog.controller.js"></script>
<script src="scripts/app/entities/harvest_metadata/harvest_metadata-detail.controller.js"></script>
<script src="scripts/components/entities/harvest_metadata/harvest_metadata.service.js"></script>
<script src="scripts/app/entities/transformationRule/transformationRule.js"></script>
<script src="scripts/app/entities/transformationRule/transformationRule.controller.js"></script>
<script src="scripts/app/entities/xmlFile/xmlFile.js"></script>
......
......@@ -8,6 +8,7 @@ angular.module('ddaApp')
$scope.oaiPmhAddresses = [];
$scope.unapiSources = [];
$scope.xsltOaiPmhAddresses = [];
$scope.xmlXsltFiles = [];
$scope.bundles = [];
$scope.page = 1;
......@@ -21,20 +22,17 @@ angular.module('ddaApp')
Repository.query(function(result) {
$scope.oaiPmhAddresses = result;
});
BundlesSource.getForCurrentUser(function(result) {
$scope.unapiSources = result.filter( function(bundlesSource) {
return bundlesSource.type === 'UNAPI';
});
});
BundlesSource.getForCurrentUser(function(result) {
$scope.xsltOaiPmhAddresses = result.filter( function(bundlesSource) {
return bundlesSource.type === 'XSLT_OAI_PMH';
});
});
BundlesSource.getForCurrentUser(function(result) {
$scope.xsltOaiPmhAddresses = result.filter( function(bundlesSource) {
$scope.xmlXsltFiles = result.filter( function(bundlesSource) {
return bundlesSource.type === 'XML_XSLT_FILE';
});
$scope.unapiSources = result.filter( function(bundlesSource) {
return bundlesSource.type === 'UNAPI';
});
})
};
......
......@@ -78,14 +78,14 @@
<table class="jh-table table table-striped">
<thead>
<tr>
<th><span>Name</span></th>
<th><span>Reference</span></th>
<th><span>Metadata transformer</span></th>
<th><span>State</span></th>
</tr>
</thead>
<tbody>
<tr ng-repeat="xmlXsltFile in xmlXsltFiles track by xmlXsltFile.id">
<td>{{xmlXsltFile.name}}</td>
<td>{{xmlXsltFile.reference}}</td>
<td>{{xmlXsltFile.metadataTransformer.name}}</td>
<td>{{xmlXsltFile.bundlesSourceState}}</td>
<td translate="{{'ddaApp.BundlesSourceState.' + bundlesSource.bundlesSourceState}}">{{xmlXsltFile.bundlesSource.bundlesSourceState}}</td>
......
......@@ -15,7 +15,7 @@ angular.module('ddaApp')
scope.fileread = loadEvent.target.result;
});
}
reader.readAsBinaryString(changeEvent.target.files[0]);
reader.readAsText(changeEvent.target.files[0]);
});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment