Skip to content

Commit 2f93fff

Browse files
committed
fix(preprint-details): updated order
1 parent a2c7f0e commit 2f93fff

File tree

6 files changed

+42
-37
lines changed

6 files changed

+42
-37
lines changed

src/app/features/preprints/components/preprint-details/general-information/general-information.component.html

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,7 @@ <h3>{{ 'preprints.preprintStepper.common.labels.abstract' | translate }}</h3>
2424
<osf-affiliated-institutions-view [institutions]="affiliatedInstitutions()" />
2525
}
2626

27-
@if (preprintValue.nodeId) {
28-
<section class="flex flex-column gap-2">
29-
<h3>{{ 'preprints.details.supplementalMaterials' | translate }}</h3>
30-
<a class="font-bold flex gap-1" [href]="nodeLink()">
31-
{{ nodeLink() }}
32-
<osf-icon iconClass="fa fa-external-link-alt" />
33-
</a>
34-
</section>
35-
}
36-
3727
@if (preprintProvider()?.assertionsEnabled) {
38-
<section class="flex flex-column gap-2">
39-
<h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.conflictOfInterest' | translate }}</h3>
40-
41-
@if (preprintValue.hasCoi) {
42-
{{ preprintValue.coiStatement }}
43-
} @else {
44-
<p>{{ 'preprints.preprintStepper.review.sections.authorAssertions.noCoi' | translate }}</p>
45-
}
46-
</section>
47-
4828
<section class="flex flex-column gap-2">
4929
<h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.publicData' | translate }}</h3>
5030

@@ -105,6 +85,28 @@ <h3>
10585
</section>
10686
}
10787

88+
@if (preprintValue.nodeId) {
89+
<section class="flex flex-column gap-2">
90+
<h3>{{ 'preprints.details.supplementalMaterials' | translate }}</h3>
91+
<a class="font-bold flex gap-1" [href]="nodeLink()">
92+
{{ nodeLink() }}
93+
<osf-icon iconClass="fa fa-external-link-alt" />
94+
</a>
95+
</section>
96+
}
97+
98+
@if (preprintProvider()?.assertionsEnabled) {
99+
<section class="flex flex-column gap-2">
100+
<h3>{{ 'preprints.preprintStepper.review.sections.authorAssertions.conflictOfInterest' | translate }}</h3>
101+
102+
@if (preprintValue.hasCoi) {
103+
{{ preprintValue.coiStatement }}
104+
} @else {
105+
<p>{{ 'preprints.preprintStepper.review.sections.authorAssertions.noCoi' | translate }}</p>
106+
}
107+
</section>
108+
}
109+
108110
<osf-preprint-doi-section
109111
[preprintProvider]="preprintProvider()"
110112
(preprintVersionSelected)="preprintVersionSelected.emit($event)"

src/app/features/preprints/components/preprint-details/general-information/general-information.component.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { ChangeDetectionStrategy, Component, computed, effect, inject, input, On
99
import { FormsModule } from '@angular/forms';
1010

1111
import { ENVIRONMENT } from '@core/provider/environment.provider';
12-
import { PreprintDoiSectionComponent } from '@osf/features/preprints/components/preprint-details/preprint-doi-section/preprint-doi-section.component';
1312
import { ApplicabilityStatus, PreregLinkInfo } from '@osf/features/preprints/enums';
1413
import { PreprintProviderDetails } from '@osf/features/preprints/models';
1514
import { FetchPreprintById, PreprintSelectors } from '@osf/features/preprints/store/preprint';
@@ -18,10 +17,17 @@ import {
1817
ContributorsListComponent,
1918
IconComponent,
2019
TruncatedTextComponent,
21-
} from '@shared/components';
22-
import { ResourceType } from '@shared/enums';
23-
import { ContributorsSelectors, GetAllContributors, ResetContributorsState } from '@shared/stores';
24-
import { FetchResourceInstitutions, InstitutionsSelectors } from '@shared/stores/institutions';
20+
} from '@osf/shared/components';
21+
import { ResourceType } from '@osf/shared/enums';
22+
import {
23+
ContributorsSelectors,
24+
FetchResourceInstitutions,
25+
GetAllContributors,
26+
InstitutionsSelectors,
27+
ResetContributorsState,
28+
} from '@osf/shared/stores';
29+
30+
import { PreprintDoiSectionComponent } from '../preprint-doi-section/preprint-doi-section.component';
2531

2632
@Component({
2733
selector: 'osf-preprint-general-information',

src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<section class="p-card p-card-body card gap-4 file-section-height">
1+
<section class="p-card p-card-body card gap-4 flex flex-1 file-section-height">
22
@if (safeLink()) {
33
<iframe
44
[src]="safeLink()"

src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.scss

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1+
:host {
2+
display: flex;
3+
flex: 1;
4+
}
5+
16
.file-section-height {
27
min-height: 400px;
3-
4-
&.medium {
5-
min-height: 700px;
6-
}
7-
8-
&.large {
9-
min-height: 1100px;
10-
}
118
}
129

1310
.card {

src/app/features/preprints/components/preprint-details/preprint-file-section/preprint-file-section.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ import { DomSanitizer } from '@angular/platform-browser';
1313

1414
import { ProviderReviewsWorkflow } from '@osf/features/preprints/enums';
1515
import { PreprintSelectors } from '@osf/features/preprints/store/preprint';
16+
import { LoadingSpinnerComponent } from '@osf/shared/components';
1617
import { IS_LARGE, IS_MEDIUM } from '@osf/shared/helpers';
17-
import { LoadingSpinnerComponent } from '@shared/components';
18-
import { DataciteService } from '@shared/services/datacite/datacite.service';
18+
import { DataciteService } from '@osf/shared/services/datacite/datacite.service';
1919

2020
@Component({
2121
selector: 'osf-preprint-file-section',

src/app/features/preprints/pages/preprint-details/preprint-details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h1>{{ preprint()?.title }}</h1>
103103

104104
@if (!preprint()?.dateWithdrawn) {
105105
<section class="flex-1 flex flex-column gap-4 align-items-start lg:flex-row">
106-
<section class="w-12 lg:w-8">
106+
<section class="flex flex-column flex-1 h-full w-12 lg:w-8">
107107
<osf-preprint-file-section [providerReviewsWorkflow]="preprintProvider()?.reviewsWorkflow || null" />
108108
</section>
109109

0 commit comments

Comments
 (0)