This commit is contained in:
FrancescoMolinaro
2024-02-01 11:31:26 +01:00
parent b8555f53c3
commit 2da613bff1
11 changed files with 21 additions and 17 deletions

View File

@@ -14,7 +14,7 @@ import { Version } from '../shared/version.model';
import { VersionHistory } from '../shared/version-history.model'; import { VersionHistory } from '../shared/version-history.model';
import { RequestEntry } from './request-entry.model'; import { RequestEntry } from './request-entry.model';
import { testPatchDataImplementation } from './base/patch-data.spec'; import { testPatchDataImplementation } from './base/patch-data.spec';
import { UpdateDataServiceImpl } from './update-data-service'; import { UpdateDataServiceImpl } from './update-data.service';
import { testSearchDataImplementation } from './base/search-data.spec'; import { testSearchDataImplementation } from './base/search-data.spec';
import { testDeleteDataImplementation } from './base/delete-data.spec'; import { testDeleteDataImplementation } from './base/delete-data.spec';
import { testCreateDataImplementation } from './base/create-data.spec'; import { testCreateDataImplementation } from './base/create-data.spec';

View File

@@ -11,7 +11,7 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv
import { ObjectCacheService } from '../cache/object-cache.service'; import { ObjectCacheService } from '../cache/object-cache.service';
import { dataService } from '../cache/builders/build-decorators'; import { dataService } from '../cache/builders/build-decorators';
import { RequestService } from '../data/request.service'; import { RequestService } from '../data/request.service';
import { UpdateDataServiceImpl } from '../data/update-data-service'; import { UpdateDataServiceImpl } from '../data/update-data.service';
import { ChangeAnalyzer } from '../data/change-analyzer'; import { ChangeAnalyzer } from '../data/change-analyzer';
import { DefaultChangeAnalyzer } from '../data/default-change-analyzer.service'; import { DefaultChangeAnalyzer } from '../data/default-change-analyzer.service';
import { RemoteData } from '../data/remote-data'; import { RemoteData } from '../data/remote-data';

View File

@@ -21,7 +21,7 @@ import { ArrayMoveChangeAnalyzer } from '../../core/data/array-move-change-analy
import { DATA_SERVICE_FACTORY } from '../../core/data/base/data-service.decorator'; import { DATA_SERVICE_FACTORY } from '../../core/data/base/data-service.decorator';
import { GenericConstructor } from '../../core/shared/generic-constructor'; import { GenericConstructor } from '../../core/shared/generic-constructor';
import { HALDataService } from '../../core/data/base/hal-data-service.interface'; import { HALDataService } from '../../core/data/base/hal-data-service.interface';
import { UpdateDataService } from '../../core/data/update-data-service'; import { UpdateDataService } from '../../core/data/update-data.service';
@Component({ @Component({
selector: 'ds-dso-edit-metadata', selector: 'ds-dso-edit-metadata',

View File

@@ -2,7 +2,7 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component';
import { DsoEditMetadataComponent } from './dso-edit-metadata.component'; import { DsoEditMetadataComponent } from './dso-edit-metadata.component';
import { Component, Input } from '@angular/core'; import { Component, Input } from '@angular/core';
import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { DSpaceObject } from '../../core/shared/dspace-object.model';
import { UpdateDataService } from '../../core/data/update-data-service'; import { UpdateDataService } from '../../core/data/update-data.service';
@Component({ @Component({
selector: 'ds-themed-dso-edit-metadata', selector: 'ds-themed-dso-edit-metadata',

View File

@@ -1,7 +1,7 @@
<ng-container *ngIf="(suggestionsRD$ | async) as suggestions"> <ng-container *ngIf="(suggestionsRD$ | async) as suggestions">
<ng-container *ngFor="let suggestion of suggestions" class="alert alert-info"> <ng-container *ngFor="let suggestion of suggestions" class="alert alert-info">
<div class="alert alert-success d-block" *ngIf="suggestion.total > 0"> <div class="alert alert-success d-block" *ngIf="suggestion.total > 0">
<div [innerHTML]="'notification.suggestion.page' | translate: getNotificationSuggestionInterpolation(suggestion)"> <div [innerHTML]="'notification.suggestion' | translate: getNotificationSuggestionInterpolation(suggestion)">
</div> </div>
</div> </div>
</ng-container> </ng-container>

View File

@@ -16,8 +16,6 @@ import { Observable } from 'rxjs';
}) })
export class SuggestionsNotificationComponent implements OnInit { export class SuggestionsNotificationComponent implements OnInit {
labelPrefix = 'mydspace.';
/** /**
* The user suggestion targets. * The user suggestion targets.
*/ */

View File

@@ -30,6 +30,7 @@ import {
import { import {
SuggestionsDataService SuggestionsDataService
} from '../core/suggestion-notifications/suggestions-data.service'; } from '../core/suggestion-notifications/suggestions-data.service';
import { getSuggestionPageRoute } from '../suggestions-page/suggestions-page-routing-paths';
/** /**
* useful for multiple approvals and ignores operation * useful for multiple approvals and ignores operation
@@ -256,7 +257,8 @@ export class SuggestionsService {
source: this.translateService.instant(this.translateSuggestionSource(suggestionTarget.source)), source: this.translateService.instant(this.translateSuggestionSource(suggestionTarget.source)),
type: this.translateService.instant(this.translateSuggestionType(suggestionTarget.source)), type: this.translateService.instant(this.translateSuggestionType(suggestionTarget.source)),
suggestionId: suggestionTarget.id, suggestionId: suggestionTarget.id,
displayName: suggestionTarget.display displayName: suggestionTarget.display,
url: getSuggestionPageRoute(suggestionTarget.id)
}; };
} }

View File

@@ -5,7 +5,6 @@
<div *ngIf="suggestionsRD?.pageInfo?.totalElements > 0"> <div *ngIf="suggestionsRD?.pageInfo?.totalElements > 0">
<h1> <h1>
{{ translateSuggestionType() | translate }}
{{'suggestion.suggestionFor' | translate}} {{'suggestion.suggestionFor' | translate}}
<a target="_blank" [routerLink]="['/entities/person/', researcherUuid]">{{researcherName}}</a> <a target="_blank" [routerLink]="['/entities/person/', researcherUuid]">{{researcherName}}</a>
{{'suggestion.from.source' | translate}} {{ translateSuggestionSource() | translate }} {{'suggestion.from.source' | translate}} {{ translateSuggestionSource() | translate }}

View File

@@ -22,6 +22,9 @@ import { PaginationService } from '../core/pagination/pagination.service';
import { WorkspaceItem } from '../core/submission/models/workspaceitem.model'; import { WorkspaceItem } from '../core/submission/models/workspaceitem.model';
import {FindListOptions} from '../core/data/find-list-options.model'; import {FindListOptions} from '../core/data/find-list-options.model';
import {redirectOn4xx} from '../core/shared/authorized.operators'; import {redirectOn4xx} from '../core/shared/authorized.operators';
import {
getWorkflowItemEditRoute
} from '../workflowitems-edit-page/workflowitems-edit-page-routing-paths';
@Component({ @Component({
selector: 'ds-suggestion-page', selector: 'ds-suggestion-page',
@@ -190,7 +193,7 @@ export class SuggestionsPageComponent implements OnInit {
approveAndImport(event: SuggestionApproveAndImport) { approveAndImport(event: SuggestionApproveAndImport) {
this.suggestionService.approveAndImport(this.workspaceItemService, event.suggestion, event.collectionId) this.suggestionService.approveAndImport(this.workspaceItemService, event.suggestion, event.collectionId)
.subscribe((workspaceitem: WorkspaceItem) => { .subscribe((workspaceitem: WorkspaceItem) => {
const content = this.translateService.instant('suggestion.approveAndImport.success', { workspaceItemId: workspaceitem.id }); const content = this.translateService.instant('suggestion.approveAndImport.success', { url: getWorkflowItemEditRoute(workspaceitem.id) });
this.notificationService.success('', content, {timeOut:0}, true); this.notificationService.success('', content, {timeOut:0}, true);
this.suggestionTargetsStateService.dispatchRefreshUserSuggestionsAction(); this.suggestionTargetsStateService.dispatchRefreshUserSuggestionsAction();
this.updatePage(); this.updatePage();

View File

@@ -1772,6 +1772,10 @@
"form.create": "Create", "form.create": "Create",
"form.number-picker.decrement": "Decrement {{field}}",
"form.number-picker.increment": "Increment {{field}}",
"form.repeatable.sort.tip": "Drop the item in the new position", "form.repeatable.sort.tip": "Drop the item in the new position",
"grant-deny-request-copy.deny": "Don't send copy", "grant-deny-request-copy.deny": "Don't send copy",
@@ -3084,9 +3088,7 @@
"mydspace.import": "Import", "mydspace.import": "Import",
"notification.suggestion": "We found <b>{{count}} publications</b><br> in the {{source}} that seems to be related to your profile.<br> Please <a href='/suggestions/{{suggestionId}}'>review the suggestions</a>", "notification.suggestion": "We found <b>{{count}} publications</b><br> in the {{source}} that seems to be related to your profile.<br> Please <a href='{{ url }}'>review the suggestions</a>",
"notification.suggestion.page": "We found <b>{{count}} {{type}}</b> in the {{source}} that seems to be related to your profile. Please <a href='/suggestions/{{suggestionId}}'>review the suggestions.</a>",
"nav.browse.header": "All of DSpace", "nav.browse.header": "All of DSpace",
@@ -3564,9 +3566,9 @@
"suggestion.loading": "Loading ...", "suggestion.loading": "Loading ...",
"suggestion.title": "Publication Claims", "suggestion.title": "Publication Claim",
"suggestion.title.breadcrumbs": "Publication Claims", "suggestion.title.breadcrumbs": "Publication Claim",
"suggestion.targets.description": "Below you can see all the suggestions ", "suggestion.targets.description": "Below you can see all the suggestions ",
@@ -3592,7 +3594,7 @@
"suggestion.approveAndImport": "Approve & import", "suggestion.approveAndImport": "Approve & import",
"suggestion.approveAndImport.success": "The suggestion has been imported successfully. <a href='/workspaceitems/{{workspaceItemId}}/edit'>View.</a>", "suggestion.approveAndImport.success": "The suggestion has been imported successfully. <a href='{{ url }}'>View.</a>",
"suggestion.approveAndImport.bulk": "Approve & import Selected", "suggestion.approveAndImport.bulk": "Approve & import Selected",
@@ -3614,7 +3616,7 @@
"suggestion.hideEvidence": "Hide evidence", "suggestion.hideEvidence": "Hide evidence",
"suggestion.suggestionFor": "Suggestion for", "suggestion.suggestionFor": "Suggestions for",
"suggestion.source.openaire": "OpenAIRE Graph", "suggestion.source.openaire": "OpenAIRE Graph",