mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #401 from atmire/Group-Entity-Types
Group logical entity types together
This commit is contained in:
@@ -302,6 +302,12 @@
|
||||
},
|
||||
"listelement": {
|
||||
"badge": "Person"
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Person Search",
|
||||
"results": {
|
||||
"head": "Person Search Results"
|
||||
}
|
||||
}
|
||||
},
|
||||
"project": {
|
||||
@@ -342,6 +348,12 @@
|
||||
},
|
||||
"listelement": {
|
||||
"badge": "Journal"
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Journal Search",
|
||||
"results": {
|
||||
"head": "Journal Search Results"
|
||||
}
|
||||
}
|
||||
},
|
||||
"journalvolume": {
|
||||
@@ -378,6 +390,12 @@
|
||||
},
|
||||
"listelement": {
|
||||
"badge": "Publication"
|
||||
},
|
||||
"search": {
|
||||
"title": "DSpace Angular :: Publication Search",
|
||||
"results": {
|
||||
"head": "Publication Search Results"
|
||||
}
|
||||
}
|
||||
},
|
||||
"nav": {
|
||||
@@ -481,24 +499,6 @@
|
||||
}
|
||||
},
|
||||
"search": {
|
||||
"journal": {
|
||||
"title": "DSpace Angular :: Journal Search",
|
||||
"results": {
|
||||
"head": "Journal Search Results"
|
||||
}
|
||||
},
|
||||
"person": {
|
||||
"title": "DSpace Angular :: Person Search",
|
||||
"results": {
|
||||
"head": "Person Search Results"
|
||||
}
|
||||
},
|
||||
"publication": {
|
||||
"title": "DSpace Angular :: Publication Search",
|
||||
"results": {
|
||||
"head": "Publication Search Results"
|
||||
}
|
||||
},
|
||||
"title": "DSpace Angular :: Search",
|
||||
"description": "",
|
||||
"form": {
|
||||
|
@@ -33,6 +33,7 @@ const ITEM_EDIT_DELETE_PATH = 'delete';
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'status',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'status',
|
||||
|
@@ -20,16 +20,12 @@ import { FullFileSectionComponent } from './full/field-components/file-section/f
|
||||
import { RelatedItemsComponent } from './simple/related-items/related-items-component';
|
||||
import { SearchPageModule } from '../+search-page/search-page.module';
|
||||
import { PublicationComponent } from './simple/item-types/publication/publication.component';
|
||||
import { PersonComponent } from './simple/item-types/person/person.component';
|
||||
import { OrgunitComponent } from './simple/item-types/orgunit/orgunit.component';
|
||||
import { ProjectComponent } from './simple/item-types/project/project.component';
|
||||
import { JournalComponent } from './simple/item-types/journal/journal.component';
|
||||
import { JournalVolumeComponent } from './simple/item-types/journal-volume/journal-volume.component';
|
||||
import { JournalIssueComponent } from './simple/item-types/journal-issue/journal-issue.component';
|
||||
import { ItemComponent } from './simple/item-types/shared/item.component';
|
||||
import { EditItemPageModule } from './edit-item-page/edit-item-page.module';
|
||||
import { MetadataRepresentationListComponent } from './simple/metadata-representation-list/metadata-representation-list.component';
|
||||
import { RelatedEntitiesSearchComponent } from './simple/related-entities/related-entities-search/related-entities-search.component';
|
||||
import { MetadataValuesComponent } from './field-components/metadata-values/metadata-values.component';
|
||||
import { MetadataFieldWrapperComponent } from './field-components/metadata-field-wrapper/metadata-field-wrapper.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -53,26 +49,23 @@ import { RelatedEntitiesSearchComponent } from './simple/related-entities/relate
|
||||
CollectionsComponent,
|
||||
FullFileSectionComponent,
|
||||
PublicationComponent,
|
||||
ProjectComponent,
|
||||
OrgunitComponent,
|
||||
PersonComponent,
|
||||
RelatedItemsComponent,
|
||||
ItemComponent,
|
||||
GenericItemPageFieldComponent,
|
||||
JournalComponent,
|
||||
JournalIssueComponent,
|
||||
JournalVolumeComponent,
|
||||
MetadataRepresentationListComponent,
|
||||
RelatedEntitiesSearchComponent
|
||||
],
|
||||
exports: [
|
||||
ItemComponent,
|
||||
MetadataValuesComponent,
|
||||
MetadataFieldWrapperComponent,
|
||||
GenericItemPageFieldComponent,
|
||||
RelatedEntitiesSearchComponent,
|
||||
RelatedItemsComponent,
|
||||
MetadataRepresentationListComponent
|
||||
],
|
||||
entryComponents: [
|
||||
PublicationComponent,
|
||||
ProjectComponent,
|
||||
OrgunitComponent,
|
||||
PersonComponent,
|
||||
JournalComponent,
|
||||
JournalIssueComponent,
|
||||
JournalVolumeComponent
|
||||
PublicationComponent
|
||||
]
|
||||
})
|
||||
export class ItemPageModule {
|
||||
|
@@ -4,10 +4,8 @@ import { Observable } from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
/**
|
||||
* Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter
|
||||
* and title data.
|
||||
* The format of the key will be "{title}{filter}.title" with:
|
||||
* - title: The prefix of the key stored in route.data
|
||||
* Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter.
|
||||
* The format of the key will be "{filter}.search.title" with:
|
||||
* - filter: The current filter stored in route.params
|
||||
*/
|
||||
export class FilteredSearchPageGuard implements CanActivate {
|
||||
@@ -16,7 +14,7 @@ export class FilteredSearchPageGuard implements CanActivate {
|
||||
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
|
||||
const filter = route.params.filter;
|
||||
|
||||
const newTitle = route.data.title + filter + '.title';
|
||||
const newTitle = filter + '.search.title';
|
||||
|
||||
route.data = { title: newTitle };
|
||||
return true;
|
||||
|
@@ -9,7 +9,7 @@ import { FilteredSearchPageGuard } from './filtered-search-page.guard';
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{ path: '', component: SearchPageComponent, data: { title: 'search.title' } },
|
||||
{ path: ':filter', component: FilteredSearchPageComponent, canActivate: [FilteredSearchPageGuard], data: { title: 'search.' }}
|
||||
{ path: ':filter', component: FilteredSearchPageComponent, canActivate: [FilteredSearchPageGuard]}
|
||||
])
|
||||
]
|
||||
})
|
||||
|
@@ -62,7 +62,7 @@ export class SearchResultsComponent {
|
||||
*/
|
||||
getTitleKey() {
|
||||
if (isNotEmpty(this.fixedFilter)) {
|
||||
return 'search.' + this.fixedFilter + '.results.head'
|
||||
return this.fixedFilter + '.search.results.head'
|
||||
} else {
|
||||
return 'search.results.head';
|
||||
}
|
||||
|
@@ -37,6 +37,8 @@ import { AdminSidebarComponent } from './+admin/admin-sidebar/admin-sidebar.comp
|
||||
import { AdminSidebarSectionComponent } from './+admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component';
|
||||
import { ExpandableAdminSidebarSectionComponent } from './+admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component';
|
||||
import { NavbarModule } from './navbar/navbar.module';
|
||||
import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module';
|
||||
import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module';
|
||||
|
||||
export function getConfig() {
|
||||
return ENV_CONFIG;
|
||||
@@ -66,6 +68,11 @@ const IMPORTS = [
|
||||
StoreRouterConnectingModule,
|
||||
];
|
||||
|
||||
const ENTITY_IMPORTS = [
|
||||
JournalEntitiesModule,
|
||||
ResearchEntitiesModule
|
||||
];
|
||||
|
||||
IMPORTS.push(
|
||||
StoreDevtoolsModule.instrument({
|
||||
maxAge: 100,
|
||||
@@ -112,7 +119,8 @@ const EXPORTS = [
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
...IMPORTS
|
||||
...IMPORTS,
|
||||
...ENTITY_IMPORTS
|
||||
],
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { JournalIssueListElementComponent } from './journal-issue-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let journalIssueListElementComponent: JournalIssueListElementComponent;
|
||||
let fixture: ComponentFixture<JournalIssueListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('JournalIssue', ItemViewMode.Element)
|
||||
@Component({
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { JournalVolumeListElementComponent } from './journal-volume-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let journalVolumeListElementComponent: JournalVolumeListElementComponent;
|
||||
let fixture: ComponentFixture<JournalVolumeListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('JournalVolume', ItemViewMode.Element)
|
||||
@Component({
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { JournalListElementComponent } from './journal-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let journalListElementComponent: JournalListElementComponent;
|
||||
let fixture: ComponentFixture<JournalListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Journal', ItemViewMode.Element)
|
||||
@Component({
|
@@ -2,9 +2,12 @@ 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 { createRelationshipsObservable, getItemPageFieldsTest } from '../shared/item.component.spec';
|
||||
import { JournalIssueComponent } from './journal-issue.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createRelationshipsObservable,
|
||||
getItemPageFieldsTest
|
||||
} from '../../../../+item-page/simple/item-types/shared/item.component.spec';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
@@ -5,8 +5,11 @@ import { Item } from '../../../../core/shared/item.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('JournalIssue', ItemViewMode.Full)
|
||||
@Component({
|
@@ -2,9 +2,12 @@ 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 { createRelationshipsObservable, getItemPageFieldsTest } from '../shared/item.component.spec';
|
||||
import { JournalVolumeComponent } from './journal-volume.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createRelationshipsObservable,
|
||||
getItemPageFieldsTest
|
||||
} from '../../../../+item-page/simple/item-types/shared/item.component.spec';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
@@ -5,8 +5,11 @@ import { Item } from '../../../../core/shared/item.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('JournalVolume', ItemViewMode.Full)
|
||||
@Component({
|
@@ -8,13 +8,13 @@ import { Item } from '../../../../core/shared/item.model';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||
import { MockTranslateLoader } from '../../../../shared/mocks/mock-translate-loader';
|
||||
import { GenericItemPageFieldComponent } from '../../field-components/specific-field/generic/generic-item-page-field.component';
|
||||
import { RemoteData } from '../../../../core/data/remote-data';
|
||||
import { PaginatedList } from '../../../../core/data/paginated-list';
|
||||
import { PageInfo } from '../../../../core/shared/page-info.model';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { JournalComponent } from './journal.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { GenericItemPageFieldComponent } from '../../../../+item-page/simple/field-components/specific-field/generic/generic-item-page-field.component';
|
||||
|
||||
let comp: JournalComponent;
|
||||
let fixture: ComponentFixture<JournalComponent>;
|
@@ -5,8 +5,11 @@ import { Item } from '../../../../core/shared/item.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('Journal', ItemViewMode.Full)
|
||||
@Component({
|
@@ -0,0 +1,38 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { ItemPageModule } from '../../+item-page/item-page.module';
|
||||
import { JournalComponent } from './item-pages/journal/journal.component';
|
||||
import { JournalIssueComponent } from './item-pages/journal-issue/journal-issue.component';
|
||||
import { JournalVolumeComponent } from './item-pages/journal-volume/journal-volume.component';
|
||||
import { JournalListElementComponent } from './item-list-elements/journal/journal-list-element.component';
|
||||
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';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
JournalComponent,
|
||||
JournalIssueComponent,
|
||||
JournalVolumeComponent,
|
||||
JournalListElementComponent,
|
||||
JournalIssueListElementComponent,
|
||||
JournalVolumeListElementComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
TooltipModule.forRoot(),
|
||||
ItemPageModule
|
||||
],
|
||||
declarations: [
|
||||
...ENTRY_COMPONENTS
|
||||
],
|
||||
entryComponents: [
|
||||
...ENTRY_COMPONENTS
|
||||
]
|
||||
})
|
||||
export class JournalEntitiesModule {
|
||||
|
||||
}
|
@@ -0,0 +1 @@
|
||||
@import '../../../../../styles/variables';
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { OrgUnitListElementComponent } from './orgunit-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let orgUnitListElementComponent: OrgUnitListElementComponent;
|
||||
let fixture: ComponentFixture<OrgUnitListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('OrgUnit', ItemViewMode.Element)
|
||||
@Component({
|
@@ -1,7 +1,7 @@
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { Component } from '@angular/core';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { MetadataRepresentationType } from '../../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('OrgUnit', ItemViewMode.Element, MetadataRepresentationType.Item)
|
||||
@Component({
|
@@ -0,0 +1 @@
|
||||
@import '../../../../../styles/variables';
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { PersonListElementComponent } from './person-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let personListElementComponent: PersonListElementComponent;
|
||||
let fixture: ComponentFixture<PersonListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Person', ItemViewMode.Element)
|
||||
@Component({
|
@@ -1,7 +1,7 @@
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { Component } from '@angular/core';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { MetadataRepresentationType } from '../../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Person', ItemViewMode.Element, MetadataRepresentationType.Item)
|
||||
@Component({
|
@@ -0,0 +1 @@
|
||||
@import '../../../../../styles/variables';
|
@@ -1,12 +1,12 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../utils/truncate.pipe';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { ITEM } from '../../../../items/switcher/item-type-switcher.component';
|
||||
import { ProjectListElementComponent } from './project-list-element.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import { Item } from '../../../../core/shared/item.model';
|
||||
import { TruncatePipe } from '../../../../shared/utils/truncate.pipe';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { TruncatableService } from '../../../../shared/truncatable/truncatable.service';
|
||||
|
||||
let projectListElementComponent: ProjectListElementComponent;
|
||||
let fixture: ComponentFixture<ProjectListElementComponent>;
|
@@ -1,6 +1,6 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../typed-item-search-result-list-element.component';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { TypedItemSearchResultListElementComponent } from '../../../../shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
|
||||
@rendersItemType('Project', ItemViewMode.Element)
|
||||
@Component({
|
@@ -2,9 +2,12 @@ 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 { createRelationshipsObservable, getItemPageFieldsTest } from '../shared/item.component.spec';
|
||||
import { OrgunitComponent } from './orgunit.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createRelationshipsObservable,
|
||||
getItemPageFieldsTest
|
||||
} from '../../../../+item-page/simple/item-types/shared/item.component.spec';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
@@ -5,8 +5,11 @@ import { Item } from '../../../../core/shared/item.model';
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('OrgUnit', ItemViewMode.Full)
|
||||
@Component({
|
@@ -2,9 +2,12 @@ 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 { createRelationshipsObservable, getItemPageFieldsTest } from '../shared/item.component.spec';
|
||||
import { PersonComponent } from './person.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createRelationshipsObservable,
|
||||
getItemPageFieldsTest
|
||||
} from '../../../../+item-page/simple/item-types/shared/item.component.spec';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
@@ -6,8 +6,11 @@ import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-typ
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { SearchFixedFilterService } from '../../../../+search-page/search-filters/search-filter/search-fixed-filter.service';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('Person', ItemViewMode.Full)
|
||||
@Component({
|
@@ -2,9 +2,12 @@ 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 { createRelationshipsObservable, getItemPageFieldsTest } from '../shared/item.component.spec';
|
||||
import { ProjectComponent } from './project.component';
|
||||
import { of as observableOf } from 'rxjs';
|
||||
import {
|
||||
createRelationshipsObservable,
|
||||
getItemPageFieldsTest
|
||||
} from '../../../../+item-page/simple/item-types/shared/item.component.spec';
|
||||
|
||||
const mockItem: Item = Object.assign(new Item(), {
|
||||
bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))),
|
@@ -6,8 +6,11 @@ import { MetadataRepresentation } from '../../../../core/shared/metadata-represe
|
||||
import { ItemViewMode, rendersItemType } from '../../../../shared/items/item-type-decorator';
|
||||
import { ITEM } from '../../../../shared/items/switcher/item-type-switcher.component';
|
||||
import { isNotEmpty } from '../../../../shared/empty.util';
|
||||
import { ItemComponent } from '../shared/item.component';
|
||||
import { filterRelationsByTypeLabel, relationsToItems } from '../shared/item-relationships-utils';
|
||||
import { ItemComponent } from '../../../../+item-page/simple/item-types/shared/item.component';
|
||||
import {
|
||||
filterRelationsByTypeLabel,
|
||||
relationsToItems
|
||||
} from '../../../../+item-page/simple/item-types/shared/item-relationships-utils';
|
||||
|
||||
@rendersItemType('Project', ItemViewMode.Full)
|
||||
@Component({
|
@@ -0,0 +1,42 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { SharedModule } from '../../shared/shared.module';
|
||||
import { ItemPageModule } from '../../+item-page/item-page.module';
|
||||
import { OrgunitComponent } from './item-pages/orgunit/orgunit.component';
|
||||
import { PersonComponent } from './item-pages/person/person.component';
|
||||
import { ProjectComponent } from './item-pages/project/project.component';
|
||||
import { OrgUnitListElementComponent } from './item-list-elements/orgunit/orgunit-list-element.component';
|
||||
import { OrgUnitMetadataListElementComponent } from './item-list-elements/orgunit/orgunit-metadata-list-element.component';
|
||||
import { PersonMetadataListElementComponent } from './item-list-elements/person/person-metadata-list-element.component';
|
||||
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';
|
||||
|
||||
const ENTRY_COMPONENTS = [
|
||||
OrgunitComponent,
|
||||
PersonComponent,
|
||||
ProjectComponent,
|
||||
OrgUnitListElementComponent,
|
||||
OrgUnitMetadataListElementComponent,
|
||||
PersonListElementComponent,
|
||||
PersonMetadataListElementComponent,
|
||||
ProjectListElementComponent
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
SharedModule,
|
||||
TooltipModule.forRoot(),
|
||||
ItemPageModule
|
||||
],
|
||||
declarations: [
|
||||
...ENTRY_COMPONENTS
|
||||
],
|
||||
entryComponents: [
|
||||
...ENTRY_COMPONENTS
|
||||
]
|
||||
})
|
||||
export class ResearchEntitiesModule {
|
||||
|
||||
}
|
@@ -1 +0,0 @@
|
||||
@import '../../../../../../styles/variables';
|
@@ -1 +0,0 @@
|
||||
@import '../../../../../../styles/variables';
|
@@ -1 +0,0 @@
|
||||
@import '../../../../../../styles/variables';
|
@@ -10,15 +10,8 @@ import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { NgxPaginationModule } from 'ngx-pagination';
|
||||
import { ItemTypeSwitcherComponent } from './items/switcher/item-type-switcher.component';
|
||||
import { OrgUnitMetadataListElementComponent } from './object-list/item-list-element/item-types/orgunit/orgunit-metadata-list-element.component';
|
||||
import { TypedItemSearchResultListElementComponent } from './object-list/item-list-element/item-types/typed-item-search-result-list-element.component';
|
||||
import { PublicationListElementComponent } from './object-list/item-list-element/item-types/publication/publication-list-element.component';
|
||||
import { OrgUnitListElementComponent } from './object-list/item-list-element/item-types/orgunit/orgunit-list-element.component';
|
||||
import { PersonListElementComponent } from './object-list/item-list-element/item-types/person/person-list-element.component';
|
||||
import { ProjectListElementComponent } from './object-list/item-list-element/item-types/project/project-list-element.component';
|
||||
import { JournalListElementComponent } from './object-list/item-list-element/item-types/journal/journal-list-element.component';
|
||||
import { JournalVolumeListElementComponent } from './object-list/item-list-element/item-types/journal-volume/journal-volume-list-element.component';
|
||||
import { JournalIssueListElementComponent } from './object-list/item-list-element/item-types/journal-issue/journal-issue-list-element.component';
|
||||
|
||||
import { FileUploadModule } from 'ng2-file-upload';
|
||||
|
||||
@@ -117,7 +110,6 @@ import { LangSwitchComponent } from './lang-switch/lang-switch.component';
|
||||
import { PlainTextMetadataListElementComponent } from './object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component';
|
||||
import { ItemMetadataListElementComponent } from './object-list/metadata-representation-list-element/item/item-metadata-list-element.component';
|
||||
import { TooltipModule } from 'ngx-bootstrap';
|
||||
import { PersonMetadataListElementComponent } from './object-list/item-list-element/item-types/person/person-metadata-list-element.component';
|
||||
import { MetadataRepresentationListElementComponent } from './object-list/metadata-representation-list-element/metadata-representation-list-element.component';
|
||||
import { ComColFormComponent } from './comcol-forms/comcol-form/comcol-form.component';
|
||||
import { CreateComColPageComponent } from './comcol-forms/create-comcol-page/create-comcol-page.component';
|
||||
@@ -283,14 +275,6 @@ const ENTRY_COMPONENTS = [
|
||||
CommunityGridElementComponent,
|
||||
SearchResultGridElementComponent,
|
||||
PublicationListElementComponent,
|
||||
PersonListElementComponent,
|
||||
PersonMetadataListElementComponent,
|
||||
OrgUnitMetadataListElementComponent,
|
||||
OrgUnitListElementComponent,
|
||||
ProjectListElementComponent,
|
||||
JournalListElementComponent,
|
||||
JournalVolumeListElementComponent,
|
||||
JournalIssueListElementComponent,
|
||||
BrowseEntryListElementComponent,
|
||||
MyDSpaceResultDetailElementComponent,
|
||||
SearchResultGridElementComponent,
|
||||
|
Reference in New Issue
Block a user