Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
5cd8673
11008 backup primera versión vista del ítem
178Pelado Sep 2, 2024
74be601
11008 Primera versión vista del ítem; cambio tamaño font-size-base
178Pelado Oct 4, 2024
e34b533
Cambios en el home, header y footer
GarrafaGalactica Oct 3, 2024
b8679c4
11008 Agrego el matcheo por autoridad a los links de la vista del ite…
178Pelado Dec 12, 2024
cd66a55
11011 traducciones metadatos y licencias; vista del ítem
178Pelado Dec 12, 2024
93c6210
11008 modifico el font-size pero directamente en los archivos theme. …
178Pelado Dec 12, 2024
d2d4afb
Soluciono vista cambio de idioma DSpace
178Pelado Dec 12, 2024
5f9af2d
11008 vista del ítem; nueva ubicación de metadatos; maquetas de cómo…
178Pelado Dec 12, 2024
6071145
11008 actualización package.json (ngx-doc-viewer y jszip)
178Pelado Dec 12, 2024
d84c4ef
11008 cambio el trail en responsive. solamente se muestra la comunida…
178Pelado Dec 16, 2024
aab4052
11008 elimino un margen del contexto
178Pelado Dec 16, 2024
2af7d0a
11008 agrego margin-bottom al truncate
178Pelado Dec 16, 2024
76befd6
11008 cambio disposición botones cómo citar y compartir. elimino padd…
178Pelado Dec 16, 2024
72897bf
11008 paso el botón de descarga al modal del preview. Se accede hacie…
178Pelado Dec 16, 2024
6f08149
11008 cambio margin-bottom metadatos sedici-truncate
178Pelado Dec 17, 2024
3d1c457
11008 primera versión funcionamiento botones compartir
178Pelado Dec 17, 2024
eacb334
11008 cambios estilos vista del item, botón de descarga y versión mobile
178Pelado Feb 18, 2025
af0c075
Merge branch 'sedici_main' into ticket#11008
178Pelado Feb 24, 2025
9dc44b5
11008 primera versión vista de PDF embargado
178Pelado Feb 28, 2025
d6f235c
11008 cambios tipografías y badges
178Pelado Mar 10, 2025
087b7d0
11008 modificaciones tipografía y vista de archivos con y sin preview
178Pelado Mar 14, 2025
3894d3c
11008 cambios a la forma de mostrar archivos embargados, sin preview …
178Pelado Mar 20, 2025
509d252
11008 más cambios vista del item y facets de busqueda
178Pelado Apr 4, 2025
e71ef1b
11008 traducción tab de contenido y submission
178Pelado Apr 4, 2025
02aeac4
11008 cambios vista mobile, badges contexto e identificados, vista re…
178Pelado Apr 11, 2025
3f1b21b
11008 acomodo estilo para todos los tipos de identificadores. no perm…
178Pelado Apr 14, 2025
a23a1a7
11008 corrijo como se musetran los textos truncados
178Pelado Apr 15, 2025
a8f4992
11008 corrijo la formar n que se recupera el primaryBitstreamId
178Pelado Apr 15, 2025
06561a9
11008 cambio texto lista de archivos y padding vista de zip
178Pelado Apr 15, 2025
a7eaffd
11008 cambios tamaño tipografia, colores, tabs de contenido y traducc…
178Pelado Apr 24, 2025
ba3ae31
11008 y 11006, cambios tipografía vista del item / primera versión de…
178Pelado May 9, 2025
c37b43f
corrijo temporalmente el color de la barra de búsqueda del search
178Pelado May 9, 2025
d1e5372
11006 cambios footer y primera version mobile
178Pelado May 9, 2025
c7efa48
11006 y 11007 redireño del header y del home; lógica para mostrar com…
178Pelado May 23, 2025
2efc0de
11006 y 11007 cambios home en desktop y mobile
178Pelado May 26, 2025
ea3023f
11006 y 11007 agrego logos "Aliados" y footer
178Pelado May 27, 2025
6bc7223
11006 prueba agregar barra de navegación para mobile
178Pelado May 27, 2025
047d6dc
11006 y 11007 agrego links a home y footer
178Pelado May 27, 2025
498bc47
11007 división de Unidades Académicas, escondo descripciones en home …
178Pelado May 29, 2025
e367f24
11007 saco la imagen de background y hago el degradé con scss
178Pelado May 30, 2025
d15de51
11007 hardcodeo recuperación de comunidades para el home en un nuevo …
178Pelado May 30, 2025
2268137
11007 soluciono error barra de busqueda y cambio placeholder
178Pelado Jun 2, 2025
034346f
cambios menores de código sin usar
178Pelado Jun 2, 2025
247cd75
actualizo package.json
178Pelado Jun 2, 2025
1fd9c8c
actualizo yarn.lock
178Pelado Jun 2, 2025
aac3e0b
Merge branch 'sedici_main' into ticket#11008
178Pelado Jun 2, 2025
e3a72ea
elimino imagenes de fondo que ya no se usan
178Pelado Jun 2, 2025
371e930
elimino código innecesario de LaReferencia
178Pelado Jun 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/breadcrumbs/breadcrumbs.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class BreadcrumbsComponent {
showBreadcrumbs$: Observable<boolean>;

constructor(
private breadcrumbsService: BreadcrumbsService,
protected breadcrumbsService: BreadcrumbsService,
) {
this.breadcrumbs$ = breadcrumbsService.breadcrumbs$;
this.showBreadcrumbs$ = breadcrumbsService.showBreadcrumbs$;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<ds-metadata-field-wrapper [label]="label | translate">
<div class="collections">
<a *ngFor="let collection of (this.collections$ | async); let last=last;" [routerLink]="['/collections', collection.id]">
<span>{{ dsoNameService.getName(collection) }}</span><span *ngIf="!last" [innerHTML]="separator"></span>
</a>
</div>
<ul class="collections">
<li *ngFor="let collection of (this.collections$ | async); let last=last;">
<a [routerLink]="['/collections', collection.id]">
<span>{{ dsoNameService.getName(collection) }}</span>
</a>
<span *ngIf="!last" [innerHTML]="separator"></span>
</li>
</ul>

<div *ngIf="isLoading$ | async">
{{'item.page.collections.loading' | translate}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.collections {
list-style-type: disc;
padding-left: 1.5em;
margin: 0;

li {
margin-bottom: 0.5em;
}

a {
text-decoration: none;
}

a:hover {
text-decoration: underline;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wr

@Component({
selector: 'ds-item-page-collections',
styleUrls: ['./collections.component.scss'],
templateUrl: './collections.component.html',
imports: [
MetadataFieldWrapperComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<ds-metadata-field-wrapper [label]="label | translate">
<a class="dont-break-out" *ngFor="let mdValue of mdValues; let last=last;" [href]="mdValue.value" [target]="hasInternalLink(mdValue.value) ? '_self' : '_blank'">
{{ linktext || mdValue.value }}<span *ngIf="!last" [innerHTML]="separator"></span>
<a class="dont-break-out" *ngFor="let mdValue of mdValues; let last=last;"
[href]="mdValue.value"
[target]="hasInternalLink(mdValue.value) ? '_self' : '_blank'">{{getDomain(mdValue.value)}}/...
<span *ngIf="!last" [innerHTML]="separator"></span>
</a>
</ds-metadata-field-wrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,19 @@ export class MetadataUriValuesComponent extends MetadataValuesComponent {
* The label for this iteration of metadata values
*/
@Input() label: string;

/**
* Extract the domain from a URL
* @param url The full URL
* @returns The domain of the URL
*/
getDomain(url: string): string {
try {
const parsedUrl = new URL(url);
return parsedUrl.origin;
} catch (e) {
console.error('Invalid URL:', url);
return url;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Choose a template. Priority: markdown, link, browse link.
-->
<ng-container *ngTemplateOutlet="(renderMarkdown ? markdown : (hasLink(mdValue) ? (hasValue(img) ? linkImg : link) : (hasBrowseDefinition() ? browselink : simple)));
context: {value: mdValue.value, img}">
context: {value: mdValue.value, authority: mdValue.authority, img}">
</ng-container>
<span class="separator" *ngIf="!last" [innerHTML]="separator"></span>
</ng-container>
Expand Down Expand Up @@ -39,12 +39,12 @@

<!-- Render simple value in a span -->
<ng-template #simple let-value="value">
<span class="dont-break-out preserve-line-breaks">{{value}}</span>
<span [innerHTML]="value" class="preserve-line-breaks"></span>
</ng-template>

<!-- Render value as a link to browse index -->
<ng-template #browselink let-value="value">
<ng-template #browselink let-value="value" let-authority="authority">
<a class="dont-break-out preserve-line-breaks ds-browse-link"
[routerLink]="['/browse', browseDefinition.id]"
[queryParams]="getQueryParams(value)">{{value}}</a>
[queryParams]="getQueryParams(value, authority)">{{value}}</a>
</ng-template>
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ export class MetadataValuesComponent implements OnChanges {
* definition is metadata browse, or item browse
* @param value the specific metadata value being linked
*/
getQueryParams(value) {
const queryParams = { startsWith: value };
getQueryParams(value, authority) {
const queryParams = { value: value, authority: authority };
// todo: should compare with type instead?
// eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
if (this.browseDefinition.getRenderType() === VALUE_LIST_BROWSE_DEFINITION.value) {
Expand Down
130 changes: 96 additions & 34 deletions src/app/menu-resolver.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,50 +99,112 @@ export class MenuResolverService {
createPublicMenu$(): Observable<boolean> {
const menuList: any[] = [
/* Communities & Collections tree */
{
id: `browse_global_communities_and_collections`,
// {
// id: `browse_global_communities_and_collections`,
// active: false,
// visible: true,
// index: 0,
// model: {
// type: MenuItemType.LINK,
// text: `menu.section.browse_global_communities_and_collections`,
// link: `/community-list`,
// } as LinkMenuItemModel,
// },
];

const itemsInstitucional = [
{ id: '¿Qué es SEDICI?', texto: '¿Qué es SEDICI?', ruta: '¿Qué es SEDICI?' },
{ id: 'Políticas del repositorio', texto: 'Políticas del repositorio', ruta: 'Políticas del repositorio' },
{ id: 'Links', texto: 'Links', ruta: 'Links' },
{ id: 'Staff', texto: 'Staff', ruta: 'Staff' },
{ id: '¿Cómo llegar?', texto: '¿Cómo llegar?', ruta: '¿Cómo llegar?' },
];
itemsInstitucional.forEach(item => {
menuList.push({
id: item.id,
parentID: 'Institucional',
active: false,
visible: true,
index: 0,
model: {
type: MenuItemType.LINK,
text: `menu.section.browse_global_communities_and_collections`,
link: `/community-list`,
text: item.texto,
link: `${item.ruta}`,
} as LinkMenuItemModel,
},
});
});
menuList.push({
id: 'Institucional',
active: false,
visible: true,
index: 3,
model: {
type: MenuItemType.TEXT,
text: 'Institucional',
} as TextMenuItemModel,
});

const itemsPreguntasFrecuentes = [
{ id: '¿Cómo agregar trabajos?', texto: '¿Cómo agregar trabajos?', ruta: '¿Cómo agregar trabajos?' },
{ id: 'Información para tesistas', texto: 'Información para tesistas', ruta: 'Información para tesistas' },
{ id: 'Revistas de Acceso Abierto', texto: 'Revistas de Acceso Abierto', ruta: 'Revistas de Acceso Abierto' },
{ id: 'Más preguntas frecuentes', texto: 'Más preguntas frecuentes', ruta: 'Más preguntas frecuentes' },
];
itemsPreguntasFrecuentes.forEach(item => {
menuList.push({
id: item.id,
parentID: 'PreguntasFrecuentes',
active: false,
visible: true,
model: {
type: MenuItemType.LINK,
text: item.texto,
link: `${item.ruta}`,
} as LinkMenuItemModel,
});
});
menuList.push({
id: 'PreguntasFrecuentes',
active: false,
visible: true,
index: 4,
model: {
type: MenuItemType.TEXT,
text: 'Preguntas frecuentes',
} as TextMenuItemModel,
});

// Read the different Browse-By types from config and add them to the browse menu
this.browseService.getBrowseDefinitions()
.pipe(getFirstCompletedRemoteData<PaginatedList<BrowseDefinition>>())
.subscribe((browseDefListRD: RemoteData<PaginatedList<BrowseDefinition>>) => {
if (browseDefListRD.hasSucceeded) {
browseDefListRD.payload.page.forEach((browseDef: BrowseDefinition) => {
menuList.push({
id: `browse_global_by_${browseDef.id}`,
parentID: 'browse_global',
active: false,
visible: true,
model: {
type: MenuItemType.LINK,
text: `menu.section.browse_global_by_${browseDef.id}`,
link: `/browse/${browseDef.id}`,
} as LinkMenuItemModel,
});
});
menuList.push(
/* Browse */
{
id: 'browse_global',
active: false,
visible: true,
index: 1,
model: {
type: MenuItemType.TEXT,
text: 'menu.section.browse_global',
} as TextMenuItemModel,
},
);
}
// if (browseDefListRD.hasSucceeded) {
// browseDefListRD.payload.page.forEach((browseDef: BrowseDefinition) => {
// menuList.push({
// id: `browse_global_by_${browseDef.id}`,
// parentID: 'browse_global',
// active: false,
// visible: true,
// model: {
// type: MenuItemType.LINK,
// text: `menu.section.browse_global_by_${browseDef.id}`,
// link: `/browse/${browseDef.id}`,
// } as LinkMenuItemModel,
// });
// });
// menuList.push(
// /* Browse */
// {
// id: 'browse_global',
// active: false,
// visible: true,
// index: 4,
// model: {
// type: MenuItemType.TEXT,
// text: 'menu.section.browse_global',
// } as TextMenuItemModel,
// },
// );
// }
menuList.forEach((menuSection) => this.menuService.addSection(MenuID.PUBLIC, Object.assign(menuSection, {
shouldPersistOnRouteChange: true,
})));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
[attr.aria-controls]="expandableNavbarSectionId()"
class="d-flex flex-row flex-nowrap align-items-center gapx-1 ds-menu-toggler-wrapper"
[class.disabled]="section.model?.disabled">
<span class="flex-fill">
<span>
<ng-container
*ngComponentOutlet="(sectionMap$ | async).get(section.id).component; injector: (sectionMap$ | async).get(section.id).injector;"></ng-container>
</span>
Expand Down
39 changes: 38 additions & 1 deletion src/app/root/root.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,22 @@ import {
import {
Router,
RouterOutlet,
NavigationEnd,
} from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import {
BehaviorSubject,
combineLatest as combineLatestObservable,
Observable,
of,
Subscription,
} from 'rxjs';
import {
first,
map,
skipWhile,
startWith,
filter,
} from 'rxjs/operators';
import { INotificationBoardOptions } from 'src/config/notifications-config.interfaces';

Expand All @@ -40,7 +43,7 @@ import {
import { ThemedFooterComponent } from '../footer/themed-footer.component';
import { ThemedHeaderNavbarWrapperComponent } from '../header-nav-wrapper/themed-header-navbar-wrapper.component';
import { slideSidebarPadding } from '../shared/animations/slide';
import { HostWindowService } from '../shared/host-window.service';
import { HostWindowService, WidthCategory } from '../shared/host-window.service';
import { LiveRegionComponent } from '../shared/live-region/live-region.component';
import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component';
import { MenuService } from '../shared/menu/menu.service';
Expand Down Expand Up @@ -82,6 +85,12 @@ export class RootComponent implements OnInit {

browserOsClasses = new BehaviorSubject<string[]>([]);

isMobile$: Observable<boolean>;
maxMobileWidth = WidthCategory.SM;

public isHomePage$: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);
private routerSubscription: Subscription;

/**
* Whether or not to show a full screen loader
*/
Expand Down Expand Up @@ -135,6 +144,34 @@ export class RootComponent implements OnInit {
if (this.router.url === getPageInternalServerErrorRoute()) {
this.shouldShowRouteLoader = false;
}

this.isMobile$ = this.windowService.isUpTo(this.maxMobileWidth);

const currentUrl = this.router.url;
this.isHomePage$.next(this.isHomeUrl(currentUrl));

this.routerSubscription = this.router.events.pipe(
filter(event => event instanceof NavigationEnd),
map((event: NavigationEnd) => {
const isHome = this.isHomeUrl(event.urlAfterRedirects);
return isHome;
})
).subscribe(isHome => {
this.isHomePage$.next(isHome);
});
}

ngOnDestroy() {
// Importante: limpiar la suscripción para evitar pérdidas de memoria
if (this.routerSubscription) {
this.routerSubscription.unsubscribe();
}
}

private isHomeUrl(url: string): boolean {
return url === '/' ||
url === '/home' ||
url.startsWith('/home?');
}

skipToMainContent() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export class FileDownloadLinkComponent implements OnInit {
canDownload$: Observable<boolean>;

constructor(
private authorizationService: AuthorizationDataService,
protected authorizationService: AuthorizationDataService,
public dsoNameService: DSONameService,
) {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<ng-template #noInfo let-entry="entry">
<ul class="list-unstyled mb-0">
<li class="list-item text-truncate text-primary font-weight-bold">{{entry.value}}</li>
<li class="list-item text-truncate text-primary font-weight-bold">{{entry.display}}</li>
</ul>
</ng-template>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="simple-view-element" [class.d-none]="hideIfNoTextContent && content.textContent.trim().length === 0">
<h2 class="simple-view-element-header" *ngIf="label">{{ label }}</h2>
<div #content class="simple-view-element-body">
<div class="simple-view-element" [ngClass]="{'not-inline-label': !inlineLabel }" [class.d-none]="hideIfNoTextContent && content.textContent.trim().length === 0">
<h6 class="simple-view-element-header" *ngIf="label">{{ label }}</h6>
<div #content>
<ng-content></ng-content>
</div>
</div>
Loading
Loading