+
+
-
-
-
-
+
Información de la tesis
Información general
Información g
[fields]="['thesis.degree.grantor']"
[label]="'Institución otorgante'">
-
-
Información general
-
-
+
+
Información general
+ [fields]="['dc.title.alternative']"
+ [label]="'Título alternativo'">
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ [fields]="['dc.format.extent']"
+ [label]="'Páginas'">
+
+
+ [fields]="['dc.audience']"
+ [label]="'Contexto de uso'">
+ [fields]="['dc.publisher']"
+ [label]="subtype === ('Discurso' || 'Entrevista') ? 'Producción' : 'Editorial'">
-
-
-
-
@@ -186,90 +201,13 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss
index 4421d20a190..5108aaaa558 100644
--- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss
+++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.scss
@@ -6,18 +6,17 @@
.badge-title-content {
display: flex;
flex-direction: column;
-
- h4 {
- font-size: 1.75rem;
- color: #999;
- margin-bottom: 0.5rem;
- }
+ color: #999;
}
.edit-menu {
margin-left: auto;
}
+.subtitle-container {
+ margin-top: 10px;
+}
+
.subtitle-content {
font-style: italic;
color: #555;
@@ -36,15 +35,11 @@
.item-identifiers {
display: flex;
flex-wrap: wrap;
- gap: 0.2em;
-
- div {
- display: inline-block;
- padding-right: 0.2em;
- }
+ gap: 0.2rem;
}
.reference-image {
max-width: 100%;
height: auto;
+ margin-bottom: 10px;
}
\ No newline at end of file
diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts
index f7bf1258b23..6243daf04a6 100644
--- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts
+++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts
@@ -14,33 +14,13 @@ import { TranslateModule } from '@ngx-translate/core';
import { Context } from '../../../../../../../app/core/shared/context.model';
import { Item } from '../../../../../../../app/core/shared/item.model';
import { ViewMode } from '../../../../../../../app/core/shared/view-mode.model';
-import { CollectionsComponent } from '../../../../../../../app/item-page/field-components/collections/collections.component';
-import { ThemedMediaViewerComponent } from '../../../../../../../app/item-page/media-viewer/themed-media-viewer.component';
-import { MiradorViewerComponent } from '../../../../../../../app/item-page/mirador-viewer/mirador-viewer.component';
-import { ThemedFileSectionComponent } from '../../../../../../../app/item-page/simple/field-components/file-section/themed-file-section.component';
-import { ItemPageAbstractFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component';
-import { ItemPageCcLicenseFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/cc-license/item-page-cc-license-field.component';
-import { ItemPageDateFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/date/item-page-date-field.component';
-import { ItemPageAuthorFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/author/item-page-author-field.component';
import { GenericItemPageFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component';
-import { ThemedItemPageTitleFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/title/themed-item-page-field.component';
import { ItemPageUriFieldComponent } from '../../../../../../../app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component';
import { UntypedItemComponent as BaseComponent } from '../../../../../../../app/item-page/simple/item-types/untyped-item/untyped-item.component';
-import { ThemedMetadataRepresentationListComponent } from '../../../../../../../app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component';
import { DsoEditMenuComponent } from '../../../../../../../app/shared/dso-page/dso-edit-menu/dso-edit-menu.component';
-import { MetadataFieldWrapperComponent } from '../../../../../../../app/shared/metadata-field-wrapper/metadata-field-wrapper.component';
import { listableObjectComponent } from '../../../../../../../app/shared/object-collection/shared/listable-object/listable-object.decorator';
-import { ThemedResultsBackButtonComponent } from '../../../../../../../app/shared/results-back-button/themed-results-back-button.component';
-import { ThemedThumbnailComponent } from '../../../../../../../app/thumbnail/themed-thumbnail.component';
-import { MetadataValuesComponent } from 'src/app/item-page/field-components/metadata-values/metadata-values.component';
-import { MetadataRepresentationListComponent } from '../../metadata-representation-list/metadata-representation-list.component';
-import { FileSectionComponent } from '../../field-components/file-section/file-section.component';
-import { MediaViewerComponent } from '../../../media-viewer/media-viewer.component';
-import { ThumbnailComponent } from 'src/themes/custom/app/thumbnail/thumbnail.component';
-import { ResultsBackButtonComponent } from 'src/themes/custom/app/shared/results-back-button/results-back-button.component';
import { SediciContextBadgeComponent } from 'src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component';
import { LanguageSwitcherComponent } from './language-switcher.component';
-import { ApaCitationComponent } from './apa-citation.component';
import { MetadataValue } from 'src/app/core/shared/metadata.models';
import { BadgeMetadataValuesComponent } from '../../field-components/badge-metadata-values/badge-metadata-values.component';
import { TruncatableComponent } from 'src/app/shared/truncatable/truncatable.component';
@@ -48,6 +28,9 @@ import { TruncatablePartComponent } from 'src/app/shared/truncatable/truncatable
import { TabbedContentComponent } from './tabbed-content.component';
import { SediciDateMetadataValuesComponent } from '../../field-components/date-metadata-values/sedici-date-metadata-values.component';
import { SediciLanguageMetadataValuesComponent } from '../../field-components/language-metadata-values/sedici-language-metadata-values.component';
+import { setPersistentIdentifiers } from 'src/app/shared/utils/persistent.identifier';
+import { SediciTruncatableGenericItemPageFieldComponent } from './sedici-truncatable-generic-item-page-field';
+
/**
* Component that represents an untyped Item page
*/
@@ -64,89 +47,32 @@ import { SediciLanguageMetadataValuesComponent } from '../../field-components/la
NgIf,
NgFor,
NgStyle,
- ThemedResultsBackButtonComponent,
- MiradorViewerComponent,
- ThemedItemPageTitleFieldComponent,
DsoEditMenuComponent,
- MetadataFieldWrapperComponent,
- ThemedThumbnailComponent,
- ThemedMediaViewerComponent,
- ThemedFileSectionComponent,
- ItemPageDateFieldComponent,
- ThemedMetadataRepresentationListComponent,
GenericItemPageFieldComponent,
- ItemPageAbstractFieldComponent,
ItemPageUriFieldComponent,
- CollectionsComponent,
RouterLink,
AsyncPipe,
TranslateModule,
- ItemPageCcLicenseFieldComponent,
- MetadataValuesComponent,
- MetadataRepresentationListComponent,
- FileSectionComponent,
- MediaViewerComponent,
- ThumbnailComponent,
- ResultsBackButtonComponent,
LanguageSwitcherComponent,
- ItemPageAuthorFieldComponent,
BadgeMetadataValuesComponent,
TruncatableComponent,
TruncatablePartComponent,
- ApaCitationComponent,
TabbedContentComponent,
SediciDateMetadataValuesComponent,
SediciLanguageMetadataValuesComponent,
SediciContextBadgeComponent,
+ SediciTruncatableGenericItemPageFieldComponent,
],
})
export class UntypedItemComponent extends BaseComponent {
- hasMultipleLanguages: boolean;
subtype;
identifierOtherMetadataName = ['dc.identifier.uri', 'sedici.identifier.other'];
- itemIdentifiers: { mdValue: MetadataValue, label: string }[];
+ itemIdentifiers: { mdValue: MetadataValue, label: string, url: string }[];
ngOnInit() {
super.ngOnInit();
const abstracts = this.object.metadata['dc.description.abstract'];
- this.hasMultipleLanguages = abstracts && abstracts.length > 1;
this.subtype = this.object.metadata['sedici.subtype'][0]?.value;
- this.setIdentifierOtherValues();
- }
-
- setIdentifierOtherValues(): void {
- this.itemIdentifiers = [];
- const length = this.itemIdentifiers.push({
- mdValue: new MetadataValue(),
- label: 'HDL'
- });
- this.itemIdentifiers[length - 1].mdValue.value = this.object?.handle;
- this.object.allMetadata(this.identifierOtherMetadataName).forEach(
- (mdValue, index) => {
- let charIndex = -1;
- let label = '';
- if (mdValue.value.includes(this.object?.handle)) {
- if (mdValue.value.includes('doi')) {
- label = 'DOI';
- } else {
- return;
- }
- } else {
- if (!mdValue.value.startsWith('http')) {
- const splitChar = mdValue.value.includes(':') ? ':' : ' ';
- charIndex = mdValue.value.indexOf(splitChar);
- label = mdValue.value.substring(0, charIndex).toUpperCase();
- } else {
- label = 'URL';
- }
- }
- const value = mdValue.value.substring(charIndex + 1).trim();
- const identifierListLength = this.itemIdentifiers.push({
- mdValue: new MetadataValue(),
- label: label
- });
- this.itemIdentifiers[identifierListLength - 1].mdValue.value = value;
- }
- );
+ this.itemIdentifiers = setPersistentIdentifiers(this.object, this.identifierOtherMetadataName);
}
}
diff --git a/src/themes/custom/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts b/src/themes/custom/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts
index 24e0006b884..f0ceef75ff4 100644
--- a/src/themes/custom/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts
+++ b/src/themes/custom/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts
@@ -2,9 +2,24 @@ import {
AsyncPipe,
NgIf,
} from '@angular/common';
-import { Component } from '@angular/core';
+import {
+ Component,
+} from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
+import {
+ of as observableOf,
+} from 'rxjs';
+import {
+ catchError,
+ map,
+} from 'rxjs/operators';
+import { environment } from 'src/environments/environment';
+import { Item } from 'src/app/core/shared/item.model';
+import { ITEM } from 'src/app/core/shared/item.resource-type';
+import { hasValue } from 'src/app/shared/empty.util';
+import { AccessStatusObject } from 'src/app/shared/object-collection/shared/badges/access-status-badge/access-status.model';
import { AccessStatusBadgeComponent as BaseComponent } from 'src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component';
+import { RemoteData } from 'src/app/core/data/remote-data';
@Component({
selector: 'ds-themed-access-status-badge',
@@ -15,4 +30,44 @@ import { AccessStatusBadgeComponent as BaseComponent } from 'src/app/shared/obje
imports: [NgIf, AsyncPipe, TranslateModule],
})
export class AccessStatusBadgeComponent extends BaseComponent {
+
+ ngOnInit(): void {
+ this.showAccessStatus = environment.item.showAccessStatuses;
+ if (this.object.type.toString() !== ITEM.value || !this.showAccessStatus || this.object == null) {
+ // Do not show the badge if the feature is inactive or if the item is null.
+ return;
+ }
+
+ const item = this.object as Item;
+ let accessStatus$;
+
+ if (item.accessStatus == null) {
+ // In case the access status has not been loaded, do it individually.
+ accessStatus$ = this.accessStatusDataService.findAccessStatusFor(item);
+ } else {
+ accessStatus$ = item.accessStatus;
+ }
+
+ this.accessStatus$ = accessStatus$.pipe(
+ map((accessStatusRD: RemoteData
) => {
+ if (accessStatusRD.statusCode !== 401 && hasValue(accessStatusRD.payload)) {
+ return accessStatusRD.payload;
+ } else {
+ return [];
+ }
+ }),
+ map((accessStatus: AccessStatusObject) => hasValue(accessStatus.status) ? accessStatus.status : 'unknown'),
+ map((status: string) => `access-status.${status.toLowerCase()}.listelement.badge`),
+ catchError(() => observableOf('access-status.unknown.listelement.badge')),
+ );
+
+ // stylesheet based on the access status value
+ this.subs.push(
+ this.accessStatus$.pipe(
+ map((accessStatusClass: string) => accessStatusClass.replace(/\./g, '-')),
+ ).subscribe((accessStatusClass: string) => {
+ this.accessStatusClass = accessStatusClass;
+ }),
+ );
+ }
}
diff --git a/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.scss b/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.scss
index b8cb48e7358..f0f3ec93a31 100644
--- a/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.scss
+++ b/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.scss
@@ -5,7 +5,7 @@
.context-info,
.context-year {
- font-size: 12px;
+ font-size: .75rem;
position: relative;
&:hover::after {
content: '';
diff --git a/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.ts b/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.ts
index 6ba11b96d53..2b0a365519d 100644
--- a/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.ts
+++ b/src/themes/custom/app/shared/object-collection/shared/badges/sedici-context-badge/sedici-context-badge.component.ts
@@ -27,6 +27,20 @@ export class SediciContextBadgeComponent extends BaseComponent {
}
}
+ getBookInfo(): string {
+ const bookTitle = this.object.firstMetadataValue('sedici.relation.bookTitle');
+ const isPartOf = this.object.firstMetadataValue('dc.relation.ispartof');
+
+ if (bookTitle && isPartOf) {
+ return `${bookTitle}; ${isPartOf}`;
+ } else if (bookTitle) {
+ return bookTitle;
+ } else if (isPartOf) {
+ return isPartOf;
+ }
+ return '';
+ }
+
getJournalInfo(): string {
const journalTitle = this.object.firstMetadataValue('sedici.relation.journalTitle');
const journalVolumeAndIssue = this.object.firstMetadataValue('sedici.relation.journalVolumeAndIssue');
@@ -35,35 +49,45 @@ export class SediciContextBadgeComponent extends BaseComponent {
return `${journalTitle}; ${journalVolumeAndIssue}`;
} else if (journalTitle) {
return journalTitle;
- } else {
- return '';
}
+ return '';
}
- getOriginInfoPlace(): string {
- let place = this.object.firstMetadataValue('mods.originInfo.place');
- if (!place) {
- return '';
+ getEventInfo(): string {
+ const event = this.object.firstMetadataValue('sedici.relation.event');
+ if (event) {
+ return event;
}
- return place;
+ return '';
}
- getEventInfo(): string {
- let event = this.object.firstMetadataValue('sedici.relation.event');
- if (!event) {
- return '';
+ getCicloInfo(): string {
+ const ciclo = this.object.firstMetadataValue('sedici.relation.ciclo');
+ if (ciclo) {
+ return ciclo;
+ }
+ return '';
+ }
+
+ getOriginInfoPlace(): string {
+ let originInfo = this.object.firstMetadataValue('mods.originInfo.place');
+ if (originInfo) {
+ return originInfo;
}
- return event;
+ return '';
}
getContextInfo(): string {
- let thesis = this.getThesisInfo();
- let journal = this.getJournalInfo();
- let event = this.getEventInfo();
- let origin = this.getOriginInfoPlace();
+ const thesis = this.getThesisInfo();
if (thesis) {
return thesis;
};
+ const bookTitle = this.getBookInfo();
+ if (bookTitle) {
+ return bookTitle;
+ };
+ const journal = this.getJournalInfo();
+ const event = this.getEventInfo();
if (journal || event) {
if (journal && event) {
return `${journal} | ${event}`;
@@ -73,14 +97,22 @@ export class SediciContextBadgeComponent extends BaseComponent {
return event;
};
};
- return origin;
+ const ciclo = this.getCicloInfo();
+ if (ciclo) {
+ return ciclo;
+ };
+ const originInfo = this.getOriginInfoPlace();
+ if (originInfo) {
+ return originInfo;
+ };
+ return '';
}
getYear(): string {
- let dateString = this.object.firstMetadataValue('dc.date.issued') || this.object.firstMetadataValue('dc.date.created');
- if (!dateString) {
- return '';
+ let dateString = this.object.firstMetadataValue('dc.date.issued') || this.object.firstMetadataValue('dc.date.created') || this.object.firstMetadataValue('sedici.date.exposure');
+ if (dateString) {
+ return dateString.split('-')[0];
}
- return dateString.split('-')[0];
+ return '';
}
}