Skip to content

Commit 493ebcc

Browse files
[DURACOM-445] set authority relations config as false by default, configure projects and org units
1 parent aa9ed65 commit 493ebcc

File tree

7 files changed

+122
-52
lines changed

7 files changed

+122
-52
lines changed

src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.html

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,21 @@
6262
</div>
6363
</div>
6464
<div class="mt-5 w-100 px-0">
65-
<ds-tabbed-related-entities-search [item]="object"
66-
[relationTypes]="[{
65+
@if (areAuthorityRelationsEnabled) {
66+
<ds-authority-related-entities-search
67+
[item]="object"
68+
[configurations]="[
69+
'RELATION.OrgUnit.rpprojects',
70+
'RELATION.OrgUnit.publications',
71+
'RELATION.OrgUnit.rppublications',
72+
'RELATION.OrgUnit.people',
73+
'RELATION.OrgUnit.projects',
74+
'RELATION.OrgUnit.organizations',
75+
]"
76+
></ds-authority-related-entities-search>
77+
} @else {
78+
<ds-tabbed-related-entities-search [item]="object"
79+
[relationTypes]="[{
6780
label: 'isOrgUnitOfPerson',
6881
filter: 'isOrgUnitOfPerson',
6982
configuration: 'person-relationships'
@@ -73,6 +86,7 @@
7386
filter: 'isOrgUnitOfProject',
7487
configuration: 'project-relationships'
7588
}]">
76-
</ds-tabbed-related-entities-search>
89+
</ds-tabbed-related-entities-search>
90+
}
7791
</div>
7892
</div>

src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { GenericItemPageFieldComponent } from '../../../../item-page/simple/fiel
88
import { ItemPageImgFieldComponent } from '../../../../item-page/simple/field-components/specific-field/img/item-page-img-field.component';
99
import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
1010
import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component';
11+
import { AuthorityRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/authority-related-entities-search/authority-related-entities-search.component';
1112
import { TabbedRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component';
1213
import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component';
1314
import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component';
@@ -23,6 +24,7 @@ import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail
2324
templateUrl: './org-unit.component.html',
2425
imports: [
2526
AsyncPipe,
27+
AuthorityRelatedEntitiesSearchComponent,
2628
DsoEditMenuComponent,
2729
GenericItemPageFieldComponent,
2830
ItemPageImgFieldComponent,

src/app/entity-groups/research-entities/item-pages/project/project.component.html

Lines changed: 60 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -19,54 +19,66 @@
1919
<!--<ds-generic-item-page-field [item]="object"-->
2020
<!--[fields]="['project.identifier.status']"-->
2121
<!--[label]="'project.page.status'">-->
22+
<!--</ds-generic-item-page-field>-->
23+
<ds-metadata-representation-list
24+
[parentItem]="object"
25+
[itemType]="'OrgUnit'"
26+
[metadataFields]="['project.contributor.other']"
27+
[label]="'project.page.contributor' | translate">
28+
</ds-metadata-representation-list>
29+
<ds-generic-item-page-field [item]="object"
30+
[fields]="['project.identifier.funder']"
31+
[label]="'project.page.funder'">
32+
</ds-generic-item-page-field>
33+
<ds-generic-item-page-field [item]="object"
34+
[fields]="['dc.identifier']"
35+
[label]="'project.page.id'">
36+
</ds-generic-item-page-field>
37+
<!--<ds-generic-item-page-field [item]="object"-->
38+
<!--[fields]="['project.identifier.expectedcompletion']"-->
39+
<!--[label]="'project.page.expectedcompletion'">-->
2240
<!--</ds-generic-item-page-field>-->
23-
<ds-metadata-representation-list
24-
[parentItem]="object"
25-
[itemType]="'OrgUnit'"
26-
[metadataFields]="['project.contributor.other']"
27-
[label]="'project.page.contributor' | translate">
28-
</ds-metadata-representation-list>
29-
<ds-generic-item-page-field [item]="object"
30-
[fields]="['project.identifier.funder']"
31-
[label]="'project.page.funder'">
32-
</ds-generic-item-page-field>
33-
<ds-generic-item-page-field [item]="object"
34-
[fields]="['dc.identifier']"
35-
[label]="'project.page.id'">
36-
</ds-generic-item-page-field>
37-
<!--<ds-generic-item-page-field [item]="object"-->
38-
<!--[fields]="['project.identifier.expectedcompletion']"-->
39-
<!--[label]="'project.page.expectedcompletion'">-->
40-
<!--</ds-generic-item-page-field>-->
41-
</div>
42-
<div class="col-12 col-md-7">
43-
<ds-related-items
44-
[parentItem]="object"
45-
[relationType]="'isPersonOfProject'"
46-
[label]="'item.page.authors' | translate">
47-
</ds-related-items>
48-
<ds-related-items
49-
[parentItem]="object"
50-
[relationType]="'isPublicationOfProject'"
51-
[label]="'item.page.publications' | translate">
52-
</ds-related-items>
53-
<ds-related-items
54-
[parentItem]="object"
55-
[relationType]="'isOrgUnitOfProject'"
56-
[label]="'item.page.org-units' | translate">
57-
</ds-related-items>
58-
<ds-generic-item-page-field [item]="object"
59-
[fields]="['dc.description']"
60-
[label]="'project.page.description'">
61-
</ds-generic-item-page-field>
62-
<ds-generic-item-page-field [item]="object"
63-
[fields]="['dc.subject']"
64-
[label]="'project.page.keyword'">
65-
</ds-generic-item-page-field>
66-
<div>
67-
<a class="btn btn-outline-primary" [routerLink]="[itemPageRoute + '/full']" role="button" tabindex="0">
68-
{{"item.page.link.full" | translate}}
69-
</a>
7041
</div>
71-
</div>
42+
<div class="col-12 col-md-7">
43+
<ds-related-items
44+
[parentItem]="object"
45+
[relationType]="'isPersonOfProject'"
46+
[label]="'item.page.authors' | translate">
47+
</ds-related-items>
48+
<ds-related-items
49+
[parentItem]="object"
50+
[relationType]="'isPublicationOfProject'"
51+
[label]="'item.page.publications' | translate">
52+
</ds-related-items>
53+
<ds-related-items
54+
[parentItem]="object"
55+
[relationType]="'isOrgUnitOfProject'"
56+
[label]="'item.page.org-units' | translate">
57+
</ds-related-items>
58+
<ds-generic-item-page-field [item]="object"
59+
[fields]="['dc.description']"
60+
[label]="'project.page.description'">
61+
</ds-generic-item-page-field>
62+
<ds-generic-item-page-field [item]="object"
63+
[fields]="['dc.subject']"
64+
[label]="'project.page.keyword'">
65+
</ds-generic-item-page-field>
66+
<div>
67+
<a class="btn btn-outline-primary" [routerLink]="[itemPageRoute + '/full']" role="button" tabindex="0">
68+
{{"item.page.link.full" | translate}}
69+
</a>
70+
</div>
71+
</div>
72+
<div class="mt-5 w-100 px-0">
73+
@if (areAuthorityRelationsEnabled) {
74+
<ds-authority-related-entities-search
75+
[item]="object"
76+
[configurations]="[
77+
'RELATION.Project.projects',
78+
'RELATION.Project.fundings',
79+
'RELATION.Project.researchoutputs'
80+
]"
81+
></ds-authority-related-entities-search>
82+
}
83+
</div>
7284
</div>

src/app/entity-groups/research-entities/item-pages/project/project.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { GenericItemPageFieldComponent } from '../../../../item-page/simple/fiel
88
import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
99
import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component';
1010
import { ThemedMetadataRepresentationListComponent } from '../../../../item-page/simple/metadata-representation-list/themed-metadata-representation-list.component';
11+
import { AuthorityRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/authority-related-entities-search/authority-related-entities-search.component';
1112
import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component';
1213
import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component';
1314
import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component';
@@ -22,6 +23,7 @@ import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail
2223
templateUrl: './project.component.html',
2324
imports: [
2425
AsyncPipe,
26+
AuthorityRelatedEntitiesSearchComponent,
2527
DsoEditMenuComponent,
2628
GenericItemPageFieldComponent,
2729
MetadataFieldWrapperComponent,

src/app/shared/sidebar/page-with-sidebar.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
position: absolute;
3838
top: 0;
3939
width: 100%;
40+
background-color: var(--bs-body-bg)
4041
}
4142
}
4243
}

src/assets/i18n/en.json5

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3055,6 +3055,25 @@
30553055

30563056
"item.page.relationships.RELATION.Person.projects": "Projects",
30573057

3058+
"item.page.relationships.RELATION.OrgUnit.rpprojects": "Researchers Projects",
3059+
3060+
"item.page.relationships.RELATION.OrgUnit.publications": "Publications",
3061+
3062+
"item.page.relationships.RELATION.OrgUnit.rppublications": "Researchers Publications",
3063+
3064+
"item.page.relationships.RELATION.OrgUnit.people": "People",
3065+
3066+
"item.page.relationships.RELATION.OrgUnit.projects": "Projects",
3067+
3068+
"item.page.relationships.RELATION.OrgUnit.organizations": "Organizations",
3069+
3070+
"item.page.relationships.RELATION.Project.projects": "Projects",
3071+
3072+
"item.page.relationships.RELATION.Project.fundings": "Fundings",
3073+
3074+
"item.page.relationships.RELATION.Project.researchoutputs": "Publications",
3075+
3076+
30583077
"item.page.subject": "Keywords",
30593078

30603079
"item.page.uri": "URI",
@@ -4683,6 +4702,26 @@
46834702

46844703
"RELATION.Person.projects.search.results.head": "Projects",
46854704

4705+
"RELATION.Project.researchoutputs.search.results.head": "Publications",
4706+
4707+
"RELATION.Project.fundings.search.results.head": "Fundings",
4708+
4709+
"RELATION.Project.projects.search.results.head": "Projects",
4710+
4711+
"RELATION.OrgUnit.organizations.search.results.head": "Organizations",
4712+
4713+
"RELATION.OrgUnit.rppublications.search.results.head": "Researchers Publications",
4714+
4715+
"RELATION.OrgUnit.publications.search.results.head": "Publications",
4716+
4717+
"RELATION.OrgUnit.rpprojects.search.results.head": "Researchers Projects",
4718+
4719+
"RELATION.OrgUnit.projects.search.results.head": "Projects",
4720+
4721+
"RELATION.Project.researchoutputs.search.results.head": "Publications",
4722+
4723+
"RELATION.OrgUnit.people.search.results.head": "People",
4724+
46864725
"root.skip-to-content": "Skip to main content",
46874726

46884727
"search.description": "",

src/config/default-app-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ export class DefaultAppConfig implements AppConfig {
403403
},
404404
// If true, the search result in item page will display relations based on authority.
405405
// If false,the search result in item page will display default DSpace relations.
406-
showAuthorithyRelations: true,
406+
showAuthorithyRelations: false,
407407
};
408408

409409
// Community Page Config

0 commit comments

Comments
 (0)