This commit is contained in:
FrancescoMolinaro
2024-01-09 09:36:50 +01:00
parent 7ce0bd0ce6
commit 728911899a
17 changed files with 6 additions and 32 deletions

View File

@@ -16,7 +16,6 @@ import { SearchConfigurationService } from '../../core/shared/search/search-conf
@Component({ @Component({
selector: 'ds-admin-notify-dashboard', selector: 'ds-admin-notify-dashboard',
templateUrl: './admin-notify-dashboard.component.html', templateUrl: './admin-notify-dashboard.component.html',
styleUrls: ['./admin-notify-dashboard.component.scss'],
providers: [ providers: [
{ {
provide: SEARCH_CONFIG_SERVICE, provide: SEARCH_CONFIG_SERVICE,
@@ -33,6 +32,7 @@ export class AdminNotifyDashboardComponent implements OnInit{
id: 'single-result-options', id: 'single-result-options',
pageSize: 1 pageSize: 1
}); });
constructor(private searchService: SearchService) { constructor(private searchService: SearchService) {
} }
@@ -84,25 +84,8 @@ export class AdminNotifyDashboardComponent implements OnInit{
return this.metricsConfig.map(row => { return this.metricsConfig.map(row => {
return { return {
...row, ...row,
boxes: row.boxes.map(rowBox =>boxesWithCount.find(boxWithCount => boxWithCount.config === rowBox.config)) boxes: row.boxes.map(rowBox => boxesWithCount.find(boxWithCount => boxWithCount.config === rowBox.config))
}; };
}); });
} }
/**
* @returns {string} The base path to the search page, or the current page when inPlaceSearch is true
*/
public getSearchLink(): string {
return this.searchService.getSearchLink();
}
/**
* @returns {string[]} The base path to the search page, or the current page when inPlaceSearch is true, split in separate pieces
*/
public getSearchLinkParts(): string[] {
if (this.searchService) {
return [];
}
return this.getSearchLink().split('/');
}
} }

View File

@@ -4,11 +4,11 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</div> </div>
<div class="container p-4"> <div class="modal-body p-4">
<div *ngFor="let key of notifyMessageKeys"> <div *ngFor="let key of notifyMessageKeys">
<div class="row mb-4"> <div class="row mb-4">
<div class="font-weight-bold col-sm">{{ key + '.notify-detail-modal' | translate}}</div> <div class="font-weight-bold col-sm">{{ key + '.notify-detail-modal' | translate}}</div>
<div class="text-nowrap col-sm text-right">{{ notifyMessage[key] | translate }}</div> <div class="text-truncate col-sm text-right">{{ notifyMessage[key] | translate }}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -5,7 +5,6 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
@Component({ @Component({
selector: 'ds-admin-notify-detail-modal', selector: 'ds-admin-notify-detail-modal',
templateUrl: './admin-notify-detail-modal.component.html', templateUrl: './admin-notify-detail-modal.component.html',
styleUrls: ['./admin-notify-detail-modal.component.scss']
}) })
export class AdminNotifyDetailModalComponent { export class AdminNotifyDetailModalComponent {
@Input() notifyMessage: AdminNotifyMessage; @Input() notifyMessage: AdminNotifyMessage;

View File

@@ -7,7 +7,6 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc
@Component({ @Component({
selector: 'ds-admin-notify-incoming', selector: 'ds-admin-notify-incoming',
templateUrl: './admin-notify-incoming.component.html', templateUrl: './admin-notify-incoming.component.html',
styleUrls: ['./admin-notify-incoming.component.scss'],
providers: [ providers: [
{ {
provide: SEARCH_CONFIG_SERVICE, provide: SEARCH_CONFIG_SERVICE,

View File

@@ -7,7 +7,6 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc
@Component({ @Component({
selector: 'ds-admin-notify-outgoing', selector: 'ds-admin-notify-outgoing',
templateUrl: './admin-notify-outgoing.component.html', templateUrl: './admin-notify-outgoing.component.html',
styleUrls: ['./admin-notify-outgoing.component.scss'],
providers: [ providers: [
{ {
provide: SEARCH_CONFIG_SERVICE, provide: SEARCH_CONFIG_SERVICE,

View File

@@ -4,7 +4,6 @@ import { AdminNotifyMetricsRow } from './admin-notify-metrics.model';
@Component({ @Component({
selector: 'ds-admin-notify-metrics', selector: 'ds-admin-notify-metrics',
templateUrl: './admin-notify-metrics.component.html', templateUrl: './admin-notify-metrics.component.html',
styleUrls: ['./admin-notify-metrics.component.scss']
}) })
export class AdminNotifyMetricsComponent { export class AdminNotifyMetricsComponent {

View File

@@ -21,7 +21,6 @@ import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-page.co
@Component({ @Component({
selector: 'ds-admin-notify-search-result', selector: 'ds-admin-notify-search-result',
templateUrl: './admin-notify-search-result.component.html', templateUrl: './admin-notify-search-result.component.html',
styleUrls: ['./admin-notify-search-result.component.scss'],
providers: [ providers: [
{ {
provide: SEARCH_CONFIG_SERVICE, provide: SEARCH_CONFIG_SERVICE,

View File

@@ -71,7 +71,7 @@ export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNot
) : of(message), ) : of(message),
), ),
mergeMap(message => mergeMap(message =>
message.context ? this.itemDataService.findById(message.context.toString()).pipe( message.context ? this.itemDataService.findById(message.context).pipe(
getAllSucceededRemoteDataPayload(), getAllSucceededRemoteDataPayload(),
map(detail => ({...message, context: detail.name})) map(detail => ({...message, context: detail.name}))
) : of(message), ) : of(message),

View File

@@ -27,7 +27,6 @@ import { getTabulatableObjectsComponent } from './tabulatable-objects.decorator'
@Component({ @Component({
selector: 'ds-tabulatable-objects-loader', selector: 'ds-tabulatable-objects-loader',
templateUrl: './tabulatable-objects-loader.component.html', templateUrl: './tabulatable-objects-loader.component.html',
styleUrls: ['./tabulatable-objects-loader.component.scss']
}) })
/** /**
* Component for determining what component to use depending on the item's entity type (dspace.entity.type) * Component for determining what component to use depending on the item's entity type (dspace.entity.type)

View File

@@ -22,7 +22,7 @@
</div> </div>
<div id="search-content" class="col-12"> <div id="search-content" class="col-12">
<div class="d-block d-md-none search-controls clearfix"> <div class="d-block d-md-none search-controls clearfix">
<ds-view-mode-switch [viewModeList]="viewModeList" [inPlaceSearch]="inPlaceSearch"></ds-view-mode-switch> <ds-view-mode-switch *ngIf="showViewModes" [viewModeList]="viewModeList" [inPlaceSearch]="inPlaceSearch"></ds-view-mode-switch>
<button (click)="openSidebar()" aria-controls="#search-body" <button (click)="openSidebar()" aria-controls="#search-body"
class="btn btn-outline-primary float-right open-sidebar"><i class="btn btn-outline-primary float-right open-sidebar"><i
class="fas fa-sliders"></i> {{"search.sidebar.open" class="fas fa-sliders"></i> {{"search.sidebar.open"