@@ -17,6 +30,7 @@
[isPublicRecord]="publicOrcid"
class="row"
[loadingUserRecord]="loadingUserRecord"
+ [newRecordHeaderTogglz]="newRecordHeaderTogglz"
>
error
diff --git a/src/app/record/pages/my-orcid/my-orcid.component.scss-theme.scss b/src/app/record/pages/my-orcid/my-orcid.component.scss-theme.scss
index 4be10231a8..7921c4c753 100644
--- a/src/app/record/pages/my-orcid/my-orcid.component.scss-theme.scss
+++ b/src/app/record/pages/my-orcid/my-orcid.component.scss-theme.scss
@@ -11,6 +11,10 @@
.no-public-info {
color: mat.get-color-from-palette($background, dark-grey);
}
+
+ .new-header {
+ background-color: transparent;
+ }
}
@include my-orcid-theme($orcid-app-theme);
diff --git a/src/app/record/pages/my-orcid/my-orcid.component.ts b/src/app/record/pages/my-orcid/my-orcid.component.ts
index df00ce5585..6ab434490b 100644
--- a/src/app/record/pages/my-orcid/my-orcid.component.ts
+++ b/src/app/record/pages/my-orcid/my-orcid.component.ts
@@ -70,6 +70,7 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
regionActivities = $localize`:@@shared.activities:Activities`
readyForIndexing: boolean
fragment: string
+ newRecordHeaderTogglz = false
constructor(
_userInfoService: UserInfoService,
@@ -211,6 +212,10 @@ export class MyOrcidComponent implements OnInit, OnDestroy {
}
}
+ if (togglz.messages['NEW_RECORD_HEADER'] === 'true') {
+ this.newRecordHeaderTogglz = true
+ }
+
if (togglz.messages['CRAZY_EGG'] === 'true') {
this._scriptService
.load({
diff --git a/src/app/record/record.module.ts b/src/app/record/record.module.ts
index 5a4c34317a..a2c5b08684 100644
--- a/src/app/record/record.module.ts
+++ b/src/app/record/record.module.ts
@@ -77,7 +77,9 @@ import { TopBarMyPublicRecordPreviewModule } from '../cdk/top-bar-my-public-reco
import { WorkContributorRolesComponent } from './components/work-contributor-role/work-contributor-roles.component'
import { WorkContributorsComponent } from './components/work-contributors/work-contributors.component'
import { VisibilitySelectorModule } from '../cdk/visibility-selector/visibility-selector.module'
-import { TopBarVerificationEmailModule } from '../cdk/top-bar-verification-email/top-bar-verification-email.module'
+import { TopBarVerificationEmailModule } from '../cdk/top-bar-verification-email/top-bar-verification-email.module';
+import { RecordHeaderComponent } from './components/record-header/record-header.component';
+import { RecordInfoComponent } from './components/record-info/record-info.component'
@NgModule({
declarations: [
@@ -129,6 +131,8 @@ import { TopBarVerificationEmailModule } from '../cdk/top-bar-verification-email
ModalCombineWorksWithSelectorComponent,
WorkContributorRolesComponent,
WorkContributorsComponent,
+ RecordHeaderComponent,
+ RecordInfoComponent,
],
imports: [
CommonModule,
diff --git a/src/app/shared/utils/names.util.ts b/src/app/shared/utils/names.util.ts
new file mode 100644
index 0000000000..1838931d98
--- /dev/null
+++ b/src/app/shared/utils/names.util.ts
@@ -0,0 +1,70 @@
+import { Assertion } from "src/app/types"
+import { UserRecord } from "src/app/types/record.local"
+
+export class NamesUtil {
+
+ static getGivenNames(userRecord: UserRecord): string {
+ return userRecord?.names?.givenNames
+ ? userRecord.names.givenNames.value
+ : ''
+ }
+
+ static getFamilyName(userRecord: UserRecord): string {
+ return userRecord?.names?.familyName
+ ? userRecord.names.familyName.value
+ : ''
+ }
+
+ static getCreditName(userRecord: UserRecord): string {
+ return userRecord?.names?.creditName
+ ? userRecord.names.creditName.value
+ : ''
+ }
+
+ static isNamePublicAndAffiliations(userRecord: UserRecord, affiliations: number): boolean {
+ if (
+ affiliations === 0 &&
+ !!this.getGivenNames(userRecord) ||
+ !!this.getFamilyName(userRecord) ||
+ !!this.getCreditName(userRecord)
+ ) {
+ return true
+ }
+ return false
+ }
+
+ static getAriaLabelName(userRecord: UserRecord,ariaLabelName: string): string {
+ if (userRecord?.names) {
+ if (userRecord?.names?.creditName?.value) {
+ return userRecord?.names?.creditName?.value
+ } else {
+ if (userRecord?.names?.givenNames?.value) {
+ return userRecord?.names?.givenNames?.value
+ }
+ if (userRecord?.names?.familyName?.value) {
+ if (ariaLabelName) {
+ return ariaLabelName + ' ' + userRecord?.names?.familyName?.value
+ } else {
+ return userRecord?.names?.familyName?.value
+ }
+ }
+ }
+ }
+ return
+ }
+
+ static getOtherNamesUnique(otherNames: Assertion[]): string {
+ return otherNames
+ .map((otherName) => {
+ return otherName.content
+ })
+ .filter(function (item, pos, array) {
+ return (
+ array
+ .map((x) => x.toLowerCase().trim())
+ .indexOf(item.toLowerCase().trim()) === pos
+ )
+ })
+ .join(', ')
+ }
+}
diff --git a/src/locale/properties/top-bar/top-bar.en.properties b/src/locale/properties/top-bar/top-bar.en.properties
index eee1347bbc..d569d4445e 100644
--- a/src/locale/properties/top-bar/top-bar.en.properties
+++ b/src/locale/properties/top-bar/top-bar.en.properties
@@ -98,3 +98,17 @@ topBar.ariaLabelDeleteOtherName=Delete other name
topBar.addBiography=Add your biography
topBar.weHaveSentForCredentials=We have sent verification messages to each of your registered email addresses. You will need to verify your primary email address before you can register your ORCID Public API credentials.
developerTools.ariaLabelClose=Close
+topBar.copyId=Copy iD
+topBar.printableRecord=Printable record
+topBar.whenOrcidDeactivated=When an ORCID record is deactivated all information in the record is deleted. Deactivated records are not shown in registry searches.
+topBar.findOutReactivating=Find out more about reactivating an ORCID account
+topBar.weLockRecords=We lock records when they violate conditions of our
+topBar.termsOfService=terms of service.
+topBar.recordLockedInError=If you feel this record has been locked in error please
+topBar.contactOrcid=contact ORCID support for further assistance.
+topBar.deprecatedRecordIsDuplicate=A deprecated record is a duplicate or unwanted ORCID record that has been merged with another owned by the same person.
+topBar.findOutMoreAboutRemoving=Find out more about removing additional or duplicate ORCID records
+topBar.recordOwnerNotHaveAdded=The record owner may not have added information to their record or the visibility for items on their record may be to Trusted parties or Only me.
+topBar.findOutVisibility=Find out more about visibility settings in ORCID
+topBar.ariaLabelCopyOrcidId=Copy your ORCID iD to the clipboard
+topBar.ariaLabelViewPrintable=View a printable version of your ORCID record (Opens in new tab)