forked from 4Science/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request DSpace#2362 from Leano1998/making_user-menu-compon…
…ent_themeable Making user menu component themeable
- Loading branch information
Showing
9 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/app/shared/auth-nav-menu/user-menu/themed-user-menu.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import {Component, Input} from '@angular/core'; | ||
import {ThemedComponent} from '../../theme-support/themed.component'; | ||
import {UserMenuComponent} from './user-menu.component'; | ||
|
||
/** | ||
* This component represents the user nav menu. | ||
*/ | ||
@Component({ | ||
selector: 'ds-themed-user-menu', | ||
templateUrl: './../../theme-support/themed.component.html', | ||
styleUrls: [] | ||
}) | ||
export class ThemedUserMenuComponent extends ThemedComponent<UserMenuComponent>{ | ||
|
||
/** | ||
* The input flag to show user details in navbar expandable menu | ||
*/ | ||
@Input() inExpandableNavbar: boolean; | ||
|
||
protected inAndOutputNames: (keyof UserMenuComponent & keyof this)[] = ['inExpandableNavbar']; | ||
|
||
protected getComponentName(): string { | ||
return 'UserMenuComponent'; | ||
} | ||
|
||
protected importThemedComponent(themeName: string): Promise<any> { | ||
return import((`../../../../themes/${themeName}/app/shared/auth-nav-menu/user-menu/user-menu.component`)); | ||
} | ||
|
||
protected importUnthemedComponent(): Promise<any> { | ||
return import('./user-menu.component'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
15 changes: 15 additions & 0 deletions
15
src/themes/custom/app/shared/auth-nav-menu/user-menu/user-menu.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component } from '@angular/core'; | ||
import { UserMenuComponent as BaseComponent } from '../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component'; | ||
|
||
/** | ||
* Component representing the {@link UserMenuComponent} of a page | ||
*/ | ||
@Component({ | ||
selector: 'ds-user-menu', | ||
// templateUrl: 'user-menu.component.html', | ||
templateUrl: '../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component.html', | ||
// styleUrls: ['user-menu.component.scss'], | ||
styleUrls: ['../../../../../../app/shared/auth-nav-menu/user-menu/user-menu.component.scss'], | ||
}) | ||
export class UserMenuComponent extends BaseComponent { | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters