Skip to content

Commit 5418726

Browse files
author
Andrea Barbasso
committed
[DSC-1906] add link to processes page in user menu
1 parent ca756bc commit 5418726

5 files changed

Lines changed: 19 additions & 1 deletion

File tree

src/app/shared/auth-nav-menu/user-menu/user-menu.component.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
</span>
77
<a [ngClass]="inExpandableNavbar ? 'nav-item nav-link' : 'dropdown-item'" [routerLink]="[profileRoute]" routerLinkActive="active">{{'nav.profile' | translate}}</a>
88
<a [ngClass]="inExpandableNavbar ? 'nav-item nav-link' : 'dropdown-item'" [routerLink]="[mydspaceRoute]" routerLinkActive="active">{{'nav.mydspace' | translate}}</a>
9+
<a [ngClass]="inExpandableNavbar ? 'nav-item nav-link' : 'dropdown-item'"
10+
data-test="processes-link" [routerLink]="[processesRoute]" routerLinkActive="active">{{'nav.processes' | translate}}</a>
911
<a [ngClass]="inExpandableNavbar ? 'nav-item nav-link' : 'dropdown-item'" [routerLink]="[subscriptionsRoute]" routerLinkActive="active">{{'nav.subscriptions' | translate}}</a>
1012

1113
<div class="dropdown-divider"></div>

src/app/shared/auth-nav-menu/user-menu/user-menu.component.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,11 @@ describe('UserMenuComponent', () => {
170170
expect(span.nativeElement.innerHTML).toContain(email);
171171
});
172172

173+
it('should display the My Processes link', () => {
174+
const link = deUserMenu.query(By.css('a[data-test="my-processes-link"]'));
175+
expect(link).toBeDefined();
176+
});
177+
173178
it('should create logout component', () => {
174179
const components = fixture.debugElement.query(By.css('[data-test="log-out-component"]'));
175180
expect(components).toBeTruthy();

src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { MYDSPACE_ROUTE } from '../../../my-dspace-page/my-dspace-page.component
1010
import { AuthService } from '../../../core/auth/auth.service';
1111
import { getProfileModuleRoute, getSubscriptionsModuleRoute } from '../../../app-routing-paths';
1212
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
13+
import { getProcessListRoute } from '../../../process-page/process-page-routing.paths';
1314

1415
/**
1516
* This component represents the user nav menu.
@@ -49,6 +50,11 @@ export class UserMenuComponent implements OnInit {
4950
*/
5051
public profileRoute = getProfileModuleRoute();
5152

53+
/**
54+
* The processes page route
55+
*/
56+
public processesRoute = getProcessListRoute();
57+
5258
/**
5359
* The profile page route
5460
*/

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4163,6 +4163,8 @@
41634163

41644164
"nav.mydspace": "MyDSpace",
41654165

4166+
"nav.processes": "My Processes",
4167+
41664168
"nav.profile": "Profile",
41674169

41684170
"nav.search": "Search",

src/assets/i18n/it.json5

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6550,6 +6550,9 @@
65506550
// "nav.mydspace": "MyDSpace",
65516551
"nav.mydspace": "MyDSpace",
65526552

6553+
// "nav.processes": "My Processes",
6554+
"nav.processes": "I miei processi",
6555+
65536556
// "nav.profile": "Profile",
65546557
"nav.profile": "Profilo",
65556558

@@ -12462,4 +12465,4 @@
1246212465

1246312466

1246412467

12465-
}
12468+
}

0 commit comments

Comments
 (0)