diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5
index 68eeee24873..3788d105a58 100644
--- a/src/assets/i18n/en.json5
+++ b/src/assets/i18n/en.json5
@@ -7112,6 +7112,10 @@
"sedici.item.page.unknown.author": "Unknown Author",
+ // "sedici.item.page.dc.description.no_abstract": "Este item no posee resumen",
+ "sedici.item.page.dc.description.no_abstract": "This item has no abstract",
+
+
"sedici.item.page.sedici.citation": "Cite",
"sedici.item.page.sedici.share": "Share",
diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5
index e59bd4bd750..9e083f9261d 100644
--- a/src/assets/i18n/es.json5
+++ b/src/assets/i18n/es.json5
@@ -9954,6 +9954,7 @@
"search.navbar.placeholder": "Buscar en SEDICI UNLP",
// Vista del ítem
+ "sedici.item.page.dc.description.no_abstract": "Este item no posee resumen",
"sedici.item.page.unknown.author": "Autor desconocido",
"sedici.item.page.sedici.citation": "Citar",
"sedici.item.page.sedici.share": "Compartir",
diff --git a/src/assets/i18n/pt-BR.json5 b/src/assets/i18n/pt-BR.json5
index 1b535ab113b..233dce3ae9c 100644
--- a/src/assets/i18n/pt-BR.json5
+++ b/src/assets/i18n/pt-BR.json5
@@ -10937,6 +10937,9 @@
"search.navbar.placeholder": "Buscar no SEDICI UNLP",
+ // "sedici.item.page.dc.description.no_abstract": "This item has no abstract",
+ "sedici.item.page.dc.description.no_abstract": "Este item não possui resumo",
+
"sedici.item.page.unknown.author": "Autor desconhecido",
"sedici.item.page.sedici.citation": "Citar",
diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.html b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.html
index eb8cfeccbf0..d3079e5f216 100644
--- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.html
+++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.html
@@ -1,8 +1,13 @@
-
-
+
+ @if (!hasAbstract()) {
+
+ {{'sedici.item.page.dc.description.no_abstract' | translate}}
+ } @else {
+
+ }
diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.scss b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.scss
index 386ac1c66df..f533b375c5a 100644
--- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.scss
+++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.scss
@@ -65,6 +65,17 @@
text-align: justify;
}
+.no-abstract {
+ color: #413f3f;
+ font-size: 14px;
+ font-style: italic;
+}
+
+.info-icon {
+ color: #706f6f;
+ margin-right: 4px;
+}
+
::ng-deep .language-switcher-wrapper ds-truncatable-part .collapseButton,
::ng-deep .language-switcher-wrapper ds-truncatable-part .expandButton {
margin-left: auto;
diff --git a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.ts b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.ts
index 4a91b45eb0d..bad1aa704e2 100644
--- a/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.ts
+++ b/src/themes/custom/app/item-page/simple/item-types/untyped-item/language-switcher.component.ts
@@ -1,6 +1,5 @@
import { Component, Input } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
-
import { TranslateModule } from '@ngx-translate/core';
import { TruncatableComponent } from 'src/app/shared/truncatable/truncatable.component';
import { TruncatablePartComponent } from 'src/app/shared/truncatable/truncatable-part/truncatable-part.component';
@@ -20,22 +19,27 @@ export class LanguageSwitcherComponent {
@Input() item: any;
selectedLanguage: string;
availableLanguages: any[];
+ abstracts: any[];
constructor(private sanitizer: DomSanitizer) {}
ngOnInit() {
const langValue = this.item.metadata['dc.language']?.[0]?.value;
this.selectedLanguage = !langValue || langValue === 'other' ? '??' : langValue;
+ this.abstracts = this.item.metadata['dc.description.abstract'];
this.availableLanguages = this.getAvailableLanguages();
}
+ hasAbstract(): boolean {
+ return this.abstracts && this.abstracts.length > 0;
+ }
+
getAbstract(): SafeHtml {
- const abstracts = this.item.metadata['dc.description.abstract'];
- if (abstracts) {
- let abstract = abstracts.find((abstract: any) => (abstract.language || '??') === this.selectedLanguage)?.value || '';
+ if (this.abstracts) {
+ let abstract = this.abstracts.find((abstract: any) => (abstract.language || '??') === this.selectedLanguage)?.value || '';
if (!abstract) {
- abstract = abstracts[0].value;
- this.selectedLanguage = abstracts[0].language;
+ abstract = this.abstracts[0].value;
+ this.selectedLanguage = this.abstracts[0].language;
}
return this.sanitizer.bypassSecurityTrustHtml(abstract);
}
@@ -47,9 +51,8 @@ export class LanguageSwitcherComponent {
}
getAvailableLanguages() {
- const abstracts = this.item.metadata['dc.description.abstract'];
- if (abstracts) {
- return [...new Set(abstracts.map((abstract: any) => (abstract.language || '??')))];
+ if (this.abstracts) {
+ return [...new Set(this.abstracts.map((abstract: any) => (abstract.language || '??')))];
}
return [];
}