Skip to content

Commit

Permalink
Merge pull request #2223 from ORCID/fix/batch-fixes-april-3-2024
Browse files Browse the repository at this point in the history
batch-fixes-april-3-2024
  • Loading branch information
leomendoza123 authored Apr 3, 2024
2 parents 70213a9 + 50f125f commit 9a3a408
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 252 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,37 @@ <h1 class="orc-font-heading-small" i18n="@@authorize.authorize">
></ng-container>
<div>{{ getDescription(scope) }}</div>
</div>
<div class="disclaimer-box" *ngIf="last">
<p class="mat-caption m-t-0">
<ng-container i18n="@@authorize.ifAuthorize">
If authorized, this organization will have access to your
ORCID record, as outlined above and described in further
detail in</ng-container
>
<a
href="{{ environment.INFO_SITE + 'privacy-policy' }}"
target="_blank"
rel="noopener noreferrer"
class="underline"
i18n="@@authorize.privacyPolicy"
>ORCID’s privacy policy.</a
>
</p>
<p class="mat-caption">
<ng-container i18n="@@authorize.youCanManage">
You can manage access permissions for this and other Trusted
Organizations in your
</ng-container>
<a
href="/account#manage-permissions"
target="_blank"
rel="noopener noreferrer"
class="underline"
i18n="@@authorize.accountSettings"
>account settings.</a
>
</p>
</div>
<mat-divider *ngIf="last"></mat-divider>
</li>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,3 +131,12 @@ mat-card-content.authorize-content {
justify-content: center;
}
}

.disclaimer-box {
margin: 24px 0px;
display: flex;
flex-direction: column;
:first-child {
margin-bottom: 12px;
}
}
8 changes: 3 additions & 5 deletions src/app/cdk/side-bar/side-bar/side-bar.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class="orc-font-body-large"
[ngClass]="{
'sr-only':
!loadingUserRecord && isPublicRecord ? !newRecordHeaderTogglz : true
!loadingUserRecord && isPublicRecord ? false : true
}"
i18n="@@shared.personalInformation"
>
Expand All @@ -18,15 +18,13 @@
i18n="@@record.noPersonalInformation"
*ngIf="
!loadingUserRecord && isPublicRecord
? newRecordHeaderTogglz
? !displaySideBar
: false
? !displaySideBar
: false
"
>
No personal information available
</p>
<ng-container *ngIf="isPublicRecord ? !newRecordHeaderTogglz : true">
<ng-container *ngIf="isPublicRecord ? false : true">
<app-side-bar-id
*ngIf="!hideOrcidId"
[ngClass]="{
Expand Down
1 change: 0 additions & 1 deletion src/app/cdk/side-bar/side-bar/side-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export class SideBarComponent implements OnInit, OnDestroy {
@Input() isPublicRecord: string
@Input() orcidId = false
@Input() hideOrcidId = false
@Input() newRecordHeaderTogglz: boolean
@Input() loadingUserRecord: boolean

modalCountryComponent = ModalCountryComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,40 +1,3 @@
<section
[id]="'status-bar'"
role="region"
[attr.aria-label]="regionStatusBar"
*ngIf="!newRecordHeaderTogglz && iAmEditingThisRecord && isPublicRecord"
[ngClass]="{ 'yellow-bg': !isMyRecord }"
>
<div class="container">
<div class="content">
<div
class="margin-end"
i18n="@@topBar.youArePreviewing"
*ngIf="!isMyRecord"
>
You are previewing a public version of this record
</div>
<div
class="margin-end"
i18n="@@topBar.youArePreviewingSomeElse"
*ngIf="isMyRecord"
>
You are previewing the public version of your record
</div>
<img
class="margin-end"
src="assets/vectors/orcid.logo.icon.svg"
alt="orcid logo"
/>
<strong class="margin-end">{{ effectiveRecord }}</strong>
<a class="margin-end" href="/my-orcid" i18n="@@topBar.editThisRecord"
>Edit this record</a
>
</div>
</div>

<mat-divider class="bottom-divider"></mat-divider>
</section>

<section
[id]="'status-bar'"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
})
export class TopBarMyPublicRecordPreviewComponent implements OnInit {
@Input() isPublicRecord: string
@Input() newRecordHeaderTogglz: boolean
iAmEditingThisRecord = false
isMyRecord: boolean
effectiveRecord: string
Expand Down
145 changes: 3 additions & 142 deletions src/app/record/components/top-bar/top-bar.component.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
<mat-progress-bar
*ngIf="!newRecordHeaderTogglz && loadingUserRecord"
mode="indeterminate"
color="accent"
></mat-progress-bar>
<app-top-bar-record-issues
*ngIf="!newRecordHeaderTogglz"
[isPublicRecord]="isPublicRecord"
></app-top-bar-record-issues>

<app-top-bar-actions
[ariaLabelName]="ariaLabelName"
[userRecord]="userRecord"
[userStatus]="userStatus"
[isPublicRecord]="isPublicRecord"
*ngIf="
newRecordHeaderTogglz
? !isPublicRecord && !recordWithIssues
: !recordWithIssues
"
*ngIf="!isPublicRecord && !recordWithIssues"
[showPrintButton]="!platform.columns12"
></app-top-bar-actions>

Expand Down Expand Up @@ -151,134 +137,12 @@ <h1 class="name" *ngIf="creditName">
mobile: !platform.columns12
}"
>
<section
[id]="'names'"
role="region"
[attr.aria-label]="regionNames"
*ngIf="
!newRecordHeaderTogglz && (userRecord?.names || userRecord?.otherNames)
"
>
<div class="row names-container">
<div class="published-name" *ngIf="creditName">
<div
class="row mat-caption description"
i18n="@@topBar.publishedName"
>
Published Name
</div>
<h1 class="name orc-font-heading-small">{{ creditName }}</h1>
</div>
<div
class="published-name"
*ngIf="!creditName && (givenNames || familyName)"
>
<div class="row mat-caption description" i18n="@@topBar.name">
Name
</div>
<h1 class="name orc-font-heading-small">
{{ givenNames + ' ' + familyName }}
</h1>
</div>
<div class="row names-wrapper">
<div
class="names"
[ngClass]="{
col: platform.columns12,
'row mobile': !platform.columns12,
'names-extended': expandedContent
}"
*ngIf="creditName"
>
<div class="names-content">
<div class="mat-caption description" i18n="@@topBar.name">
Name
</div>
<div class="orc-font-body-small">
<ng-container *ngIf="givenNames">
{{ givenNames + ' ' }}
</ng-container>
{{ familyName }}
</div>
</div>
</div>
<div
class="other-names"
[ngClass]="{
col: platform.columns12,
'row mobile': !platform.columns12,
'other-names-no-border': expandedContent
}"
*ngIf="userRecord.otherNames?.otherNames.length > 0"
>
<div
class="row space-between"
[ngClass]="{
'other-names-extended': expandedContent
}"
>
<div class="col l10 mat-caption other-names-wrapper">
<div class="other-names-content">
<div class="description" i18n="@@topBar.alsoKnowAs">
Also known as
</div>
<p class="orc-font-body-small" *ngIf="!expandedContent">
{{ otherNames }}
</p>
<ng-container
*ngFor="
let otherNames of userRecord.otherNames?.otherNames;
index as i;
let last = last
"
>
<div class="row other-name" *ngIf="expandedContent">
<div class="row">
<b class="orc-font-body-small">
{{ otherNames.content }}
</b>
</div>
<app-panel-element-source
[isLastItem]="last"
*ngIf="true"
[name]="otherNames.sourceName || otherNames.source"
[date]="
otherNames.createdDate | monthDayYearDateToString
"
[assertion]="
otherNames.assertionOriginName ||
otherNames.assertionOriginOrcid
"
>
</app-panel-element-source>
</div>
</ng-container>
</div>
</div>
<div>
<app-panel-expand-buttons
panelType="top-bar"
panelId="also-know-as"
(toggle)="collapse()"
[openState]="expandedContent"
></app-panel-expand-buttons>
</div>
</div>
</div>
</div>
</div>
</section>

<app-top-bar-actions
[ariaLabelName]="ariaLabelName"
[userRecord]="userRecord"
[userStatus]="userStatus"
[isPublicRecord]="isPublicRecord"
*ngIf="
newRecordHeaderTogglz
? !isPublicRecord && !recordWithIssues && !platform.columns12
: !recordWithIssues && !platform.columns12
"
*ngIf="!isPublicRecord && !recordWithIssues && !platform.columns12"
[showIsThisYouButton]="true"
></app-top-bar-actions>

Expand All @@ -288,10 +152,7 @@ <h1 class="name orc-font-heading-small">
[attr.aria-label]="regionBiography"
*ngIf="userRecord?.biography?.biography"
>
<div
class="biography-container"
[ngClass]="{ 'no-margin-top': newRecordHeaderTogglz }"
>
<div class="biography-container no-margin-top">
<h2 class="biography-header orc-font-body" i18n="@@topBar.biography">
Biography
</h2>
Expand Down
1 change: 0 additions & 1 deletion src/app/record/components/top-bar/top-bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export class TopBarComponent implements OnInit, OnDestroy {
checkEmailValidated: boolean
inDelegationMode: boolean
@Input() loadingUserRecord = true
@Input() newRecordHeaderTogglz: boolean

regionNames = $localize`:@@topBar.names:Names`
regionBiography = $localize`:@@topBar.biography:Biography`
Expand Down
Loading

0 comments on commit 9a3a408

Please sign in to comment.