diff --git a/src/app/+item-page/item-page.module.ts b/src/app/+item-page/item-page.module.ts
index 6743028b6c..f510ccf19b 100644
--- a/src/app/+item-page/item-page.module.ts
+++ b/src/app/+item-page/item-page.module.ts
@@ -62,7 +62,8 @@ import { MetadataFieldWrapperComponent } from './field-components/metadata-field
GenericItemPageFieldComponent,
RelatedEntitiesSearchComponent,
RelatedItemsComponent,
- MetadataRepresentationListComponent
+ MetadataRepresentationListComponent,
+ ItemPageTitleFieldComponent
],
entryComponents: [
PublicationComponent
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.html b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.html
new file mode 100644
index 0000000000..4cb34a140b
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.scss b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts
new file mode 100644
index 0000000000..68a05b66c3
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts
@@ -0,0 +1,47 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { JournalIssueGridElementComponent } from './journal-issue-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'creativework.datePublished': [
+ {
+ language: null,
+ value: '2015-06-26'
+ }
+ ],
+ 'journal.title': [
+ {
+ language: 'en_US',
+ value: 'The journal title'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('JournalIssueGridElementComponent', getEntityGridElementTestComponent(JournalIssueGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['date', 'journal-title']));
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts
new file mode 100644
index 0000000000..06c27ebacf
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../shared/animations/focus';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+
+@rendersItemType('JournalIssue', ItemViewMode.Card)
+@Component({
+ selector: 'ds-journal-issue-grid-element',
+ styleUrls: ['./journal-issue-grid-element.component.scss'],
+ templateUrl: './journal-issue-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Journal Issue
+ */
+export class JournalIssueGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.html b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.html
new file mode 100644
index 0000000000..d7c9b68a24
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.scss b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts
new file mode 100644
index 0000000000..5a8fca5fc6
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts
@@ -0,0 +1,47 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { JournalVolumeGridElementComponent } from './journal-volume-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'creativework.datePublished': [
+ {
+ language: null,
+ value: '2015-06-26'
+ }
+ ],
+ 'dc.description': [
+ {
+ language: 'en_US',
+ value: 'A description for the journal volume'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('JournalVolumeGridElementComponent', getEntityGridElementTestComponent(JournalVolumeGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['date', 'description']));
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts
new file mode 100644
index 0000000000..e5183536ef
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../shared/animations/focus';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+
+@rendersItemType('JournalVolume', ItemViewMode.Card)
+@Component({
+ selector: 'ds-journal-volume-grid-element',
+ styleUrls: ['./journal-volume-grid-element.component.scss'],
+ templateUrl: './journal-volume-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Journal Volume
+ */
+export class JournalVolumeGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.html b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.html
new file mode 100644
index 0000000000..467cdd1594
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dso.firstMetadataValue('creativework.editor')}}
+
+ ,
+ {{dso.firstMetadataValue('creativework.publisher')}}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.scss b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts
new file mode 100644
index 0000000000..8c12c1a266
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts
@@ -0,0 +1,53 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { JournalGridElementComponent } from './journal-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'creativework.editor': [
+ {
+ language: 'en_US',
+ value: 'Smith, Donald'
+ }
+ ],
+ 'creativework.publisher': [
+ {
+ language: 'en_US',
+ value: 'A company'
+ }
+ ],
+ 'dc.description': [
+ {
+ language: 'en_US',
+ value: 'This is the description'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('JournalGridElementComponent', getEntityGridElementTestComponent(JournalGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['editor', 'publisher', 'description']));
diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts
new file mode 100644
index 0000000000..7f23211538
--- /dev/null
+++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../shared/animations/focus';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+
+@rendersItemType('Journal', ItemViewMode.Card)
+@Component({
+ selector: 'ds-journal-grid-element',
+ styleUrls: ['./journal-grid-element.component.scss'],
+ templateUrl: './journal-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Journal
+ */
+export class JournalGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/journal-entities/journal-entities.module.ts b/src/app/entity-groups/journal-entities/journal-entities.module.ts
index 50ec160650..4033645e1b 100644
--- a/src/app/entity-groups/journal-entities/journal-entities.module.ts
+++ b/src/app/entity-groups/journal-entities/journal-entities.module.ts
@@ -9,6 +9,9 @@ import { JournalListElementComponent } from './item-list-elements/journal/journa
import { JournalIssueListElementComponent } from './item-list-elements/journal-issue/journal-issue-list-element.component';
import { JournalVolumeListElementComponent } from './item-list-elements/journal-volume/journal-volume-list-element.component';
import { TooltipModule } from 'ngx-bootstrap';
+import { JournalIssueGridElementComponent } from './item-grid-elements/journal-issue/journal-issue-grid-element.component';
+import { JournalVolumeGridElementComponent } from './item-grid-elements/journal-volume/journal-volume-grid-element.component';
+import { JournalGridElementComponent } from './item-grid-elements/journal/journal-grid-element.component';
const ENTRY_COMPONENTS = [
JournalComponent,
@@ -16,7 +19,10 @@ const ENTRY_COMPONENTS = [
JournalVolumeComponent,
JournalListElementComponent,
JournalIssueListElementComponent,
- JournalVolumeListElementComponent
+ JournalVolumeListElementComponent,
+ JournalIssueGridElementComponent,
+ JournalVolumeGridElementComponent,
+ JournalGridElementComponent
];
@NgModule({
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.html b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.html
new file mode 100644
index 0000000000..104d3a0a57
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dso.firstMetadataValue('organization.address.addressCountry')}}
+
+ ,
+ {{dso.firstMetadataValue('organization.address.addressLocality')}}
+
+
+
+
+
+
+
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.scss b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.spec.ts
new file mode 100644
index 0000000000..39ddea4c7b
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.spec.ts
@@ -0,0 +1,53 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { OrgunitGridElementComponent } from './orgunit-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'organization.foundingDate': [
+ {
+ language: null,
+ value: '2015-06-26'
+ }
+ ],
+ 'organization.address.addressCountry': [
+ {
+ language: 'en_US',
+ value: 'Belgium'
+ }
+ ],
+ 'organization.address.addressLocality': [
+ {
+ language: 'en_US',
+ value: 'Brussels'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('OrgunitGridElementComponent', getEntityGridElementTestComponent(OrgunitGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['date', 'country', 'city']));
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.ts
new file mode 100644
index 0000000000..0effc22027
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/orgunit/orgunit-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../shared/animations/focus';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+
+@rendersItemType('OrgUnit', ItemViewMode.Card)
+@Component({
+ selector: 'ds-orgunit-grid-element',
+ styleUrls: ['./orgunit-grid-element.component.scss'],
+ templateUrl: './orgunit-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Organisation Unit
+ */
+export class OrgunitGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.html b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.html
new file mode 100644
index 0000000000..86353377fa
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.scss b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts
new file mode 100644
index 0000000000..a0f8e4c29e
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts
@@ -0,0 +1,47 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { PersonGridElementComponent } from './person-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'person.email': [
+ {
+ language: 'en_US',
+ value: 'Smith-Donald@gmail.com'
+ }
+ ],
+ 'person.jobTitle': [
+ {
+ language: 'en_US',
+ value: 'Web Developer'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('PersonGridElementComponent', getEntityGridElementTestComponent(PersonGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['email', 'jobtitle']));
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts
new file mode 100644
index 0000000000..bf7b8aa119
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+import { focusShadow } from '../../../../shared/animations/focus';
+
+@rendersItemType('Person', ItemViewMode.Card)
+@Component({
+ selector: 'ds-person-grid-element',
+ styleUrls: ['./person-grid-element.component.scss'],
+ templateUrl: './person-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Person
+ */
+export class PersonGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.html b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.html
new file mode 100644
index 0000000000..a595791cc4
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.html
@@ -0,0 +1,25 @@
+
+
+
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.scss b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts
new file mode 100644
index 0000000000..9ad26935b7
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts
@@ -0,0 +1,41 @@
+import { ItemSearchResult } from '../../../../shared/object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { getEntityGridElementTestComponent } from '../../../../shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec';
+import { ProjectGridElementComponent } from './project-grid-element.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'dc.description': [
+ {
+ language: 'en_US',
+ value: 'The project description'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('ProjectGridElementComponent', getEntityGridElementTestComponent(ProjectGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['description']));
diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts
new file mode 100644
index 0000000000..15d525fcf2
--- /dev/null
+++ b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts
@@ -0,0 +1,17 @@
+import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../shared/animations/focus';
+import { TypedItemSearchResultGridElementComponent } from '../../../../shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+
+@rendersItemType('Project', ItemViewMode.Card)
+@Component({
+ selector: 'ds-project-grid-element',
+ styleUrls: ['./project-grid-element.component.scss'],
+ templateUrl: './project-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Project
+ */
+export class ProjectGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/entity-groups/research-entities/research-entities.module.ts b/src/app/entity-groups/research-entities/research-entities.module.ts
index ba28f174df..099fa2a6a3 100644
--- a/src/app/entity-groups/research-entities/research-entities.module.ts
+++ b/src/app/entity-groups/research-entities/research-entities.module.ts
@@ -11,6 +11,9 @@ import { PersonMetadataListElementComponent } from './item-list-elements/person/
import { PersonListElementComponent } from './item-list-elements/person/person-list-element.component';
import { ProjectListElementComponent } from './item-list-elements/project/project-list-element.component';
import { TooltipModule } from 'ngx-bootstrap';
+import { PersonGridElementComponent } from './item-grid-elements/person/person-grid-element.component';
+import { OrgunitGridElementComponent } from './item-grid-elements/orgunit/orgunit-grid-element.component';
+import { ProjectGridElementComponent } from './item-grid-elements/project/project-grid-element.component';
const ENTRY_COMPONENTS = [
OrgunitComponent,
@@ -20,7 +23,10 @@ const ENTRY_COMPONENTS = [
OrgUnitMetadataListElementComponent,
PersonListElementComponent,
PersonMetadataListElementComponent,
- ProjectListElementComponent
+ ProjectListElementComponent,
+ PersonGridElementComponent,
+ OrgunitGridElementComponent,
+ ProjectGridElementComponent
];
@NgModule({
diff --git a/src/app/shared/items/item-type-decorator.ts b/src/app/shared/items/item-type-decorator.ts
index 2420e71908..3a040ae5bf 100644
--- a/src/app/shared/items/item-type-decorator.ts
+++ b/src/app/shared/items/item-type-decorator.ts
@@ -3,6 +3,7 @@ import { MetadataRepresentationType } from '../../core/shared/metadata-represent
export enum ItemViewMode {
Element = 'element',
+ Card = 'card',
Full = 'full',
Metadata = 'metadata'
}
diff --git a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.html b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.html
index c0c3c1f65f..5b09d09a55 100644
--- a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.html
+++ b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.html
@@ -1,4 +1,3 @@
diff --git a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.spec.ts b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.spec.ts
index 2d2bd6305a..170ca34b42 100644
--- a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.spec.ts
+++ b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.spec.ts
@@ -6,7 +6,7 @@ import { GridThumbnailComponent } from './grid-thumbnail.component';
import { Bitstream } from '../../../core/shared/bitstream.model';
import { SafeUrlPipe } from '../../utils/safe-url-pipe';
-describe('ThumbnailComponent', () => {
+describe('GridThumbnailComponent', () => {
let comp: GridThumbnailComponent;
let fixture: ComponentFixture;
let de: DebugElement;
@@ -36,7 +36,7 @@ describe('ThumbnailComponent', () => {
it('should display placeholder', () => {
fixture.detectChanges();
const image: HTMLElement = de.query(By.css('img')).nativeElement;
- expect(image.getAttribute('src')).toBe(comp.holderSource);
+ expect(image.getAttribute('src')).toBe(comp.defaultImage);
});
});
diff --git a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.ts b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.ts
index 8ca93470da..6ae0c2d37e 100644
--- a/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.ts
+++ b/src/app/shared/object-grid/grid-thumbnail/grid-thumbnail.component.ts
@@ -1,5 +1,6 @@
-import { Component, Input } from '@angular/core';
+import { Component, Input, OnInit } from '@angular/core';
import { Bitstream } from '../../../core/shared/bitstream.model';
+import { hasValue } from '../../empty.util';
/**
* This component renders a given Bitstream as a thumbnail.
@@ -12,7 +13,7 @@ import { Bitstream } from '../../../core/shared/bitstream.model';
styleUrls: ['./grid-thumbnail.component.scss'],
templateUrl: './grid-thumbnail.component.html'
})
-export class GridThumbnailComponent {
+export class GridThumbnailComponent implements OnInit {
@Input() thumbnail: Bitstream;
@@ -21,10 +22,19 @@ export class GridThumbnailComponent {
/**
* The default 'holder.js' image
*/
- holderSource = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjYwIiBoZWlnaHQ9IjE4MCIgdmlld0JveD0iMCAwIDI2MCAxODAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjwhLS0KU291cmNlIFVSTDogaG9sZGVyLmpzLzEwMCV4MTgwL3RleHQ6Tm8gVGh1bWJuYWlsCkNyZWF0ZWQgd2l0aCBIb2xkZXIuanMgMi42LjAuCkxlYXJuIG1vcmUgYXQgaHR0cDovL2hvbGRlcmpzLmNvbQooYykgMjAxMi0yMDE1IEl2YW4gTWFsb3BpbnNreSAtIGh0dHA6Ly9pbXNreS5jbwotLT48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWyNob2xkZXJfMTVmNzJmMmFlMGIgdGV4dCB7IGZpbGw6I0FBQUFBQTtmb250LXdlaWdodDpib2xkO2ZvbnQtZmFtaWx5OkFyaWFsLCBIZWx2ZXRpY2EsIE9wZW4gU2Fucywgc2Fucy1zZXJpZiwgbW9ub3NwYWNlO2ZvbnQtc2l6ZToxM3B0IH0gXV0+PC9zdHlsZT48L2RlZnM+PGcgaWQ9ImhvbGRlcl8xNWY3MmYyYWUwYiI+PHJlY3Qgd2lkdGg9IjI2MCIgaGVpZ2h0PSIxODAiIGZpbGw9IiNFRUVFRUUiLz48Zz48dGV4dCB4PSI3Mi4yNDIxODc1IiB5PSI5NiI+Tm8gVGh1bWJuYWlsPC90ZXh0PjwvZz48L2c+PC9zdmc+';
+ @Input() defaultImage? = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjYwIiBoZWlnaHQ9IjE4MCIgdmlld0JveD0iMCAwIDI2MCAxODAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjwhLS0KU291cmNlIFVSTDogaG9sZGVyLmpzLzEwMCV4MTgwL3RleHQ6Tm8gVGh1bWJuYWlsCkNyZWF0ZWQgd2l0aCBIb2xkZXIuanMgMi42LjAuCkxlYXJuIG1vcmUgYXQgaHR0cDovL2hvbGRlcmpzLmNvbQooYykgMjAxMi0yMDE1IEl2YW4gTWFsb3BpbnNreSAtIGh0dHA6Ly9pbXNreS5jbwotLT48ZGVmcz48c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWyNob2xkZXJfMTVmNzJmMmFlMGIgdGV4dCB7IGZpbGw6I0FBQUFBQTtmb250LXdlaWdodDpib2xkO2ZvbnQtZmFtaWx5OkFyaWFsLCBIZWx2ZXRpY2EsIE9wZW4gU2Fucywgc2Fucy1zZXJpZiwgbW9ub3NwYWNlO2ZvbnQtc2l6ZToxM3B0IH0gXV0+PC9zdHlsZT48L2RlZnM+PGcgaWQ9ImhvbGRlcl8xNWY3MmYyYWUwYiI+PHJlY3Qgd2lkdGg9IjI2MCIgaGVpZ2h0PSIxODAiIGZpbGw9IiNFRUVFRUUiLz48Zz48dGV4dCB4PSI3Mi4yNDIxODc1IiB5PSI5NiI+Tm8gVGh1bWJuYWlsPC90ZXh0PjwvZz48L2c+PC9zdmc+';
+ src: string;
errorHandler(event) {
- event.currentTarget.src = this.holderSource;
+ event.currentTarget.src = this.defaultImage;
+ }
+
+ ngOnInit(): void {
+ if (hasValue(this.thumbnail) && this.thumbnail.content) {
+ this.src = this.thumbnail.content;
+ } else {
+ this.src = this.defaultImage
+ }
}
}
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.html b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.html
new file mode 100644
index 0000000000..e2477524ca
--- /dev/null
+++ b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.html
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{dso.firstMetadataValue('dc.date.issued')}}
+ ,
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.scss b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.scss
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec.ts b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec.ts
new file mode 100644
index 0000000000..f067a21ae0
--- /dev/null
+++ b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.spec.ts
@@ -0,0 +1,124 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { NoopAnimationsModule } from '@angular/platform-browser/animations';
+import { TruncatePipe } from '../../../../utils/truncate.pipe';
+import { TruncatableService } from '../../../../truncatable/truncatable.service';
+import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
+import { By } from '@angular/platform-browser';
+import { PublicationGridElementComponent } from './publication-grid-element.component';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
+import { Item } from '../../../../../core/shared/item.model';
+import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
+
+const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithMetadata.hitHighlights = {};
+mockItemWithMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ],
+ 'dc.contributor.author': [
+ {
+ language: 'en_US',
+ value: 'Smith, Donald'
+ }
+ ],
+ 'dc.date.issued': [
+ {
+ language: null,
+ value: '2015-06-26'
+ }
+ ],
+ 'dc.description.abstract': [
+ {
+ language: 'en_US',
+ value: 'This is an abstract'
+ }
+ ]
+ }
+});
+
+const mockItemWithoutMetadata: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutMetadata.hitHighlights = {};
+mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('PublicationGridElementComponent', getEntityGridElementTestComponent(PublicationGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['authors', 'date', 'abstract']));
+
+/**
+ * Create test cases for a grid component of an entity.
+ * @param component The component's class
+ * @param searchResultWithMetadata An ItemSearchResult containing an item with metadata that should be displayed in the grid element
+ * @param searchResultWithoutMetadata An ItemSearchResult containing an item that's missing the metadata that should be displayed in the grid element
+ * @param fieldsToCheck A list of fields to check. The tests expect to find html elements with class ".item-${field}", so make sure they exist in the html template of the grid element.
+ * For example: If one of the fields to check is labeled "authors", the html template should contain at least one element with class ".item-authors" that's
+ * present when the author metadata is available.
+ */
+export function getEntityGridElementTestComponent(component, searchResultWithMetadata: ItemSearchResult, searchResultWithoutMetadata: ItemSearchResult, fieldsToCheck: string[]) {
+ return () => {
+ let comp;
+ let fixture;
+
+ const truncatableServiceStub: any = {
+ isCollapsed: (id: number) => observableOf(true),
+ };
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [NoopAnimationsModule],
+ declarations: [component, TruncatePipe],
+ providers: [
+ { provide: TruncatableService, useValue: truncatableServiceStub },
+ {provide: ITEM, useValue: searchResultWithoutMetadata}
+ ],
+ schemas: [NO_ERRORS_SCHEMA]
+ }).overrideComponent(component, {
+ set: { changeDetection: ChangeDetectionStrategy.Default }
+ }).compileComponents();
+ }));
+
+ beforeEach(async(() => {
+ fixture = TestBed.createComponent(component);
+ comp = fixture.componentInstance;
+ }));
+
+ fieldsToCheck.forEach((field) => {
+ describe(`when the item has "${field}" metadata`, () => {
+ beforeEach(() => {
+ comp.dso = searchResultWithMetadata.indexableObject;
+ fixture.detectChanges();
+ });
+
+ it(`should show the "${field}" field`, () => {
+ const itemAuthorField = fixture.debugElement.query(By.css(`.item-${field}`));
+ expect(itemAuthorField).not.toBeNull();
+ });
+ });
+
+ describe(`when the item has no "${field}" metadata`, () => {
+ beforeEach(() => {
+ comp.dso = searchResultWithoutMetadata.indexableObject;
+ fixture.detectChanges();
+ });
+
+ it(`should not show the "${field}" field`, () => {
+ const itemAuthorField = fixture.debugElement.query(By.css(`.item-${field}`));
+ expect(itemAuthorField).toBeNull();
+ });
+ });
+ });
+ }
+}
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.ts b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.ts
new file mode 100644
index 0000000000..1bcd028baf
--- /dev/null
+++ b/src/app/shared/object-grid/item-grid-element/item-types/publication/publication-grid-element.component.ts
@@ -0,0 +1,18 @@
+import { TypedItemSearchResultGridElementComponent } from '../typed-item-search-result-grid-element.component';
+import { DEFAULT_ITEM_TYPE, ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
+import { Component } from '@angular/core';
+import { focusShadow } from '../../../../animations/focus';
+
+@rendersItemType('Publication', ItemViewMode.Card)
+@rendersItemType(DEFAULT_ITEM_TYPE, ItemViewMode.Card)
+@Component({
+ selector: 'ds-publication-grid-element',
+ styleUrls: ['./publication-grid-element.component.scss'],
+ templateUrl: './publication-grid-element.component.html',
+ animations: [focusShadow]
+})
+/**
+ * The component for displaying a grid element for an item of the type Publication
+ */
+export class PublicationGridElementComponent extends TypedItemSearchResultGridElementComponent {
+}
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.spec.ts b/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.spec.ts
new file mode 100644
index 0000000000..e4ace8d0b2
--- /dev/null
+++ b/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.spec.ts
@@ -0,0 +1,83 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { TruncatePipe } from '../../../utils/truncate.pipe';
+import { TruncatableService } from '../../../truncatable/truncatable.service';
+import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
+import { Item } from '../../../../core/shared/item.model';
+import { RemoteData } from '../../../../core/data/remote-data';
+import { PaginatedList } from '../../../../core/data/paginated-list';
+import { PageInfo } from '../../../../core/shared/page-info.model';
+import { ITEM } from '../../../items/switcher/item-type-switcher.component';
+import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
+import { createRelationshipsObservable } from '../../../../+item-page/simple/item-types/shared/item.component.spec';
+import { of as observableOf } from 'rxjs';
+import { MetadataMap } from '../../../../core/shared/metadata.models';
+import { TypedItemSearchResultGridElementComponent } from './typed-item-search-result-grid-element.component';
+
+const mockItem: Item = Object.assign(new Item(), {
+ bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
+ metadata: [],
+ relationships: createRelationshipsObservable()
+});
+const mockSearchResult = {
+ indexableObject: mockItem as Item,
+ hitHighlights: new MetadataMap()
+} as ItemSearchResult;
+
+describe('TypedItemSearchResultGridElementComponent', () => {
+ let comp: TypedItemSearchResultGridElementComponent;
+ let fixture: ComponentFixture;
+
+ describe('when injecting an Item', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [TypedItemSearchResultGridElementComponent, TruncatePipe],
+ providers: [
+ {provide: TruncatableService, useValue: {}},
+ {provide: ITEM, useValue: mockItem}
+ ],
+
+ schemas: [NO_ERRORS_SCHEMA]
+ }).overrideComponent(TypedItemSearchResultGridElementComponent, {
+ set: {changeDetection: ChangeDetectionStrategy.Default}
+ }).compileComponents();
+ }));
+
+ beforeEach(async(() => {
+ fixture = TestBed.createComponent(TypedItemSearchResultGridElementComponent);
+ comp = fixture.componentInstance;
+ }));
+
+ it('should initiate item, object and dso correctly', () => {
+ expect(comp.item).toBe(mockItem);
+ expect(comp.dso).toBe(mockItem);
+ expect(comp.object.indexableObject).toBe(mockItem);
+ })
+ });
+
+ describe('when injecting an ItemSearchResult', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [TypedItemSearchResultGridElementComponent, TruncatePipe],
+ providers: [
+ {provide: TruncatableService, useValue: {}},
+ {provide: ITEM, useValue: mockSearchResult}
+ ],
+
+ schemas: [NO_ERRORS_SCHEMA]
+ }).overrideComponent(TypedItemSearchResultGridElementComponent, {
+ set: {changeDetection: ChangeDetectionStrategy.Default}
+ }).compileComponents();
+ }));
+
+ beforeEach(async(() => {
+ fixture = TestBed.createComponent(TypedItemSearchResultGridElementComponent);
+ comp = fixture.componentInstance;
+ }));
+
+ it('should initiate item, object and dso correctly', () => {
+ expect(comp.item).toBe(mockItem);
+ expect(comp.dso).toBe(mockItem);
+ expect(comp.object.indexableObject).toBe(mockItem);
+ })
+ });
+});
diff --git a/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.ts b/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.ts
new file mode 100644
index 0000000000..f4f470c052
--- /dev/null
+++ b/src/app/shared/object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component.ts
@@ -0,0 +1,37 @@
+import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
+import { Item } from '../../../../core/shared/item.model';
+import { SearchResultGridElementComponent } from '../../search-result-grid-element/search-result-grid-element.component';
+import { TruncatableService } from '../../../truncatable/truncatable.service';
+import { Component, Inject } from '@angular/core';
+import { ITEM } from '../../../items/switcher/item-type-switcher.component';
+import { hasValue } from '../../../empty.util';
+import { MetadataMap } from '../../../../core/shared/metadata.models';
+
+/**
+ * A generic component for displaying item grid elements
+ */
+@Component({
+ selector: 'ds-item-search-result-grid-element',
+ template: ''
+})
+export class TypedItemSearchResultGridElementComponent extends SearchResultGridElementComponent {
+ item: Item;
+
+ constructor(
+ protected truncatableService: TruncatableService,
+ @Inject(ITEM) public obj: Item | ItemSearchResult,
+ ) {
+ super(undefined, truncatableService);
+ if (hasValue((obj as any).indexableObject)) {
+ this.object = obj as ItemSearchResult;
+ this.dso = this.object.indexableObject;
+ } else {
+ this.object = {
+ indexableObject: obj as Item,
+ hitHighlights: new MetadataMap()
+ };
+ this.dso = obj as Item;
+ }
+ this.item = this.dso;
+ }
+}
diff --git a/src/app/shared/object-grid/object-grid.component.scss b/src/app/shared/object-grid/object-grid.component.scss
index 437dfc3b43..8f19309d89 100644
--- a/src/app/shared/object-grid/object-grid.component.scss
+++ b/src/app/shared/object-grid/object-grid.component.scss
@@ -4,6 +4,11 @@ ds-wrapper-grid-element ::ng-deep {
div.thumbnail > img {
height: $card-thumbnail-height;
width: 100%;
+ display: block;
+ min-width: 100%;
+ min-height: 100%;
+ object-fit: cover;
+ object-position: 50% 15%;
}
div.card {
margin-top: $ds-wrapper-grid-spacing;
diff --git a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.html b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.html
index c7e2f524f3..d433c7acf2 100644
--- a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.html
+++ b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.html
@@ -1,33 +1 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{dso.firstMetadataValue('dc.date.issued')}}
- ,
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.spec.ts b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.spec.ts
index 655fd268a7..282478ec33 100644
--- a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.spec.ts
+++ b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.spec.ts
@@ -8,6 +8,7 @@ import { Item } from '../../../../core/shared/item.model';
import { TruncatableService } from '../../../truncatable/truncatable.service';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
+import { ItemViewMode } from '../../../items/item-type-decorator';
let itemSearchResultGridElementComponent: ItemSearchResultGridElementComponent;
let fixture: ComponentFixture;
@@ -16,41 +17,17 @@ const truncatableServiceStub: any = {
isCollapsed: (id: number) => observableOf(true),
};
-const mockItemWithAuthorAndDate: ItemSearchResult = new ItemSearchResult();
-mockItemWithAuthorAndDate.hitHighlights = {};
-mockItemWithAuthorAndDate.indexableObject = Object.assign(new Item(), {
- bitstreams: observableOf({}),
- metadata: {
- 'dc.contributor.author': [
- {
- language: 'en_US',
- value: 'Smith, Donald'
- }
- ],
- 'dc.date.issued': [
- {
- language: null,
- value: '2015-06-26'
- }
- ]
- }
-});
+const type = 'authorOfPublication';
-const mockItemWithoutAuthorAndDate: ItemSearchResult = new ItemSearchResult();
-mockItemWithoutAuthorAndDate.hitHighlights = {};
-mockItemWithoutAuthorAndDate.indexableObject = Object.assign(new Item(), {
+const mockItemWithRelationshipType: ItemSearchResult = new ItemSearchResult();
+mockItemWithRelationshipType.hitHighlights = {};
+mockItemWithRelationshipType.indexableObject = Object.assign(new Item(), {
bitstreams: observableOf({}),
metadata: {
- 'dc.title': [
+ 'relationship.type': [
{
language: 'en_US',
- value: 'This is just another title'
- }
- ],
- 'dc.type': [
- {
- language: null,
- value: 'Article'
+ value: type
}
]
}
@@ -63,7 +40,7 @@ describe('ItemSearchResultGridElementComponent', () => {
declarations: [ItemSearchResultGridElementComponent, TruncatePipe],
providers: [
{ provide: TruncatableService, useValue: truncatableServiceStub },
- { provide: 'objectElementProvider', useValue: (mockItemWithoutAuthorAndDate) }
+ { provide: 'objectElementProvider', useValue: (mockItemWithRelationshipType) }
],
schemas: [NO_ERRORS_SCHEMA]
}).overrideComponent(ItemSearchResultGridElementComponent, {
@@ -76,51 +53,9 @@ describe('ItemSearchResultGridElementComponent', () => {
itemSearchResultGridElementComponent = fixture.componentInstance;
}));
- describe('When the item has an author', () => {
- beforeEach(() => {
- itemSearchResultGridElementComponent.dso = mockItemWithAuthorAndDate.indexableObject;
- fixture.detectChanges();
- });
-
- it('should show the author paragraph', () => {
- const itemAuthorField = fixture.debugElement.query(By.css('p.item-authors'));
- expect(itemAuthorField).not.toBeNull();
- });
- });
-
- describe('When the item has no author', () => {
- beforeEach(() => {
- itemSearchResultGridElementComponent.dso = mockItemWithoutAuthorAndDate.indexableObject;
- fixture.detectChanges();
- });
-
- it('should not show the author paragraph', () => {
- const itemAuthorField = fixture.debugElement.query(By.css('p.item-authors'));
- expect(itemAuthorField).toBeNull();
- });
- });
-
- describe('When the item has an issuedate', () => {
- beforeEach(() => {
- itemSearchResultGridElementComponent.dso = mockItemWithAuthorAndDate.indexableObject;
- fixture.detectChanges();
- });
-
- it('should show the issuedate span', () => {
- const itemAuthorField = fixture.debugElement.query(By.css('span.item-date'));
- expect(itemAuthorField).not.toBeNull();
- });
- });
-
- describe('When the item has no issuedate', () => {
- beforeEach(() => {
- itemSearchResultGridElementComponent.dso = mockItemWithoutAuthorAndDate.indexableObject;
- fixture.detectChanges();
- });
-
- it('should not show the issuedate span', () => {
- const dateField = fixture.debugElement.query(By.css('span.item-date'));
- expect(dateField).toBeNull();
- });
+ it('should show send the object to item-type-switcher using viewMode "Card"', () => {
+ const itemTypeSwitcherComp = fixture.debugElement.query(By.css('ds-item-type-switcher')).componentInstance;
+ expect(itemTypeSwitcherComp.object).toBe(mockItemWithRelationshipType);
+ expect(itemTypeSwitcherComp.viewMode).toEqual(ItemViewMode.Card);
});
});
diff --git a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.ts
index 30c36b3af9..7bbe41fe60 100644
--- a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.ts
+++ b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item-search-result-grid-element.component.ts
@@ -6,6 +6,7 @@ import { Item } from '../../../../core/shared/item.model';
import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model';
import { SetViewMode } from '../../../view-mode';
import { focusShadow } from '../../../../shared/animations/focus';
+import { ItemViewMode } from '../../../items/item-type-decorator';
@Component({
selector: 'ds-item-search-result-grid-element',
@@ -15,4 +16,6 @@ import { focusShadow } from '../../../../shared/animations/focus';
})
@renderElementsFor(ItemSearchResult, SetViewMode.Grid)
-export class ItemSearchResultGridElementComponent extends SearchResultGridElementComponent {}
+export class ItemSearchResultGridElementComponent extends SearchResultGridElementComponent {
+ viewMode = ItemViewMode.Card;
+}
diff --git a/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts
index 0961dc96ee..5f31d52ae7 100644
--- a/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts
+++ b/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts
@@ -7,6 +7,7 @@ import { ListableObject } from '../../object-collection/shared/listable-object.m
import { TruncatableService } from '../../truncatable/truncatable.service';
import { Observable } from 'rxjs';
import { Metadata } from '../../../core/shared/metadata.utils';
+import { hasValue } from '../../empty.util';
@Component({
selector: 'ds-search-result-grid-element',
@@ -16,9 +17,11 @@ import { Metadata } from '../../../core/shared/metadata.utils';
export class SearchResultGridElementComponent, K extends DSpaceObject> extends AbstractListableElementComponent {
dso: K;
- public constructor(@Inject('objectElementProvider') public listableObject: ListableObject, private truncatableService: TruncatableService) {
+ public constructor(@Inject('objectElementProvider') public listableObject: ListableObject, protected truncatableService: TruncatableService) {
super(listableObject);
- this.dso = this.object.indexableObject;
+ if (hasValue(this.object)) {
+ this.dso = this.object.indexableObject;
+ }
}
/**
diff --git a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts
index 9adf255523..082347be0b 100644
--- a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts
+++ b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts
@@ -24,7 +24,7 @@ const mockSearchResult = {
hitHighlights: new MetadataMap()
} as ItemSearchResult;
-describe('ItemSearchResultComponent', () => {
+describe('TypedItemSearchResultListElementComponent', () => {
let comp: TypedItemSearchResultListElementComponent;
let fixture: ComponentFixture;
diff --git a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.ts b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.ts
index 7df3ab5681..dd1b5a7e5f 100644
--- a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.ts
+++ b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.ts
@@ -11,7 +11,7 @@ import { MetadataMap } from '../../../../core/shared/metadata.models';
* A generic component for displaying item list elements
*/
@Component({
- selector: 'ds-item-search-result',
+ selector: 'ds-item-search-result-list-element',
template: ''
})
export class TypedItemSearchResultListElementComponent extends SearchResultListElementComponent {
diff --git a/src/app/shared/object-list/item-type-badge/item-type-badge.component.html b/src/app/shared/object-list/item-type-badge/item-type-badge.component.html
new file mode 100644
index 0000000000..35d7663801
--- /dev/null
+++ b/src/app/shared/object-list/item-type-badge/item-type-badge.component.html
@@ -0,0 +1,3 @@
+
+ {{ type.toLowerCase() + '.listelement.badge' | translate }}
+
diff --git a/src/app/shared/object-list/item-type-badge/item-type-badge.component.spec.ts b/src/app/shared/object-list/item-type-badge/item-type-badge.component.spec.ts
new file mode 100644
index 0000000000..04c40b73ff
--- /dev/null
+++ b/src/app/shared/object-list/item-type-badge/item-type-badge.component.spec.ts
@@ -0,0 +1,83 @@
+import { ItemSearchResult } from '../../object-collection/shared/item-search-result.model';
+import { Item } from '../../../core/shared/item.model';
+import { of as observableOf } from 'rxjs/internal/observable/of';
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { TranslateModule } from '@ngx-translate/core';
+import { TruncatePipe } from '../../utils/truncate.pipe';
+import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
+import { ItemTypeBadgeComponent } from './item-type-badge.component';
+import { By } from '@angular/platform-browser';
+
+let comp: ItemTypeBadgeComponent;
+let fixture: ComponentFixture;
+
+const type = 'authorOfPublication';
+
+const mockItemWithRelationshipType: ItemSearchResult = new ItemSearchResult();
+mockItemWithRelationshipType.hitHighlights = {};
+mockItemWithRelationshipType.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'relationship.type': [
+ {
+ language: 'en_US',
+ value: type
+ }
+ ]
+ }
+});
+
+const mockItemWithoutRelationshipType: ItemSearchResult = new ItemSearchResult();
+mockItemWithoutRelationshipType.hitHighlights = {};
+mockItemWithoutRelationshipType.indexableObject = Object.assign(new Item(), {
+ bitstreams: observableOf({}),
+ metadata: {
+ 'dc.title': [
+ {
+ language: 'en_US',
+ value: 'This is just another title'
+ }
+ ]
+ }
+});
+
+describe('ItemTypeBadgeComponent', () => {
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ imports: [TranslateModule.forRoot()],
+ declarations: [ItemTypeBadgeComponent, TruncatePipe],
+ schemas: [NO_ERRORS_SCHEMA]
+ }).overrideComponent(ItemTypeBadgeComponent, {
+ set: { changeDetection: ChangeDetectionStrategy.Default }
+ }).compileComponents();
+ }));
+
+ beforeEach(async(() => {
+ fixture = TestBed.createComponent(ItemTypeBadgeComponent);
+ comp = fixture.componentInstance;
+ }));
+
+ describe('When the item has a relationship type', () => {
+ beforeEach(() => {
+ comp.object = mockItemWithRelationshipType;
+ fixture.detectChanges();
+ });
+
+ it('should show the relationship type badge', () => {
+ const badge = fixture.debugElement.query(By.css('span.badge'));
+ expect(badge.nativeElement.textContent).toContain(type.toLowerCase());
+ });
+ });
+
+ describe('When the item has no relationship type', () => {
+ beforeEach(() => {
+ comp.object = mockItemWithoutRelationshipType;
+ fixture.detectChanges();
+ });
+
+ it('should not show a badge', () => {
+ const badge = fixture.debugElement.query(By.css('span.badge'));
+ expect(badge).toBeNull();
+ });
+ });
+});
diff --git a/src/app/shared/object-list/item-type-badge/item-type-badge.component.ts b/src/app/shared/object-list/item-type-badge/item-type-badge.component.ts
new file mode 100644
index 0000000000..9ffba33758
--- /dev/null
+++ b/src/app/shared/object-list/item-type-badge/item-type-badge.component.ts
@@ -0,0 +1,12 @@
+import { Component, Input } from '@angular/core';
+import { ListableObject } from '../../object-collection/shared/listable-object.model';
+import { SearchResult } from '../../../+search-page/search-result.model';
+import { DSpaceObject } from '../../../core/shared/dspace-object.model';
+
+@Component({
+ selector: 'ds-item-type-badge',
+ templateUrl: './item-type-badge.component.html'
+})
+export class ItemTypeBadgeComponent {
+ @Input() object: SearchResult;
+}
diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.html b/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.html
index a2617a956f..051a27bde7 100644
--- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.html
+++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.html
@@ -1,4 +1,2 @@
-
- {{ type.toLowerCase() + '.listelement.badge' | translate }}
-
+
diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.spec.ts
index a370d3a632..8f41018404 100644
--- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.spec.ts
+++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-search-result-list-element.component.spec.ts
@@ -33,20 +33,6 @@ mockItemWithRelationshipType.indexableObject = Object.assign(new Item(), {
}
});
-const mockItemWithoutRelationshipType: ItemSearchResult = new ItemSearchResult();
-mockItemWithoutRelationshipType.hitHighlights = {};
-mockItemWithoutRelationshipType.indexableObject = Object.assign(new Item(), {
- bitstreams: observableOf({}),
- metadata: {
- 'dc.title': [
- {
- language: 'en_US',
- value: 'This is just another title'
- }
- ]
- }
-});
-
describe('ItemSearchResultListElementComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
@@ -54,7 +40,7 @@ describe('ItemSearchResultListElementComponent', () => {
declarations: [ItemSearchResultListElementComponent, TruncatePipe],
providers: [
{ provide: TruncatableService, useValue: truncatableServiceStub },
- { provide: 'objectElementProvider', useValue: (mockItemWithoutRelationshipType) }
+ { provide: 'objectElementProvider', useValue: (mockItemWithRelationshipType) }
],
schemas: [NO_ERRORS_SCHEMA]
}).overrideComponent(ItemSearchResultListElementComponent, {
@@ -67,27 +53,8 @@ describe('ItemSearchResultListElementComponent', () => {
itemSearchResultListElementComponent = fixture.componentInstance;
}));
- describe('When the item has a relationship type', () => {
- beforeEach(() => {
- itemSearchResultListElementComponent.object = mockItemWithRelationshipType;
- fixture.detectChanges();
- });
-
- it('should show the relationship type badge', () => {
- const badge = fixture.debugElement.query(By.css('span.badge'));
- expect(badge.nativeElement.textContent).toContain(type.toLowerCase());
- });
- });
-
- describe('When the item has no relationship type', () => {
- beforeEach(() => {
- itemSearchResultListElementComponent.object = mockItemWithoutRelationshipType;
- fixture.detectChanges();
- });
-
- it('should not show a badge', () => {
- const badge = fixture.debugElement.query(By.css('span.badge'));
- expect(badge).toBeNull();
- });
+ it('should show a badge on top of the list element', () => {
+ const badge = fixture.debugElement.query(By.css('ds-item-type-badge')).componentInstance;
+ expect(badge.object).toBe(mockItemWithRelationshipType);
});
});
diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts
index 816139c8b9..66afb1e41b 100644
--- a/src/app/shared/shared.module.ts
+++ b/src/app/shared/shared.module.ts
@@ -138,6 +138,9 @@ import { RoleDirective } from './roles/role.directive';
import { UserMenuComponent } from './auth-nav-menu/user-menu/user-menu.component';
import { ClaimedTaskActionsReturnToPoolComponent } from './mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component';
import { ItemDetailPreviewFieldComponent } from './object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component';
+import { TypedItemSearchResultGridElementComponent } from './object-grid/item-grid-element/item-types/typed-item-search-result-grid-element.component';
+import { PublicationGridElementComponent } from './object-grid/item-grid-element/item-types/publication/publication-grid-element.component';
+import { ItemTypeBadgeComponent } from './object-list/item-type-badge/item-type-badge.component';
const MODULES = [
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
@@ -256,8 +259,10 @@ const COMPONENTS = [
CollectionSearchResultListElementComponent,
ItemSearchResultListElementComponent,
TypedItemSearchResultListElementComponent,
+ TypedItemSearchResultGridElementComponent,
ItemTypeSwitcherComponent,
- BrowseByComponent
+ BrowseByComponent,
+ ItemTypeBadgeComponent
];
const ENTRY_COMPONENTS = [
@@ -275,6 +280,7 @@ const ENTRY_COMPONENTS = [
CommunityGridElementComponent,
SearchResultGridElementComponent,
PublicationListElementComponent,
+ PublicationGridElementComponent,
BrowseEntryListElementComponent,
MyDSpaceResultDetailElementComponent,
SearchResultGridElementComponent,
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal-issue/journal-issue.component.html b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/journal-issue/journal-issue.component.html
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal-issue/journal-issue.component.scss b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss
similarity index 85%
rename from themes/mantis/app/+item-page/simple/item-types/journal-issue/journal-issue.component.scss
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss
index 7ce24acc15..3caa55f533 100644
--- a/themes/mantis/app/+item-page/simple/item-types/journal-issue/journal-issue.component.scss
+++ b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/journal-issue/journal-issue.component.scss';
+@import 'src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.scss';
:host {
> * {
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal-volume/journal-volume.component.html b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/journal-volume/journal-volume.component.html
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal-volume/journal-volume.component.scss b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss
similarity index 85%
rename from themes/mantis/app/+item-page/simple/item-types/journal-volume/journal-volume.component.scss
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss
index ab1bc700b1..5c2534b318 100644
--- a/themes/mantis/app/+item-page/simple/item-types/journal-volume/journal-volume.component.scss
+++ b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/journal-volume/journal-volume.component.scss';
+@import 'src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.scss';
:host {
> * {
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal/journal.component.html b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal/journal.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/journal/journal.component.html
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal/journal.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/journal/journal.component.scss b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss
similarity index 89%
rename from themes/mantis/app/+item-page/simple/item-types/journal/journal.component.scss
rename to themes/mantis/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss
index 6d97cbf5c3..5c0d1c44b8 100644
--- a/themes/mantis/app/+item-page/simple/item-types/journal/journal.component.scss
+++ b/themes/mantis/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/journal/journal.component.scss';
+@import 'src/app/entity-groups/journal-entities/item-pages/journal/journal.component.scss';
:host {
> * {
diff --git a/themes/mantis/app/+item-page/simple/item-types/orgunit/orgunit.component.html b/themes/mantis/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/orgunit/orgunit.component.html
rename to themes/mantis/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/orgunit/orgunit.component.scss b/themes/mantis/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.scss
similarity index 86%
rename from themes/mantis/app/+item-page/simple/item-types/orgunit/orgunit.component.scss
rename to themes/mantis/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.scss
index 5b2bdb0382..54651aede0 100644
--- a/themes/mantis/app/+item-page/simple/item-types/orgunit/orgunit.component.scss
+++ b/themes/mantis/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/orgunit/orgunit.component.scss';
+@import 'src/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.scss';
:host {
> * {
diff --git a/themes/mantis/app/+item-page/simple/item-types/person/person.component.html b/themes/mantis/app/entity-groups/research-entities/item-pages/person/person.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/person/person.component.html
rename to themes/mantis/app/entity-groups/research-entities/item-pages/person/person.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/person/person.component.scss b/themes/mantis/app/entity-groups/research-entities/item-pages/person/person.component.scss
similarity index 89%
rename from themes/mantis/app/+item-page/simple/item-types/person/person.component.scss
rename to themes/mantis/app/entity-groups/research-entities/item-pages/person/person.component.scss
index 3b454aab0e..48571b05b2 100644
--- a/themes/mantis/app/+item-page/simple/item-types/person/person.component.scss
+++ b/themes/mantis/app/entity-groups/research-entities/item-pages/person/person.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/person/person.component.scss';
+@import 'src/app/entity-groups/research-entities/item-pages/person/person.component.scss';
:host {
> * {
diff --git a/themes/mantis/app/+item-page/simple/item-types/project/project.component.html b/themes/mantis/app/entity-groups/research-entities/item-pages/project/project.component.html
similarity index 100%
rename from themes/mantis/app/+item-page/simple/item-types/project/project.component.html
rename to themes/mantis/app/entity-groups/research-entities/item-pages/project/project.component.html
diff --git a/themes/mantis/app/+item-page/simple/item-types/project/project.component.scss b/themes/mantis/app/entity-groups/research-entities/item-pages/project/project.component.scss
similarity index 86%
rename from themes/mantis/app/+item-page/simple/item-types/project/project.component.scss
rename to themes/mantis/app/entity-groups/research-entities/item-pages/project/project.component.scss
index 9c9aa9c629..d2707d30cc 100644
--- a/themes/mantis/app/+item-page/simple/item-types/project/project.component.scss
+++ b/themes/mantis/app/entity-groups/research-entities/item-pages/project/project.component.scss
@@ -1,4 +1,4 @@
-@import 'src/app/+item-page/simple/item-types/project/project.component.scss';
+@import 'src/app/entity-groups/research-entities/item-pages/project/project.component.scss';
:host {
> * {