[CST-12768] other fixes

This commit is contained in:
Alisa Ismailati
2023-11-23 14:42:49 +01:00
parent 867bf8aa23
commit d257380670
4 changed files with 28 additions and 5 deletions

View File

@@ -24,8 +24,16 @@
</thead>
<tbody>
<tr *ngFor="let ldnService of (ldnServicesRD$ | async)?.payload?.page">
<td>{{ ldnService.name }}</td>
<td>{{ ldnService.description }}</td>
<td class="col-3">{{ ldnService.name }}</td>
<td>
<ds-truncatable [id]="ldnService.id">
<ds-truncatable-part [id]="ldnService.id" [minLines]="2">
<div>
{{ ldnService.description }}
</div>
</ds-truncatable-part>
</ds-truncatable>
</td>
<td>
<span (click)="toggleStatus(ldnService, ldnServicesService)"
[ngClass]="{ 'status-enabled': ldnService.enabled, 'status-disabled': !ldnService.enabled }"

View File

@@ -7,7 +7,7 @@
<p [innerHTML]="('coar-notify-support-title.content' | translate)"></p>
<h2>{{ 'coar-notify-support.ldn-inbox.title' | translate }}</h2>
<p [innerHTML]="('coar-notify-support.ldn-inbox.content' | translate).replace('{ldnInboxUrl}', (coarRestApiUrl | async)?.join(', '))"></p>
<p [innerHTML]="('coar-notify-support.ldn-inbox.content' | translate).replace('{ldnInboxUrl}', generateCoarRestApiLinksHTML() | async)"></p>
<h2>{{ 'coar-notify-support.message-moderation.title' | translate }}</h2>
<p [innerHTML]="('coar-notify-support.message-moderation.content' | translate)"></p>

View File

@@ -1,6 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { NotifyInfoService } from './notify-info.service';
import { Observable, of } from 'rxjs';
import { Observable, map, of } from 'rxjs';
@Component({
selector: 'ds-notify-info',
@@ -21,4 +21,19 @@ export class NotifyInfoComponent implements OnInit {
ngOnInit() {
this.coarRestApiUrl = this.notifyInfoService.getCoarLdnLocalInboxUrls();
}
/**
* Generates HTML code for COAR REST API links.
* @returns An Observable that emits the generated HTML code.
*/
generateCoarRestApiLinksHTML() {
return this.coarRestApiUrl.pipe(
// transform the data into HTML
map((urls) => {
return urls.map(url => `
<code><a href="${url}" target="_blank"><span class="api-url">${url}</span></a></code>
`).join(',');
})
);
}
}

View File

@@ -896,7 +896,7 @@
"coar-notify-support.ldn-inbox.title": "LDN InBox",
"coar-notify-support.ldn-inbox.content": "For your convenience, our LDN (Linked Data Notifications) InBox is easily accessible at <code>{ldnInboxUrl}ldn/inbox</code>. The LDN InBox enables seamless communication and data exchange, ensuring efficient and effective collaboration.",
"coar-notify-support.ldn-inbox.content": "For your convenience, our LDN (Linked Data Notifications) InBox is easily accessible at {ldnInboxUrl}. The LDN InBox enables seamless communication and data exchange, ensuring efficient and effective collaboration.",
"coar-notify-support.message-moderation.title": "Message Moderation",