Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit d4ab6fea authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Fix search and edit path decoding

parent 2d2616d1
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@
<ng-template #rowSMPUrlLinkAction let-row="row" let-value="value" ngx-datatable-cell-template>
<a target="_blank"
href="{{contextPath}}{{row.participantScheme}}::{{row.participantIdentifier}}" >Open URL</a>
href="{{contextPath}}{{createServiceGroupURL(row)}}">Open URL</a>
</ng-template>
......@@ -83,7 +83,7 @@
<ng-template #rowMetadataSMPUrlLinkAction let-rowSmd="row" ngx-datatable-cell-template>
<a target="_blank"
href="{{contextPath}}{{row.participantScheme}}::{{row.participantIdentifier}}/services/{{rowSmd.documentIdentifierScheme}}::{{rowSmd.documentIdentifier}}" >Open URL</a>
href="{{contextPath}}{{createServiceMetadataURL(row, rowSmd)}}" >Open URL</a>
</ng-template>
</ngx-datatable>
......
......@@ -179,4 +179,13 @@ export class ServiceGroupEditComponent implements OnInit {
isDirty (): boolean {
return this.searchTable.isDirty();
}
createServiceGroupURL(row: any){
return encodeURIComponent(row.participantScheme+'::'+row.participantIdentifier);
}
createServiceMetadataURL(row: any, rowSMD: any){
return encodeURIComponent(row.participantScheme+'::'+row.participantIdentifier)+'/services/'+ encodeURIComponent(rowSMD.documentIdentifierScheme+'::'+rowSMD.documentIdentifier);
}
}
......@@ -23,7 +23,7 @@
<ng-template #rowSMPUrlLinkAction let-row="row" let-value="value" ngx-datatable-cell-template>
<a target="_blank"
href="{{contextPath}}{{row.participantScheme}}::{{row.participantIdentifier}}">Open URL</a>
href="{{contextPath}}{{createServiceGroupURL(row)}}">Open URL</a>
</ng-template>
......@@ -74,7 +74,7 @@
<ng-template #rowMetadataSMPUrlLinkAction let-rowSmd="row" ngx-datatable-cell-template>
<a target="_blank"
href="{{contextPath}}{{row.participantScheme}}::{{row.participantIdentifier}}/services/{{rowSmd.documentIdentifierScheme}}::{{rowSmd.documentIdentifier}}">Open
href="{{contextPath}}{{createServiceMetadataURL(row, rowSmd)}}">Open
URL</a>
</ng-template>
</ngx-datatable>
......
......@@ -68,6 +68,15 @@ export class ServiceGroupSearchComponent implements OnInit {
});
}
createServiceGroupURL(row: any){
return encodeURIComponent(row.participantScheme+'::'+row.participantIdentifier);
}
createServiceMetadataURL(row: any, rowSMD: any){
return encodeURIComponent(row.participantScheme+'::'+row.participantIdentifier)+'/services/'+ encodeURIComponent(rowSMD.documentIdentifierScheme+'::'+rowSMD.documentIdentifier);
}
details(row: any) {
this.serviceGroupSearchController.showDetails(row);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment