diff --git a/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.html b/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.html index 1147b131f2..aed035d173 100644 --- a/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.html +++ b/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.html @@ -6,7 +6,7 @@
+ {{ count - 3 }} {{ moreLabelSingular diff --git a/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.ts b/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.ts index e031e36e0b..daa9a0b281 100644 --- a/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.ts +++ b/src/app/cdk/trusted-summary/component/summary-panel/summary-panel.component.ts @@ -22,6 +22,8 @@ export class SummaryPanelComponent implements OnInit { @Input() moreLabelSingular: string = '' @Input() showToPresent = true @Input() hoverEffect = false + @Input() standaloneMode: boolean + @Input() activitySection: string activitiesToDisplay: ActivitySummary[] acitivityCountOverflow: boolean unsubscribe = new Subject() @@ -47,4 +49,10 @@ export class SummaryPanelComponent implements OnInit { } this._window.open(url, '_blank') } + goToActivitySection(activitySection: string) { + this.standaloneMode ? this.goToUrl(this.url) : this.scrollTo(activitySection) + } + scrollTo(activitySection: string) { + document.querySelector(`#${activitySection}`).scrollIntoView() + } } diff --git a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.html b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.html index 156537c9a1..a61731c28c 100644 --- a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.html +++ b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.html @@ -116,11 +116,10 @@

>

[moreLabel]="labelMoreAffiliations" [moreLabelSingular]="labelMoreAffiliation" [hoverEffect]="affiliationsHover" + [standaloneMode]="standaloneMode" + [activitySection]="'affiliations'" > @@ -192,11 +193,10 @@

>

>

[count]="trustedSummary.professionalActivitiesCount" [moreLabel]="labelMoreProfessionalActivities" [moreLabelSingular]="labelMoreProfessionalActivitie" + [standaloneMode]="standaloneMode" + [activitySection]="'professional-activities'" >