From 82be5a6e5277757ae06555981dfc4feaf603c17c Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Wed, 10 Feb 2021 10:24:52 +0000 Subject: [PATCH] [Library | Trunk] Claims: update UI for display claims component Dashboard - connect: update notification settings component git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60403 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../displayClaims.component.html | 287 +++++--------- .../displayClaims/displayClaims.component.ts | 373 ++++++------------ .../displayClaims/displayClaims.module.ts | 7 +- .../claimEntityFormatter.component.ts | 78 +--- .../projectTitleFormatter.component.ts | 10 +- .../publicationTitleFormatter.component.ts | 4 +- claims/claimsAdmin/claimsAdmin.component.ts | 21 +- connect/community/CustomizationOptions.ts | 48 ++- .../mailPrefs.component.html | 59 +-- .../mailPrefs.component.ts | 19 +- .../userEmailPreferences/mailsPrefs.module.ts | 3 +- 11 files changed, 313 insertions(+), 596 deletions(-) diff --git a/claims/claim-utils/displayClaims/displayClaims.component.html b/claims/claim-utils/displayClaims/displayClaims.component.html index eb1e8434..38eb9504 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.html +++ b/claims/claim-utils/displayClaims/displayClaims.component.html @@ -3,225 +3,132 @@
- -
+
+
+
- -
- Filter by - +
+
-
- - - - - - - -
- - - - - - +
+
Filter by:
+
+
+
Sort by:
+
- -
- - - - - - - - - - -
- - Results per page: - - {{size}} - - -
+
+
+
+ + + + + + Delete {{selected.length | number}} all links -
-
+ + +
+ +
+
+
{{resultsNum|number}} links, page {{page | number}} of {{totalPages(resultsNum)|number}} - -
-
+
-
- -
-
- {{selected.length | number}} link{{(selected.length > 1) ? 's' : ''}} selected -
- +
-
- - - -
- - + +
An Error occured.
You are not authorized to view the results.
-
+
User session is not valid. Please login again.
-
+
No entries found.
- - - - - - - - - - - - - - - - - - - - - - -
- - Source - - Link to - - Claimed by - - Claim Date - Status - - - -
- +
+
+ +
+
+
+ +
+
+ available + pending +
+ +
Claimed by: + {{claim.userMail}} + Claimed date: {{claim.date}}
+
+ + -
- - {{claim.userMail}}{{claim.date}} + + + + + - available - pending - - - - - - - - - - -
-
+
{{resultsNum|number}} links, page
- +
- +
diff --git a/claims/claim-utils/displayClaims/displayClaims.component.ts b/claims/claim-utils/displayClaims/displayClaims.component.ts index 6ec135dd..b185cb49 100644 --- a/claims/claim-utils/displayClaims/displayClaims.component.ts +++ b/claims/claim-utils/displayClaims/displayClaims.component.ts @@ -10,15 +10,17 @@ import {Session, User} from '../../../login/utils/helper.class'; import {EnvProperties} from '../../../utils/properties/env-properties'; import {LoginErrorCodes} from '../../../login/utils/guardHelper.class'; import {SEOService} from '../../../sharedComponents/SEO/SEO.service'; -import {IndexInfoService} from "../../../utils/indexInfo.service"; -import {ClaimDBRecord} from "../claimHelper.class"; -import {Dates} from "../../../utils/string-utils.class"; -import {HelperService} from "../../../utils/helper/helper.service"; -import {Meta, Title} from "@angular/platform-browser"; -import {PiwikService} from "../../../utils/piwik/piwik.service"; -import {properties} from "../../../../../environments/environment"; - +import {IndexInfoService} from '../../../utils/indexInfo.service'; +import {ClaimDBRecord} from '../claimHelper.class'; +import {Dates} from '../../../utils/string-utils.class'; +import {HelperService} from '../../../utils/helper/helper.service'; +import {Meta, Title} from '@angular/platform-browser'; +import {PiwikService} from '../../../utils/piwik/piwik.service'; +import {properties} from '../../../../../environments/environment'; +import {FormArray, FormBuilder, FormGroup} from '@angular/forms'; +import {Option} from '../../../sharedComponents/input/input.component'; +declare var UIkit; @Component({ selector: 'displayClaims', templateUrl: 'displayClaims.component.html', @@ -37,7 +39,8 @@ export class DisplayClaimsComponent { @Input() myClaims: boolean = false; @Input() isAdmin: boolean = false; page: number = 1; - size: number = 10; + size: number = 50; + defaultSize:number = 50; sizes = [10, 20, 30, 50]; keyword: string; // the keyword string to give to the request as parameter inputkeyword: string; // the string written in the input field (keyword=inputkeyword when its length is bigger than 3 and the user stops typing) @@ -53,21 +56,26 @@ export class DisplayClaimsComponent { lastIndexDate = null; @ViewChild(ModalLoading) loading: ModalLoading; + public filterForm: FormGroup; + public entitiesCtrl: FormArray; + + allOptions: Option[] = [{label: "Projects", value: {id:"project", label: "Projects"}},{label: "Publications", value:{id:"publication", label: "Publications"}},{label: "Research data", value: {id:"dataset", label: "Research data"}}, + {label: "Software", value: {id:"software", label: "Software"}},{label: "Other reserch products", value: {id:"other", label: "Other reserch products"}},{label: "Communities", value: {id:"community", label: "Communities"}}]; + + sortOptions: Option[] = [ + {label:"Date (recent) ", value:{ sort: "date", descending: true }}, {label:"Date (oldest) ", value:{ sort: "date",descending:false }}, + // {label:"User (desc) ", value:{ sort: "user",descending: true }}, {label:"User (asc) ", value:{ sort: "user",descending:false }}, + // {label:"Title (desc) ", value:{ sort: "source",descending: true }}, {label:"Title (asc) ", value:{ sort: "source",descending:false }}, + {label:"Title (desc) ", value:{ sort: "target",descending: true }}, {label:"Title (asc) ", value: { sort: "target",descending:false }}, + ]; - //checkboxes: - publicationCB = false; - datasetCB = false; - softwareCB = false; - otherCB = false; - contextCB = false; - projectCB = false; entityTypes: string[] = []; - descending = true; - sortby = "date"; + // descending = true; + // sortby = "date"; selected = []; - deleteMessage: string = ""; + // deleteMessage: string = ""; showErrorMessage: boolean = false; showForbiddenMessage: boolean = false; userValidMessage: string = ""; @@ -84,65 +92,79 @@ export class DisplayClaimsComponent { constructor(private _claimService: ClaimsService, private route: ActivatedRoute, private _router: Router, private location: Location, private _meta: Meta, private _title: Title, private _piwikService: PiwikService, - private seoService: SEOService, private indexInfoService: IndexInfoService, private helper: HelperService) { + private seoService: SEOService, private indexInfoService: IndexInfoService, private helper: HelperService, private _fb: FormBuilder) { } ngOnInit() { + this.entitiesCtrl = this._fb.array([]); + this.filterForm = this._fb.group({ + keyword: [''], + entities: this.entitiesCtrl, + sort: this._fb.control(this.sortOptions[0].value) + }); - this.properties = properties; - this.url = properties.domain + properties.baseLink + this._router.url; + this.properties = properties; + this.url = properties.domain + properties.baseLink + this._router.url; + if(!this.myClaims){ + this.sortOptions.push({label:"User (desc) ", value:{ sort: "user",descending: true }}); + this.sortOptions.push( {label:"User (asc) ", value:{ sort: "user",descending:false }}) + } + var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community"; + this.updateTitle(this.title); + this.updateDescription(description); + this.updateUrl(this.url); + if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { + this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe()); + } - var description = "Openaire, linking, claim, publication, research data, software, other research product, project, community"; - this.updateTitle(this.title); - this.updateDescription(description); - this.updateUrl(this.url); - if (this.properties.enablePiwikTrack && (typeof document !== 'undefined')) { - this.subscriptions.push(this._piwikService.trackView(this.properties, this.title, this.piwikSiteId).subscribe()); - } + this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { + this.pageContents = contents; + })); + this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => { + this.lastIndexDate = res; + })); + this.subscriptions.push(this.route.queryParams.subscribe(params => { + this.seoService.createLinkForCanonicalURL(this.url, false); - this.subscriptions.push(this.helper.getPageHelpContents(this.properties, this.communityId, this._router.url).subscribe(contents => { - this.pageContents = contents; + if (this.myClaims) { + this.fetchBy = "User"; + this.fetchId = this.user.email; + } else { + this.fetchBy = (this.fetchBy) ? this.fetchBy : params['fetchBy']; + this.fetchBy = (this.types.indexOf(this.fetchBy) != -1) ? this.fetchBy : 'All'; + this.fetchId = (this.fetchId) ? this.fetchId : params['fetchId']; + this.fetchId = this.fetchId ? this.fetchId : ''; + } + + let page = (params['page'] === undefined) ? 1 : +params['page']; + let size = (params['size'] === undefined) ? this.defaultSize : +params['size']; + + this.keyword = (params['keyword'] ? params['keyword'] : ""); + this.inputkeyword = this.keyword; + this.page = (page <= 0) ? 1 : page; + this.size = (size <= 0) ? this.defaultSize : size; + this.entityTypes = [];//(params['types']?params['types']:[]); + // this.setTypes(params['types']); // check the appropriate checkboxes + this.setSortby(params['sort']); + this.getClaims(); + this.subscriptions.push(this.searchTermStream + .pipe(debounceTime(300), distinctUntilChanged()) + .subscribe((term: string) => { + this.keyword = term; + this.page = 1; + this.goTo(); })); - this.subscriptions.push(this.indexInfoService.getLastIndexDate(this.properties).subscribe(res => { - this.lastIndexDate = res; - })); - this.subscriptions.push(this.route.queryParams.subscribe(params => { - this.seoService.createLinkForCanonicalURL(this.url, false); - - if (this.myClaims) { - this.fetchBy = "User"; - this.fetchId = this.user.email; - } else { - - this.fetchBy = (this.fetchBy) ? this.fetchBy : params['fetchBy']; - this.fetchBy = (this.types.indexOf(this.fetchBy) != -1) ? this.fetchBy : 'All'; - this.fetchId = (this.fetchId) ? this.fetchId : params['fetchId']; - this.fetchId = this.fetchId ? this.fetchId : ''; - } - - let page = (params['page'] === undefined) ? 1 : +params['page']; - let size = (params['size'] === undefined) ? 10 : +params['size']; - - this.keyword = (params['keyword'] ? params['keyword'] : ""); - this.inputkeyword = this.keyword; - this.page = (page <= 0) ? 1 : page; - this.size = (size <= 0) ? 10 : size; - this.entityTypes = [];//(params['types']?params['types']:[]); - this.setTypes(params['types']); // check the appropriate checkboxes - this.setSortby(params['sort']); - this.getClaims(); - this.subscriptions.push(this.searchTermStream - .pipe(debounceTime(300), distinctUntilChanged()) - .subscribe((term: string) => { - this.keyword = term; - this.page = 1; - this.goTo(); - })); - - })); - - - + this.subscriptions.push(this.filterForm.get('entities').valueChanges.subscribe(value => { + this.goTo(); + })); + this.subscriptions.push(this.filterForm.get('keyword').valueChanges.subscribe(value => { + this.changekeyword(); + })); + this.subscriptions.push(this.filterForm.get('sort').valueChanges.subscribe(value => { + console.log(value); + this.goTo(); + })); + })); } ngOnDestroy() { @@ -167,12 +189,13 @@ export class DisplayClaimsComponent { let types = ''; this.showErrorMessage = false; this.showForbiddenMessage = false; - for (let type of this.entityTypes) { - types += (types.length > 0 ? '&' : '') + "types=" + type; + for (let type of this.entitiesCtrl.getRawValue()) { + types += (this.entitiesCtrl.getRawValue().length > 0 ? '&' : '') + "types=" + type.id; } + console.log( this.fetchBy, this.fetchId) this.pageLoading = true; if (this.fetchBy == "Project") { - this.subscriptions.push(this._claimService.getClaimsByProject(this.size, this.page, this.fetchId, this.keyword, this.sortby, this.descending, types, this.properties.claimsAPIURL).subscribe( + this.subscriptions.push(this._claimService.getClaimsByProject(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe( data => { this.manageAPIData(data); this.pageLoading = false; @@ -182,7 +205,7 @@ export class DisplayClaimsComponent { } )); } else if (this.fetchBy == "User") { - this.subscriptions.push(this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.sortby, this.descending, types, this.properties.claimsAPIURL).subscribe( + this.subscriptions.push(this._claimService.getClaimsByUser(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe( data => { this.manageAPIData(data); this.pageLoading = false; @@ -193,7 +216,7 @@ export class DisplayClaimsComponent { } )); } else if (this.fetchBy == "Result") { - this.subscriptions.push(this._claimService.getClaimsByResult(this.size, this.page, this.fetchId, this.keyword, this.sortby, this.descending, types, this.properties.claimsAPIURL).subscribe( + this.subscriptions.push(this._claimService.getClaimsByResult(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe( data => { this.manageAPIData(data); this.pageLoading = false; @@ -204,7 +227,7 @@ export class DisplayClaimsComponent { } )); } else if (this.fetchBy == "Context") { - this.subscriptions.push(this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.sortby, this.descending, types, this.properties.claimsAPIURL).subscribe( + this.subscriptions.push(this._claimService.getClaimsBycontext(this.size, this.page, this.fetchId, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe( data => { this.manageAPIData(data); this.pageLoading = false; @@ -215,7 +238,7 @@ export class DisplayClaimsComponent { } )); } else { - this.subscriptions.push(this._claimService.getClaims(this.size, this.page, this.keyword, this.sortby, this.descending, types, this.properties.claimsAPIURL).subscribe( + this.subscriptions.push(this._claimService.getClaims(this.size, this.page, this.keyword, this.filterForm.get("sort").value.sort, this.filterForm.get("sort").value.descending, types, this.properties.claimsAPIURL).subscribe( data => { this.manageAPIData(data); this.pageLoading = false; @@ -230,21 +253,6 @@ export class DisplayClaimsComponent { } manageAPIData(data) { - // let d = new Date(); - // let dateTomillis = d.getTime(); - // let millis24h: number = 24 * 3600000; - // if(this.showLatestClaims && this.recentClaims.length == 0){ - // this.recentClaims = []; - // for(var i=0;i 0 ? '&' : '') + "page=" + this.page); params += (this.size == 10 ? "" : (params.length > 0 ? '&' : '') + "size=" + this.size); - // params+=(this.validEntityTypes==''?"":(params.length>0?'&':'')+"types="+this.validEntityTypes); let types = ""; - for (let type of this.entityTypes) { - types += (types.length > 0 ? ',' : '') + type; + for (let type of this.entitiesCtrl.getRawValue()) { + types += (this.entitiesCtrl.getRawValue().length > 0 ? ',' : '') + type.id; } - params += (types.length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : ""; - + params += (this.entitiesCtrl.getRawValue().length > 0) ? (params.length > 0 ? '&' : '') + "types=" + types : ""; if (this.isAdmin) { params += (this.fetchBy == 'All' ? "" : (params.length > 0 ? '&' : '') + "fetchBy=" + this.fetchBy); params += (this.fetchId == '' ? "" : (params.length > 0 ? '&' : '') + "fetchId=" + this.fetchId); } - params += (this.getSortby() == 'datedesc' ? "" : (params.length > 0 ? '&' : '') + "sort=" + this.getSortby()); + params += (this.filterForm.get("sort").value.sort == 'date' && this.filterForm.get("sort").value.descending ? "" : (params.length > 0 ? '&' : '') + "sort=" +this.filterForm.get("sort").value.sort + "-" + this.filterForm.get("sort").value.descending); params += (this.keyword == '' ? "" : (params.length > 0 ? '&' : '') + "keyword=" + this.keyword); if (this.communityId != null) { params += "&communityId=" + this.communityId; @@ -337,130 +312,26 @@ export class DisplayClaimsComponent { return params; } - changeSize() { - this.goTo(); - } - - - changeOrderby(sortby: string) { - if (sortby == this.sortby) { - this.descending = !this.descending; - } else { - this.sortby = sortby; - this.descending = false; - } - this.goTo(); - } - setSortby(sortby: string) { - if (!sortby || sortby == "datedesc") { - this.descending = true; - this.sortby = "date"; - } else if (sortby == "dateasc") { - this.descending = false; - this.sortby = "date"; - } else if (sortby == "userasc") { - this.descending = false; - this.sortby = "user"; - } else if (sortby == "userdesc") { - this.descending = true; - this.sortby = "user"; - } - if (sortby == "sourceasc") { - this.descending = false; - this.sortby = "source"; - } else if (sortby == "sourcedesc") { - this.descending = true; - this.sortby = "source"; - } else if (sortby == "targetasc") { - this.descending = false; - this.sortby = "target"; - } else if (sortby == "targetdesc") { - this.descending = true; - this.sortby = "target"; - } - } - - getSortby(): string { - if (this.descending) { - return this.sortby + "desc"; - } else { - return this.sortby + "asc"; + let sort = "date"; + let desc = "desc"; + if(sortby && sortby.split("-").length == 2){ + sort = sortby.split("-")[0]; + desc = sortby.split("-")[1]; } - } - - changeType() { - this.entityTypes = []; - if (this.publicationCB) { - this.entityTypes.push('publication'); - } - if (this.datasetCB) { - this.entityTypes.push('dataset'); - } - if (this.softwareCB) { - this.entityTypes.push('software'); - } - if (this.otherCB) { - this.entityTypes.push('other'); - } - if (this.projectCB) { - this.entityTypes.push('project'); - } - if (this.contextCB) { - this.entityTypes.push('context'); - } - - this.goTo(); - } - - setTypes(types: string) { - if (!types) { - return; - } - if (types.length > 0) { - this.entityTypes = []; - if (types.indexOf("publication") != -1) { - this.publicationCB = true; - this.entityTypes.push("publication"); - } - if (types.indexOf("dataset") != -1) { - this.datasetCB = true; - this.entityTypes.push("dataset"); - } - if (types.indexOf("software") != -1) { - this.softwareCB = true; - this.entityTypes.push("software"); - } - if (types.indexOf("other") != -1) { - this.otherCB = true; - this.entityTypes.push("other"); - } - if (types.indexOf("project") != -1) { - this.projectCB = true; - this.entityTypes.push("project"); - } - if (types.indexOf("context") != -1) { - this.contextCB = true; - this.entityTypes.push("context"); - } - } - if (this.publicationCB && this.datasetCB && this.softwareCB && this.otherCB && this.contextCB && this.projectCB) { - this.entityTypes = []; - } + let option = this.sortOptions.find( option => option.value.sort == sort && ((option.value.descending && desc=="desc") || (!option.value.descending && desc=="asc"))); + this.filterForm.get("sort").setValue(option?option.value:this.sortOptions[0].value); } changekeyword() { - if (this.inputkeyword.length >= 3 || this.inputkeyword.length == 0) { - this.searchTermStream.next(this.inputkeyword); - + if (this.filterForm.get("keyword").value.length >= 3 || this.filterForm.get("keyword").value.length == 0) { + this.searchTermStream.next(this.filterForm.get("keyword").value); } - } select(item: any, event) { - this.deleteMessage = ""; let value = event.currentTarget.checked; if (value) { this.selected.push(item); @@ -484,10 +355,8 @@ export class DisplayClaimsComponent { let claim = this.claims[_i]; this.selected.push(claim); } - this.deleteMessage = ""; } else { this.selected = []; - this.deleteMessage = ""; } } @@ -522,7 +391,6 @@ export class DisplayClaimsComponent { } delete() { - this.deleteMessage = ""; this.loading.open(); this.claimsDeleted = 0; let ids = []; @@ -570,11 +438,20 @@ export class DisplayClaimsComponent { this.resultsNum = this.resultsNum - res.deletedIds.length; this.loading.close(); if (res.deletedIds.length > 0) { - this.deleteMessage = this.deleteMessage + '
' + res.deletedIds.length + ' link(s) successfully deleted.
'; + UIkit.notification('
' + res.deletedIds.length + ' link(s) successfully deleted.
', { + status: 'success', + timeout: 6000, + pos: 'bottom-right' + }); } if (res.notFoundIds.length > 0) { - this.deleteMessage = this.deleteMessage + '
' + res.notFoundIds.length + ' link(s) couldn\'t be deleted.
'; + UIkit.notification('
' + res.notFoundIds.length + ' link(s) couldn\'t be deleted.
', { + status: 'danger', + timeout: 6000, + pos: 'bottom-right' + }); } + let goToPage = this.page; if (this.totalPages(this.resultsNum) < this.page && this.page > 0) { goToPage = this.page - 1; diff --git a/claims/claim-utils/displayClaims/displayClaims.module.ts b/claims/claim-utils/displayClaims/displayClaims.module.ts index ce4b738e..d70b2c15 100644 --- a/claims/claim-utils/displayClaims/displayClaims.module.ts +++ b/claims/claim-utils/displayClaims/displayClaims.module.ts @@ -2,7 +2,7 @@ import { NgModule} from '@angular/core'; import { CommonModule } from '@angular/common'; import { FormsModule } from '@angular/forms'; import { RouterModule } from '@angular/router'; -import { MatSelectModule } from "@angular/material"; +import {MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSelectModule, MatSlideToggleModule} from '@angular/material'; import {ClaimServiceModule} from '../service/claimsService.module'; import {DisplayClaimsComponent} from './displayClaims.component'; import {LoadingModalModule} from '../../../utils/modal/loadingModal.module'; @@ -14,12 +14,15 @@ import {Schema2jsonldModule} from '../../../sharedComponents/schema2jsonld/schem import { SEOServiceModule } from '../../../sharedComponents/SEO/SEOService.module'; import {IndexInfoServiceModule} from "../../../utils/indexInfoService.module"; import {PiwikServiceModule} from "../../../utils/piwik/piwikService.module"; +import {SearchInputModule} from '../../../sharedComponents/search-input/search-input.module'; +import {InputModule} from '../../../sharedComponents/input/input.module'; +import {LoadingModule} from '../../../utils/loading/loading.module'; @NgModule({ imports: [ CommonModule, FormsModule, RouterModule, ClaimServiceModule, LoadingModalModule, AlertModalModule, ClaimEntityFormatterModule, PagingModule, HelperModule, Schema2jsonldModule, SEOServiceModule, PiwikServiceModule, - IndexInfoServiceModule, MatSelectModule + IndexInfoServiceModule, MatSelectModule, SearchInputModule, MatAutocompleteModule, MatChipsModule, MatFormFieldModule, MatSlideToggleModule, InputModule, LoadingModule ], declarations: [ diff --git a/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts b/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts index 0424e98d..4c38696c 100644 --- a/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts +++ b/claims/claim-utils/entityFormatter/claimEntityFormatter.component.ts @@ -8,82 +8,23 @@ import {ClaimDBContext, ClaimDBProject, ClaimDBResult} from "../claimHelper.clas @Component({ selector: 'claim-entity', template: ` -
-
publication
- +
+
{{type == 'publication'?'publication':(type == 'dataset'?'research data':(type == 'other'?'other':'software'))}}
+ + Link to {{type == 'publication'?'publication':(type == 'dataset'?'research data':(type == 'other'?'other':'software'))}}:
-
-
research data
- - -
-
-
software
- - -
-
-
other
- - -
+
-
project
- + Link to project: +
-
community
- - {{entity.title}} + Link to community: {{entity.title}}
` }) @@ -93,6 +34,7 @@ export class ClaimEntityFormatter { @Input() type: string; @Input() properties: EnvProperties; @Input() externalPortalUrl: string = null; + @Input() source: boolean = true; constructor() { } diff --git a/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts b/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts index 76acba43..be9d9370 100644 --- a/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts +++ b/claims/claim-utils/entityFormatter/projectTitleFormatter.component.ts @@ -7,19 +7,19 @@ import {properties} from "../../../../../environments/environment"; @Component({ selector: 'project-title', template: ` - + {{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}} - + {{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}} -
- Funder {{project['funderName']}} -
+ + Funder: {{project['funderName']}} + ` }) diff --git a/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts b/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts index 2b0acf5a..5dad97fe 100644 --- a/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts +++ b/claims/claim-utils/entityFormatter/publicationTitleFormatter.component.ts @@ -6,14 +6,14 @@ import {RouterHelper} from '../../../utils/routerHelper.class'; @Component({ selector: 'publication-title', template: ` - + {{entity.title?entity.title:"[No title available]"}} - + {{entity.title}} diff --git a/claims/claimsAdmin/claimsAdmin.component.ts b/claims/claimsAdmin/claimsAdmin.component.ts index 4069af44..d97d4cbb 100644 --- a/claims/claimsAdmin/claimsAdmin.component.ts +++ b/claims/claimsAdmin/claimsAdmin.component.ts @@ -12,17 +12,13 @@ import {Subscriber} from "rxjs"; template: `
-
+
-
-
+
+
Manage links
- -
-
--> -
-
+ +
+
User Email Preferences for Claims Notifications
@@ -14,34 +12,23 @@
-
    - - -
  • -
    Email preferences for {{preferencesFor}}: {{notification.openaireName}}
    -
    + +
    + +
    -
    -
    Notify for claims:
    - -
    - - - - -
    +
    +
    Notify + for new user links:
    + +
    - -
    +
    Frequency: