mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merged in CST-13289-notify-ui-improvements (pull request #1222)
CST-13289 notify ui improvements Approved-by: Stefano Maffei
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<div class="d-flex justify-content-end">
|
<div class="d-flex justify-content-end">
|
||||||
<button class="btn-primary" (click)="toggleCoarMessage()">
|
<button class="btn-primary" (click)="toggleCoarMessage()">
|
||||||
{{'notify-message-modal.show-more' | translate}}
|
{{'notify-message-modal.show-message' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@@ -1,14 +1,14 @@
|
|||||||
<div class="container my-4">
|
<div class="container my-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-md-3 text-left h4">{{'admin.notify.dashboard.outbound' | translate}}</div>
|
<div class="col-12 col-md-3 text-left h4">{{((isInbound$ | async) ? 'admin.notify.dashboard.inbound' : 'admin.notify.dashboard.outbound') | translate}}</div>
|
||||||
<div class="col-md-9">
|
<div class="col-md-9">
|
||||||
<ds-search-labels [inPlaceSearch]="true"></ds-search-labels>
|
|
||||||
<div class="h4">
|
<div class="h4">
|
||||||
<button (click)="resetDefaultConfiguration()" *ngIf="(selectedSearchConfig$ | async) !== defaultConfiguration" class="badge badge-primary mr-1 mb-1">
|
<button (click)="resetDefaultConfiguration()" *ngIf="(selectedSearchConfig$ | async) !== defaultConfiguration" class="badge badge-primary mr-1 mb-1">
|
||||||
{{'admin.notify.dashboard.configuration' | translate}} {{ selectedSearchConfig$ | async }}
|
{{'admin.notify.dashboard.filter' | translate}} {{ 'admin-notify-dashboard.' + (selectedSearchConfig$ | async) | translate}}
|
||||||
<span> ×</span>
|
<span> ×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
<ds-search-labels [inPlaceSearch]="true"></ds-search-labels>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,6 +5,7 @@ import { SearchConfigurationService } from '../../../../core/shared/search/searc
|
|||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
import { ActivatedRoute, ActivatedRouteSnapshot, Router } from '@angular/router';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-admin-notify-logs-result',
|
selector: 'ds-admin-notify-logs-result',
|
||||||
@@ -22,6 +23,7 @@ export class AdminNotifyLogsResultComponent implements OnInit{
|
|||||||
defaultConfiguration: string;
|
defaultConfiguration: string;
|
||||||
|
|
||||||
public selectedSearchConfig$: Observable<string>;
|
public selectedSearchConfig$: Observable<string>;
|
||||||
|
public isInbound$: Observable<boolean>;
|
||||||
|
|
||||||
protected readonly context = Context.CoarNotify;
|
protected readonly context = Context.CoarNotify;
|
||||||
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
|
constructor(@Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService,
|
||||||
@@ -36,6 +38,9 @@ export class AdminNotifyLogsResultComponent implements OnInit{
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.selectedSearchConfig$ = this.searchConfigService.getCurrentConfiguration(this.defaultConfiguration);
|
this.selectedSearchConfig$ = this.searchConfigService.getCurrentConfiguration(this.defaultConfiguration);
|
||||||
|
this.isInbound$ = this.selectedSearchConfig$.pipe(
|
||||||
|
map(config => config.startsWith('NOTIFY.incoming'))
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public resetDefaultConfiguration() {
|
public resetDefaultConfiguration() {
|
||||||
|
@@ -13,13 +13,16 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr *ngFor="let message of (messagesSubject$ | async)">
|
<tr *ngFor="let message of (messagesSubject$ | async)">
|
||||||
<td class="text-nowrap">
|
<td class="text-nowrap">
|
||||||
<div>{{ message.queueLastStartTime | date:"YYYY/MM/d hh:mm:ss" }}</div>
|
<div *ngIf="message.queueLastStartTime">{{ message.queueLastStartTime | date:"YYYY/MM/d hh:mm:ss" }}</div>
|
||||||
|
<div *ngIf="!message.queueLastStartTime">n/a</div>
|
||||||
|
</td>
|
||||||
|
<td class="cell-small text-truncate">
|
||||||
|
<a *ngIf="message.relatedItem" [routerLink]="'/items/' + (isInbound ? message.context : message.object)">{{ message.relatedItem }}</a>
|
||||||
|
<div *ngIf="!message.relatedItem">n/a</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a [routerLink]="'/items/' + (isInbound ? message.context : message.object)">{{ message.relatedItem }}</a>
|
<div *ngIf="message.ldnService">{{ message.ldnService }}</div>
|
||||||
</td>
|
<div *ngIf="!message.ldnService">n/a</div>
|
||||||
<td>
|
|
||||||
<div>{{ message.ldnService }}</div>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>{{ message.activityStreamType }}</div>
|
<div>{{ message.activityStreamType }}</div>
|
||||||
|
@@ -0,0 +1,9 @@
|
|||||||
|
.cell-small {
|
||||||
|
max-width: 180px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-responsive {
|
||||||
|
td, th {
|
||||||
|
padding: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
@@ -22,6 +22,7 @@ import { DatePipe } from '@angular/common';
|
|||||||
@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,
|
||||||
|
@@ -171,7 +171,8 @@ export class MenuResolver implements Resolve<boolean> {
|
|||||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
||||||
this.authorizationService.isAuthorized(FeatureID.CanSubmit),
|
this.authorizationService.isAuthorized(FeatureID.CanSubmit),
|
||||||
this.authorizationService.isAuthorized(FeatureID.CanEditItem),
|
this.authorizationService.isAuthorized(FeatureID.CanEditItem),
|
||||||
]).subscribe(([isCollectionAdmin, isCommunityAdmin, isSiteAdmin, canSubmit, canEditItem]) => {
|
this.authorizationService.isAuthorized(FeatureID.CanSeeQA)
|
||||||
|
]).subscribe(([isCollectionAdmin, isCommunityAdmin, isSiteAdmin, canSubmit, canEditItem, canSeeQA]) => {
|
||||||
const newSubMenuList = [
|
const newSubMenuList = [
|
||||||
{
|
{
|
||||||
id: 'new_community',
|
id: 'new_community',
|
||||||
@@ -300,12 +301,50 @@ export class MenuResolver implements Resolve<boolean> {
|
|||||||
icon: 'pencil-alt',
|
icon: 'pencil-alt',
|
||||||
index: 1
|
index: 1
|
||||||
};
|
};
|
||||||
|
const notificationSubMenuList = [
|
||||||
|
/* Notifications */
|
||||||
|
{
|
||||||
|
id: 'notifications',
|
||||||
|
active: false,
|
||||||
|
visible: true,
|
||||||
|
model: {
|
||||||
|
type: MenuItemType.TEXT,
|
||||||
|
text: 'menu.section.notifications'
|
||||||
|
} as TextMenuItemModel,
|
||||||
|
icon: 'bell',
|
||||||
|
index: 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'notifications_quality-assurance',
|
||||||
|
parentID: 'notifications',
|
||||||
|
active: false,
|
||||||
|
visible: canSeeQA,
|
||||||
|
model: {
|
||||||
|
type: MenuItemType.LINK,
|
||||||
|
text: 'menu.section.quality-assurance',
|
||||||
|
link: '/notifications/quality-assurance'
|
||||||
|
} as LinkMenuItemModel,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'notifications_reciter',
|
||||||
|
parentID: 'notifications',
|
||||||
|
active: false,
|
||||||
|
visible: true,
|
||||||
|
model: {
|
||||||
|
type: MenuItemType.LINK,
|
||||||
|
text: 'menu.section.notifications_reciter',
|
||||||
|
link: '/notifications/' + NOTIFICATIONS_RECITER_SUGGESTION_PATH
|
||||||
|
} as LinkMenuItemModel,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
const menuList = [
|
const menuList = [
|
||||||
...newSubMenuList,
|
...newSubMenuList,
|
||||||
newSubMenu,
|
newSubMenu,
|
||||||
...editSubMenuList,
|
...editSubMenuList,
|
||||||
editSubMenu,
|
editSubMenu,
|
||||||
|
...notificationSubMenuList,
|
||||||
|
|
||||||
// TODO: enable this menu item once the feature has been implemented
|
// TODO: enable this menu item once the feature has been implemented
|
||||||
// {
|
// {
|
||||||
// id: 'new_item_version',
|
// id: 'new_item_version',
|
||||||
@@ -543,46 +582,9 @@ export class MenuResolver implements Resolve<boolean> {
|
|||||||
* Create menu sections dependent on whether or not the current user is a site administrator
|
* Create menu sections dependent on whether or not the current user is a site administrator
|
||||||
*/
|
*/
|
||||||
createSiteAdministratorMenuSections() {
|
createSiteAdministratorMenuSections() {
|
||||||
combineLatest([
|
this.authorizationService.isAuthorized(FeatureID.AdministratorOf)
|
||||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
.subscribe((authorized) => {
|
||||||
this.authorizationService.isAuthorized(FeatureID.CanSeeQA)
|
|
||||||
])
|
|
||||||
.subscribe(([authorized, canSeeQA]) => {
|
|
||||||
const menuList = [
|
const menuList = [
|
||||||
/* Notifications */
|
|
||||||
{
|
|
||||||
id: 'notifications',
|
|
||||||
active: false,
|
|
||||||
visible: authorized && canSeeQA,
|
|
||||||
model: {
|
|
||||||
type: MenuItemType.TEXT,
|
|
||||||
text: 'menu.section.notifications'
|
|
||||||
} as TextMenuItemModel,
|
|
||||||
icon: 'bell',
|
|
||||||
index: 4
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'notifications_quality-assurance',
|
|
||||||
parentID: 'notifications',
|
|
||||||
active: false,
|
|
||||||
visible: authorized,
|
|
||||||
model: {
|
|
||||||
type: MenuItemType.LINK,
|
|
||||||
text: 'menu.section.quality-assurance',
|
|
||||||
link: '/notifications/quality-assurance'
|
|
||||||
} as LinkMenuItemModel,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'notifications_reciter',
|
|
||||||
parentID: 'notifications',
|
|
||||||
active: false,
|
|
||||||
visible: authorized,
|
|
||||||
model: {
|
|
||||||
type: MenuItemType.LINK,
|
|
||||||
text: 'menu.section.notifications_reciter',
|
|
||||||
link: '/notifications/' + NOTIFICATIONS_RECITER_SUGGESTION_PATH
|
|
||||||
} as LinkMenuItemModel,
|
|
||||||
},
|
|
||||||
/* Admin Search */
|
/* Admin Search */
|
||||||
{
|
{
|
||||||
id: 'admin_search',
|
id: 'admin_search',
|
||||||
|
@@ -136,7 +136,6 @@ export class SuggestionTargetsComponent implements OnInit {
|
|||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
take(1)
|
take(1)
|
||||||
).subscribe((options: PaginationComponentOptions) => {
|
).subscribe((options: PaginationComponentOptions) => {
|
||||||
console.log('HELLO suggestion called!', options);
|
|
||||||
this.suggestionTargetsStateService.dispatchRetrieveReciterSuggestionTargets(
|
this.suggestionTargetsStateService.dispatchRetrieveReciterSuggestionTargets(
|
||||||
this.source,
|
this.source,
|
||||||
options.pageSize,
|
options.pageSize,
|
||||||
|
@@ -3471,21 +3471,25 @@
|
|||||||
|
|
||||||
"admin-notify-dashboard.generated-ldn": "Number of generated LDN",
|
"admin-notify-dashboard.generated-ldn": "Number of generated LDN",
|
||||||
|
|
||||||
"admin-notify-dashboard.accepted": "Accepted",
|
"admin-notify-dashboard.NOTIFY.incoming.accepted": "Accepted",
|
||||||
|
|
||||||
"admin-notify-dashboard.processed": "Processed LDN",
|
"admin-notify-dashboard.NOTIFY.incoming.processed": "Processed LDN",
|
||||||
|
|
||||||
"admin-notify-dashboard.failure": "Failure",
|
"admin-notify-dashboard.NOTIFY.incoming.failure": "Failure",
|
||||||
|
|
||||||
"admin-notify-dashboard.untrusted": "Untrusted",
|
"admin-notify-dashboard.NOTIFY.outgoing.failure": "Failure",
|
||||||
|
|
||||||
"admin-notify-dashboard.delivered": "Delivered",
|
"admin-notify-dashboard.NOTIFY.incoming.untrusted": "Untrusted",
|
||||||
|
|
||||||
"admin-notify-dashboard.queued": "Queued",
|
"admin-notify-dashboard.NOTIFY.outgoing.delivered": "Delivered",
|
||||||
|
|
||||||
"admin-notify-dashboard.queued-for-retry": "Queued for retry",
|
"admin-notify-dashboard.NOTIFY.outgoing.queued": "Queued",
|
||||||
|
|
||||||
"admin-notify-dashboard.involved-items": "Involved items",
|
"admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry": "Queued for retry",
|
||||||
|
|
||||||
|
"admin-notify-dashboard.NOTIFY.incoming.involvedItems": "Involved items",
|
||||||
|
|
||||||
|
"admin-notify-dashboard.NOTIFY.outgoing.involvedItems": "Involved items",
|
||||||
|
|
||||||
"admin.notify.dashboard.breadcrumbs": "Dashboard",
|
"admin.notify.dashboard.breadcrumbs": "Dashboard",
|
||||||
|
|
||||||
@@ -3493,7 +3497,7 @@
|
|||||||
|
|
||||||
"admin.notify.dashboard.inbound-logs": "Logs/Inbound",
|
"admin.notify.dashboard.inbound-logs": "Logs/Inbound",
|
||||||
|
|
||||||
"admin.notify.dashboard.configuration": "Configuration: ",
|
"admin.notify.dashboard.filter": "Filter: ",
|
||||||
|
|
||||||
"search.filters.applied.f.relateditem": "Related items",
|
"search.filters.applied.f.relateditem": "Related items",
|
||||||
|
|
||||||
@@ -3673,7 +3677,7 @@
|
|||||||
|
|
||||||
"notify-message-modal.title": "Message Detail",
|
"notify-message-modal.title": "Message Detail",
|
||||||
|
|
||||||
"notify-message-modal.show-more": "Show more",
|
"notify-message-modal.show-message": "Show message",
|
||||||
|
|
||||||
"notify-message-result.timestamp": "Timestamp",
|
"notify-message-result.timestamp": "Timestamp",
|
||||||
|
|
||||||
|
@@ -461,27 +461,27 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
boxes: [
|
boxes: [
|
||||||
{
|
{
|
||||||
color: '#B8DAFF',
|
color: '#B8DAFF',
|
||||||
title: 'admin-notify-dashboard.accepted',
|
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted',
|
||||||
config: 'NOTIFY.incoming.accepted'
|
config: 'NOTIFY.incoming.accepted'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#D4EDDA',
|
color: '#D4EDDA',
|
||||||
title: 'admin-notify-dashboard.processed',
|
title: 'admin-notify-dashboard.NOTIFY.incoming.processed',
|
||||||
config: 'NOTIFY.incoming.processed'
|
config: 'NOTIFY.incoming.processed'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#FDBBC7',
|
color: '#FDBBC7',
|
||||||
title: 'admin-notify-dashboard.failure',
|
title: 'admin-notify-dashboard.NOTIFY.incoming.failure',
|
||||||
config: 'NOTIFY.incoming.failure'
|
config: 'NOTIFY.incoming.failure'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#FDBBC7',
|
color: '#FDBBC7',
|
||||||
title: 'admin-notify-dashboard.untrusted',
|
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted',
|
||||||
config: 'NOTIFY.incoming.untrusted'
|
config: 'NOTIFY.incoming.untrusted'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#43515F',
|
color: '#43515F',
|
||||||
title: 'admin-notify-dashboard.involved-items',
|
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems',
|
||||||
textColor: '#fff',
|
textColor: '#fff',
|
||||||
config: 'NOTIFY.incoming.involvedItems',
|
config: 'NOTIFY.incoming.involvedItems',
|
||||||
},
|
},
|
||||||
@@ -492,27 +492,27 @@ export class DefaultAppConfig implements AppConfig {
|
|||||||
boxes: [
|
boxes: [
|
||||||
{
|
{
|
||||||
color: '#D4EDDA',
|
color: '#D4EDDA',
|
||||||
title: 'admin-notify-dashboard.delivered',
|
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered',
|
||||||
config: 'NOTIFY.outgoing.delivered'
|
config: 'NOTIFY.outgoing.delivered'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#B8DAFF',
|
color: '#B8DAFF',
|
||||||
title: 'admin-notify-dashboard.queued',
|
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued',
|
||||||
config: 'NOTIFY.outgoing.queued'
|
config: 'NOTIFY.outgoing.queued'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#FDEEBB',
|
color: '#FDEEBB',
|
||||||
title: 'admin-notify-dashboard.queued-for-retry',
|
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry',
|
||||||
config: 'NOTIFY.outgoing.queued_for_retry'
|
config: 'NOTIFY.outgoing.queued_for_retry'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#FDBBC7',
|
color: '#FDBBC7',
|
||||||
title: 'admin-notify-dashboard.failure',
|
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure',
|
||||||
config: 'NOTIFY.outgoing.failure'
|
config: 'NOTIFY.outgoing.failure'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
color: '#43515F',
|
color: '#43515F',
|
||||||
title: 'admin-notify-dashboard.involved-items',
|
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems',
|
||||||
textColor: '#fff',
|
textColor: '#fff',
|
||||||
config: 'NOTIFY.outgoing.involvedItems',
|
config: 'NOTIFY.outgoing.involvedItems',
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user