mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge remote-tracking branch 'templates/w2p-86526_Add-themeable-components_contribute-7.2' into w2p-91272_Add-themed-components-to-upstream-branch
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<nav role="navigation" [attr.aria-label]="'nav.user.description' | translate" class="navbar navbar-light navbar-expand-md flex-shrink-0 px-0">
|
||||
<ds-search-navbar></ds-search-navbar>
|
||||
<ds-lang-switch></ds-lang-switch>
|
||||
<ds-auth-nav-menu></ds-auth-nav-menu>
|
||||
<ds-themed-auth-nav-menu></ds-themed-auth-nav-menu>
|
||||
<ds-impersonate-navbar></ds-impersonate-navbar>
|
||||
<div class="pl-2">
|
||||
<button class="navbar-toggler" type="button" (click)="toggleNavbar()"
|
||||
|
@@ -0,0 +1,25 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { ThemedComponent } from '../theme-support/themed.component';
|
||||
import { AuthNavMenuComponent } from './auth-nav-menu.component';
|
||||
|
||||
/**
|
||||
* Themed wrapper for {@link AuthNavMenuComponent}
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-themed-auth-nav-menu',
|
||||
styleUrls: [],
|
||||
templateUrl: '../theme-support/themed.component.html',
|
||||
})
|
||||
export class ThemedAuthNavMenuComponent extends ThemedComponent<AuthNavMenuComponent> {
|
||||
protected getComponentName(): string {
|
||||
return 'AuthNavMenuComponent';
|
||||
}
|
||||
|
||||
protected importThemedComponent(themeName: string): Promise<any> {
|
||||
return import(`../../../themes/${themeName}/app/shared/auth-nav-menu/auth-nav-menu.component`);
|
||||
}
|
||||
|
||||
protected importUnthemedComponent(): Promise<any> {
|
||||
return import(`./auth-nav-menu.component`);
|
||||
}
|
||||
}
|
@@ -42,6 +42,7 @@ import { SearchResultGridElementComponent } from './object-grid/search-result-gr
|
||||
import { ViewModeSwitchComponent } from './view-mode-switch/view-mode-switch.component';
|
||||
import { VarDirective } from './utils/var.directive';
|
||||
import { AuthNavMenuComponent } from './auth-nav-menu/auth-nav-menu.component';
|
||||
import { ThemedAuthNavMenuComponent } from './auth-nav-menu/themed-auth-nav-menu.component';
|
||||
import { LogOutComponent } from './log-out/log-out.component';
|
||||
import { DragClickDirective } from './utils/drag-click.directive';
|
||||
import { TruncatePipe } from './utils/truncate.pipe';
|
||||
@@ -223,6 +224,7 @@ const COMPONENTS = [
|
||||
// put shared components here
|
||||
AlertComponent,
|
||||
AuthNavMenuComponent,
|
||||
ThemedAuthNavMenuComponent,
|
||||
UserMenuComponent,
|
||||
ChipsComponent,
|
||||
DsSelectComponent,
|
||||
|
@@ -0,0 +1,19 @@
|
||||
import { Component } from '@angular/core';
|
||||
import {
|
||||
AuthNavMenuComponent as BaseComponent,
|
||||
} from '../../../../../app/shared/auth-nav-menu/auth-nav-menu.component';
|
||||
import { fadeInOut, fadeOut } from '../../../../../app/shared/animations/fade';
|
||||
|
||||
/**
|
||||
* Component representing the {@link AuthNavMenuComponent} of a page
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-auth-nav-menu',
|
||||
// templateUrl: 'auth-nav-menu.component.html',
|
||||
templateUrl: '../../../../../app/shared/auth-nav-menu/auth-nav-menu.component.html',
|
||||
// styleUrls: ['auth-nav-menu.component.scss'],
|
||||
styleUrls: ['../../../../../app/shared/auth-nav-menu/auth-nav-menu.component.scss'],
|
||||
animations: [fadeInOut, fadeOut]
|
||||
})
|
||||
export class AuthNavMenuComponent extends BaseComponent {
|
||||
}
|
@@ -85,6 +85,7 @@ import { ResourcePoliciesModule } from '../../app/shared/resource-policies/resou
|
||||
import { ComcolModule } from '../../app/shared/comcol/comcol.module';
|
||||
import { FeedbackComponent } from './app/info/feedback/feedback.component';
|
||||
import { CommunityListComponent } from './app/community-list-page/community-list/community-list.component';
|
||||
import { AuthNavMenuComponent } from './app/shared/auth-nav-menu/auth-nav-menu.component';
|
||||
|
||||
const DECLARATIONS = [
|
||||
FileSectionComponent,
|
||||
@@ -128,7 +129,8 @@ const DECLARATIONS = [
|
||||
HeaderNavbarWrapperComponent,
|
||||
BreadcrumbsComponent,
|
||||
FeedbackComponent,
|
||||
CommunityListComponent
|
||||
CommunityListComponent,
|
||||
AuthNavMenuComponent,
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@@ -8,7 +8,7 @@
|
||||
<div class="d-flex flex-grow-1 ml-auto justify-content-end align-items-center">
|
||||
<ds-search-navbar class="navbar-search"></ds-search-navbar>
|
||||
<ds-lang-switch></ds-lang-switch>
|
||||
<ds-auth-nav-menu></ds-auth-nav-menu>
|
||||
<ds-themed-auth-nav-menu></ds-themed-auth-nav-menu>
|
||||
<ds-impersonate-navbar></ds-impersonate-navbar>
|
||||
<div class="pl-2">
|
||||
<button class="navbar-toggler" type="button" (click)="toggleNavbar()"
|
||||
|
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<ds-search-navbar class="navbar-collapsed"></ds-search-navbar>
|
||||
<ds-lang-switch class="navbar-collapsed"></ds-lang-switch>
|
||||
<ds-auth-nav-menu class="navbar-collapsed"></ds-auth-nav-menu>
|
||||
<ds-themed-auth-nav-menu class="navbar-collapsed"></ds-themed-auth-nav-menu>
|
||||
<ds-impersonate-navbar class="navbar-collapsed"></ds-impersonate-navbar>
|
||||
</div>
|
||||
</nav>
|
Reference in New Issue
Block a user