mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-09 02:54:13 +00:00
cherry-picked "[CST-12791] changed the route for suggestions to be be accessible to any logged in user" to CST-12109
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { URLCombiner } from '../../core/url-combiner/url-combiner';
|
||||
import { getNotificationsModuleRoute } from '../admin-routing-paths';
|
||||
|
||||
export const QUALITY_ASSURANCE_EDIT_PATH = 'quality-assurance';
|
||||
|
||||
export function getQualityAssuranceRoute(id: string) {
|
||||
return new URLCombiner(getNotificationsModuleRoute(), QUALITY_ASSURANCE_EDIT_PATH, id).toString();
|
||||
export function getQualityAssuranceEditRoute() {
|
||||
return `/${QUALITY_ASSURANCE_EDIT_PATH}`;
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import { URLCombiner } from '../core/url-combiner/url-combiner';
|
||||
import { getAdminModuleRoute } from '../app-routing-paths';
|
||||
import { getQualityAssuranceEditRoute } from './admin-notifications/admin-notifications-routing-paths';
|
||||
|
||||
export const REGISTRIES_MODULE_PATH = 'registries';
|
||||
export const NOTIFICATIONS_MODULE_PATH = 'notifications';
|
||||
@@ -11,3 +12,7 @@ export function getRegistriesModuleRoute() {
|
||||
export function getNotificationsModuleRoute() {
|
||||
return new URLCombiner(getAdminModuleRoute(), NOTIFICATIONS_MODULE_PATH).toString();
|
||||
}
|
||||
|
||||
export function getNotificatioQualityAssuranceRoute() {
|
||||
return new URLCombiner(`/${NOTIFICATIONS_MODULE_PATH}`, getQualityAssuranceEditRoute()).toString();
|
||||
}
|
||||
|
@@ -6,7 +6,7 @@ import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.reso
|
||||
import { AdminWorkflowPageComponent } from './admin-workflow-page/admin-workflow-page.component';
|
||||
import { I18nBreadcrumbsService } from '../core/breadcrumbs/i18n-breadcrumbs.service';
|
||||
import { AdminCurationTasksComponent } from './admin-curation-tasks/admin-curation-tasks.component';
|
||||
import { REGISTRIES_MODULE_PATH, NOTIFICATIONS_MODULE_PATH } from './admin-routing-paths';
|
||||
import { REGISTRIES_MODULE_PATH } from './admin-routing-paths';
|
||||
import { BatchImportPageComponent } from './admin-import-batch-page/batch-import-page.component';
|
||||
import {
|
||||
SiteAdministratorGuard
|
||||
@@ -15,11 +15,6 @@ import {
|
||||
@NgModule({
|
||||
imports: [
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: NOTIFICATIONS_MODULE_PATH,
|
||||
loadChildren: () => import('./admin-notifications/admin-notifications.module')
|
||||
.then((m) => m.AdminNotificationsModule),
|
||||
},
|
||||
{
|
||||
path: REGISTRIES_MODULE_PATH,
|
||||
loadChildren: () => import('./admin-registries/admin-registries.module')
|
||||
|
@@ -37,6 +37,7 @@ import {
|
||||
import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
||||
import { MenuResolver } from './menu.resolver';
|
||||
import { ThemedPageErrorComponent } from './page-error/themed-page-error.component';
|
||||
import { NOTIFICATIONS_MODULE_PATH } from './admin/admin-routing-paths';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@@ -153,6 +154,12 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone
|
||||
.then((m) => m.AdminModule),
|
||||
canActivate: [EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
path: NOTIFICATIONS_MODULE_PATH,
|
||||
loadChildren: () => import('./admin/admin-notifications/admin-notifications.module')
|
||||
.then((m) => m.AdminNotificationsModule),
|
||||
canActivate: [AuthenticatedGuard, EndUserAgreementCurrentUserGuard]
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
loadChildren: () => import('./login-page/login-page.module')
|
||||
|
@@ -8,6 +8,8 @@ import { QualityAssuranceSourceDataService } from '../../../core/notifications/q
|
||||
import { QualityAssuranceSourceObject } from '../../../core/notifications/qa/models/quality-assurance-source.model';
|
||||
import { map, tap } from 'rxjs/operators';
|
||||
import { RemoteData } from '../../../core/data/remote-data';
|
||||
import { getNotificatioQualityAssuranceRoute } from '../../../admin/admin-routing-paths';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-qa-event-notification',
|
||||
templateUrl: './qa-event-notification.component.html',
|
||||
@@ -50,4 +52,12 @@ export class QaEventNotificationComponent {
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quality assurance route.
|
||||
* @returns The quality assurance route.
|
||||
*/
|
||||
getQualityAssuranceRoute(): string {
|
||||
return getNotificatioQualityAssuranceRoute();
|
||||
}
|
||||
}
|
||||
|
@@ -556,7 +556,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.quality-assurance',
|
||||
link: '/admin/notifications/quality-assurance'
|
||||
link: '/notifications/quality-assurance'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
/* Admin Search */
|
||||
|
@@ -14,7 +14,7 @@
|
||||
{{ "mydspace.qa-event-notification.check.notification-info" | translate : { num: source.totalEvents } }}
|
||||
</div>
|
||||
<button
|
||||
[routerLink]="['/admin/notifications/quality-assurance', source.id]"
|
||||
[routerLink]="[getQualityAssuranceRoute(), source.id]"
|
||||
class="btn btn-primary align-self-center"
|
||||
>
|
||||
{{ "mydspace.qa-event-notification-info.check.button" | translate }}
|
||||
|
@@ -3,6 +3,8 @@ import { QualityAssuranceSourceDataService } from '../../core/notifications/qa/s
|
||||
import { getFirstCompletedRemoteData, getPaginatedListPayload, getRemoteDataPayload } from '../../core/shared/operators';
|
||||
import { Observable, of, tap } from 'rxjs';
|
||||
import { QualityAssuranceSourceObject } from 'src/app/core/notifications/qa/models/quality-assurance-source.model';
|
||||
import { getNotificatioQualityAssuranceRoute } from '../../admin/admin-routing-paths';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-my-dspace-qa-events-notifications',
|
||||
templateUrl: './my-dspace-qa-events-notifications.component.html',
|
||||
@@ -38,4 +40,11 @@ export class MyDspaceQaEventsNotificationsComponent implements OnInit {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the quality assurance route.
|
||||
* @returns The quality assurance route.
|
||||
*/
|
||||
getQualityAssuranceRoute(): string {
|
||||
return getNotificatioQualityAssuranceRoute();
|
||||
}
|
||||
}
|
||||
|
@@ -19,6 +19,7 @@ import { ItemDataService } from '../../../core/data/item-data.service';
|
||||
import { getFirstCompletedRemoteData, getRemoteDataPayload } from '../../../core/shared/operators';
|
||||
import { Item } from '../../../core/shared/item.model';
|
||||
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
|
||||
import { getNotificatioQualityAssuranceRoute } from '../../../admin/admin-routing-paths';
|
||||
|
||||
/**
|
||||
* Component to display the Quality Assurance topic list.
|
||||
@@ -192,6 +193,14 @@ export class QualityAssuranceTopicsComponent implements OnInit {
|
||||
return getItemPageRoute(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the quality assurance route.
|
||||
* @returns The quality assurance route.
|
||||
*/
|
||||
getQualityAssuranceRoute(): string {
|
||||
return getNotificatioQualityAssuranceRoute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsubscribe from all subscriptions.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user