Skip to content

Commit

Permalink
Adaptation des sources du thème calypso avec les nouvelles modificati…
Browse files Browse the repository at this point in the history
…ons de calypso-dspace-angular
  • Loading branch information
NataliaJabinschi committed Sep 4, 2024
1 parent a017fc3 commit c11d58d
Show file tree
Hide file tree
Showing 14 changed files with 366 additions and 682 deletions.
2 changes: 1 addition & 1 deletion src/app/app-routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const APP_ROUTES: Route[] = [
path: 'ai-search',
component: AiSearchComponent,
pathMatch: 'full',
canActivate: [EndUserAgreementCurrentUserGuard]
canActivate: [endUserAgreementCurrentUserGuard]
},
//fin add UdeM
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
</ds-comcol-page-logo>

<!-- Handle -->
<ds-themed-comcol-page-handle
<ds-comcol-page-handle
[content]="collection.handle"
[title]="'collection.page.handle'">
</ds-themed-comcol-page-handle>
</ds-comcol-page-handle>
<!-- Introductory text -->
<ds-comcol-page-content
[content]="collection.introductoryText"
Expand All @@ -40,10 +40,10 @@
<!-- Fin image vedette -->
<section class="comcol-page-browse-section">
<!-- Browse-By Links -->
<ds-themed-comcol-page-browse-by
<ds-comcol-page-browse-by
[id]="collection.id"
[contentType]="collection.type">
</ds-themed-comcol-page-browse-by>
</ds-comcol-page-browse-by>

<router-outlet></router-outlet>
</section>
Expand All @@ -58,8 +58,8 @@
</div>
<ds-error *ngIf="collectionRD?.hasFailed"
message="{{'error.collection' | translate}}"></ds-error>
<ds-themed-loading *ngIf="collectionRD?.isLoading"
message="{{'loading.collection' | translate}}"></ds-themed-loading>
<ds-loading *ngIf="collectionRD?.isLoading"
message="{{'loading.collection' | translate}}"></ds-loading>
</div>
</div>

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
fadeInOut,
} from '../../../../app/shared/animations/fade';
import { ThemedComcolPageBrowseByComponent } from '../../../../app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component';
import { ComcolPageContentComponent } from '../../../../app/shared/comcol/comcol-page-content/comcol-page-content.component';
import { ThemedComcolPageContentComponent } from '../../../../app/shared/comcol/comcol-page-content/themed-comcol-page-content.component';
import { ThemedComcolPageHandleComponent } from '../../../../app/shared/comcol/comcol-page-handle/themed-comcol-page-handle.component';
import { ComcolPageHeaderComponent } from '../../../../app/shared/comcol/comcol-page-header/comcol-page-header.component';
import { ComcolPageLogoComponent } from '../../../../app/shared/comcol/comcol-page-logo/comcol-page-logo.component';
Expand All @@ -41,7 +41,7 @@ import { VedetteCollListeComponent } from './vedette-coll-liste/vedette-coll-lis
],
standalone: true,
imports: [
ComcolPageContentComponent,
ThemedComcolPageContentComponent,
ErrorComponent,
NgIf,
RouterOutlet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ <h3 class="vedette-title outer"><span class="inner"> {{ images[0].title }} </spa
</div>
</div>
</div>
<ds-themed-loading *ngIf="!(images.length > 0)" message="Loading ..."></ds-themed-loading>
<ds-loading *ngIf="!(images.length > 0)" message="Loading ..."></ds-loading>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { DsoEditMetadataValueComponent } from '../../../../../app/dso-shared/dso
import { DsoEditMetadataValueHeadersComponent } from '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
import { MetadataFieldSelectorComponent } from '../../../../../app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component';
import { AlertComponent } from '../../../../../app/shared/alert/alert.component';
import { LoadingComponent } from '../../../../../app/shared/loading/loading.component';
import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component';

@Component({
selector: 'ds-dso-edit-metadata',
Expand All @@ -22,7 +22,7 @@ import { LoadingComponent } from '../../../../../app/shared/loading/loading.comp
// templateUrl: './dso-edit-metadata.component.html',
templateUrl: '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html',
standalone: true,
imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, LoadingComponent, AsyncPipe, TranslateModule],
imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
})
export class DsoEditMetadataComponent extends BaseComponent {
}
19 changes: 13 additions & 6 deletions src/themes/calypso/app/home-page/home-page.component.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
<ds-themed-home-news></ds-themed-home-news>
<ds-home-coar></ds-home-coar>
<ds-home-news></ds-home-news>
<ds-vedette-liste></ds-vedette-liste>
<div [ngClass]="appConfig.homePage.showDiscoverFilters ? 'container-fluid' : 'container'">
<div class="row m-5">
<div class="col-sm-3" *ngIf="appConfig.homePage.showDiscoverFilters">
<ds-configuration-search-page [sideBarWidth]="12" [showViewModes]="false" [searchEnabled]="false"
[inPlaceSearch]="false" [showScopeSelector]="false"></ds-configuration-search-page>
<ds-configuration-search-page *ngIf="showDiscoverFilters"
[sideBarWidth]="3"
[showViewModes]="false"
[searchEnabled]="false"
[inPlaceSearch]="false"
[showScopeSelector]="false">
<ng-container searchContentTop *ngTemplateOutlet="homeContent"></ng-container>
</ds-configuration-search-page>
</div>
<div [ngClass]="appConfig.homePage.showDiscoverFilters ? 'col-sm-9' : 'col-sm-12'">
<ng-container *ngIf="(site$ | async) as site">
<ds-view-tracker [object]="site"></ds-view-tracker>
</ng-container>
<ds-themed-search-form [inPlaceSearch]="false"
[searchPlaceholder]="'home.search-form.placeholder' | translate"></ds-themed-search-form>
<ds-themed-top-level-community-list></ds-themed-top-level-community-list>
<ds-search-form [inPlaceSearch]="false"
[searchPlaceholder]="'home.search-form.placeholder' | translate"></ds-search-form>
<ds-top-level-community-list></ds-top-level-community-list>
</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion src/themes/calypso/app/home-page/home-page.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import {
} from '@angular/common';
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';

import { HomeCoarComponent } from '../../../../app/home-page/home-coar/home-coar.component';
import { ThemedConfigurationSearchPageComponent } from '../../../../app/search-page/themed-configuration-search-page.component';
import { ThemedHomeNewsComponent } from '../../../../app/home-page/home-news/themed-home-news.component';
import { HomePageComponent as BaseComponent } from '../../../../app/home-page/home-page.component';
import { RecentItemListComponent } from '../../../../app/home-page/recent-item-list/recent-item-list.component';
Expand Down Expand Up @@ -34,6 +35,8 @@ import { VedetteListeComponent } from './vedette-liste/vedette-liste.component';
TranslateModule,
NgClass,
ConfigurationSearchPageComponent,
HomeCoarComponent,
ThemedConfigurationSearchPageComponent,
SuggestionsPopupComponent,
VedetteListeComponent],
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h5>{{ community._name }}</h5>
</ng-container>
</ng-container>
<ng-template #loadingContent>
<ds-themed-loading message="{{ 'loading.top-level-communities' | translate }}"></ds-themed-loading>
<ds-loading message="{{ 'loading.top-level-communities' | translate }}"></ds-loading>
</ng-template>
<ds-error *ngIf="communitiesRD?.hasFailed" message="{{ 'error.top-level-communities' | translate }}"></ds-error>
</ng-container>
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ <h3><a [routerLink]="['/items/', image.id]">{{ image.title }}</a></h3>
</div>
</ng-template>
</ngb-carousel>
<ds-themed-loading *ngIf="!(images.length > 0)" message="Loading carousel..."></ds-themed-loading>
<ds-loading *ngIf="!(images.length > 0)" message="Loading carousel..."></ds-loading>
</ng-container>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<ds-themed-results-back-button *ngIf="showBackButton$ | async" [back]="back"></ds-themed-results-back-button>
<ds-results-back-button *ngIf="showBackButton$ | async" [back]="back"></ds-results-back-button>
<div class="align-items-end">
<!-- Icon made by Pixel perfect from www.flaticon.com -->
<img src="/assets/calypso/images/ai.png" alt="Clip recherche Calypso" title="Rechercher avec CLIP " class="calypso-img-ia mt-2 float-right ml-1" (click)="openDialog(content)">
Expand All @@ -21,8 +21,8 @@ <h4 class="modal-title">{{'calypso.ai-titre' | translate}}</h4>
</ng-template>

<div class="d-flex flex-row mt-2">
<ds-themed-item-page-title-field [item]="object" class="mr-auto">
</ds-themed-item-page-title-field>
<ds-item-page-title-field [item]="object" class="mr-auto">
</ds-item-page-title-field>
<div class="align-content-end">
<ds-dso-edit-menu></ds-dso-edit-menu>
</div>
Expand Down Expand Up @@ -100,20 +100,20 @@ <h4 class="modal-title">{{'calypso.ai-titre' | translate}}</h4>
<div class="col-xs-12 col-md-4">
<ng-container *ngIf="!(mediaViewer.image || mediaViewer.video)">
<ds-metadata-field-wrapper [hideIfNoTextContent]="false">
<ds-themed-thumbnail [thumbnail]="object?.thumbnail | async"></ds-themed-thumbnail>
<ds-thumbnail [thumbnail]="object?.thumbnail | async"></ds-thumbnail>
</ds-metadata-field-wrapper>
</ng-container>
<div *ngIf="mediaViewer.image || mediaViewer.video" class="mb-2">
<ds-themed-media-viewer [item]="object"></ds-themed-media-viewer>
<ds-media-viewer [item]="object"></ds-media-viewer>
</div>
<ds-themed-item-page-file-section [item]="object"></ds-themed-item-page-file-section>
<ds-item-page-file-section [item]="object"></ds-item-page-file-section>
<ds-item-page-date-field [item]="object"></ds-item-page-date-field>
<ds-themed-metadata-representation-list class="ds-item-page-mixed-author-field"
<ds-metadata-representation-list class="ds-item-page-mixed-author-field"
[parentItem]="object"
[itemType]="'Person'"
[metadataFields]="['dc.contributor.author', 'dc.creator']"
[label]="'relationships.isAuthorOf' | translate">
</ds-themed-metadata-representation-list>
</ds-metadata-representation-list>
<ds-generic-item-page-field [item]="object"
[fields]="['journal.title']"
[label]="'item.page.journal-title'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h1 *ngIf="displayTitle">{{title | translate}}</h1>
</ds-starts-with-loader>
<div *ngIf="objects?.hasSucceeded && !objects?.isLoading && objects?.payload?.page.length > 0" @fadeIn>
<div *ngIf="shouldDisplayResetButton$ |async" class="mb-2 reset">
<ds-themed-results-back-button [back]="back" [buttonLabel]="buttonLabel"></ds-themed-results-back-button>
<ds-results-back-button [back]="back" [buttonLabel]="buttonLabel"></ds-results-back-button>
</div>
<!-- Bouton permettant de basculer entre les modes d'affichage en liste et en mosaïque. -->
<div class="mt-10 mb-10">
Expand All @@ -20,11 +20,11 @@ <h1 *ngIf="displayTitle">{{title | translate}}</h1>
(next)="goNext()">
</ds-viewable-collection>
</div>
<ds-themed-loading *ngIf="!objects || objects?.isLoading" message="{{'loading.browse-by' | translate}}"></ds-themed-loading>
<ds-loading *ngIf="!objects || objects?.isLoading" message="{{'loading.browse-by' | translate}}"></ds-loading>
<ds-error *ngIf="objects?.hasFailed" message="{{'error.browse-by' | translate}}"></ds-error>
<div *ngIf="!objects?.isLoading && objects?.payload?.page.length === 0">
<div *ngIf="shouldDisplayResetButton$ |async" class="d-inline-block mb-4 reset">
<ds-themed-results-back-button [back]="back" [buttonLabel]="buttonLabel"></ds-themed-results-back-button>
<ds-results-back-button [back]="back" [buttonLabel]="buttonLabel"></ds-results-back-button>
</div>
<div class="alert alert-info w-100" role="alert">
{{'browse.empty' | translate}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2 *ngIf="!disableHeader">{{ (configuration ? configuration + '.search.results.
(selectObject)="selectObject.emit($event)">
</ds-viewable-collection>
</div>
<ds-themed-loading *ngIf="isLoading()" message="{{'loading.search-results' | translate}}"></ds-themed-loading>
<ds-loading *ngIf="isLoading()" message="{{'loading.search-results' | translate}}"></ds-loading>
<ds-error *ngIf="showError()"
message="{{errorMessageLabel() | translate}}"></ds-error>
<div *ngIf="searchResults?.payload?.page.length === 0 || searchResults?.statusCode === 400">
Expand Down
4 changes: 0 additions & 4 deletions src/themes/calypso/lazy-theme.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import { CommonModule } from '@angular/common';
import { DragDropModule } from '@angular/cdk/drag-drop';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { IdlePreloadModule } from 'angular-idle-preload';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
import { StoreModule } from '@ngrx/store';
import { StoreRouterConnectingModule } from '@ngrx/router-store';
import { TranslateModule } from '@ngx-translate/core';
import { AppModule } from '../../app/app.module';
import {RouterModule} from '@angular/router';
import { RootModule } from '../../app/root.module';
import { HomePageComponent } from './app/home-page/home-page.component';
Expand Down Expand Up @@ -45,13 +43,11 @@ const DECLARATIONS = [

@NgModule({
imports: [
AppModule,
RootModule,
CommonModule,
DragDropModule,
FormsModule,
HttpClientModule,
IdlePreloadModule,
NgbModule,
RouterModule,
ScrollToModule,
Expand Down
Loading

0 comments on commit c11d58d

Please sign in to comment.