[Connect Admin | Trunk & Library | angular-14]: Allow curators with profile to be invisible in the Gateway | Dynamically align custom menu.
1. CuratorInfo.ts: In Curator class added visible: boolean = true; 2. personal-info.module.ts: Imported MatSlideToggleModule. 3. personal-info.component.ts: Added slider to set curator profile to visible or invisible (default to visible). 4. menu.ts: In Menu class added field "featuredAlignment: MenuAlignment;" | Added enum MenuAlignment. 5. menu.component: Updated title "Menu settings" | Added "Menu Alignment" setting, to set if custom menu will be left, center or right alligned | Added notification when menu visibility changes. 6. help-content.service.ts: Added "alignMenu()" method to align custom menu dynamically.
This commit is contained in:
parent
4cfc90e7f8
commit
6bbeff9152
|
@ -1 +1 @@
|
|||
Subproject commit 9418fab7745f3b08089057212cd0fbf8f325bfa4
|
||||
Subproject commit acdba43c8bc8244f59e32e450f0dd106bb397037
|
|
@ -37,7 +37,7 @@ declare var UIkit;
|
|||
</div>
|
||||
<div actions>
|
||||
<div class="uk-container uk-section-xsmall">
|
||||
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||
<div class="uk-flex uk-flex-middle uk-flex-center uk-flex-right@m">
|
||||
<button class="uk-button uk-button-secondary" [class.uk-disabled]="!hasChanged || loading"
|
||||
[disabled]="!hasChanged || loading"
|
||||
(click)="reset()">Reset
|
||||
|
@ -76,6 +76,16 @@ declare var UIkit;
|
|||
<div class="uk-width-expand">
|
||||
<div input class="uk-width-large@m uk-width-1-1" placeholder="Name"
|
||||
[formInput]="curatorFb.get('name')" inputClass="border-bottom normal-font-size"></div>
|
||||
<div class="uk-width-1-1 uk-margin-small-top">
|
||||
<mat-slide-toggle class="uk-width-small uk-margin-small-top"
|
||||
uk-tooltip="title: If a curator is visible and has created a profile, they will appear in the Gateway. Otherwise, not.; pos: bottom"
|
||||
[formControl]="curatorFb.get('visible')">
|
||||
<span class="uk-flex uk-flex-center">
|
||||
{{curatorFb.get('visible').getRawValue()?' Visible':'Invisible'}}
|
||||
<icon *ngIf="!curatorFb.get('visible').getRawValue()" class="uk-margin-small-left uk-text-warning" name="warning" flex="true"></icon>
|
||||
</span>
|
||||
</mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div input class="uk-width-1-1" placeholder="Biography"
|
||||
|
@ -264,6 +274,7 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
|||
this.curator.affiliations = [];
|
||||
this.curator.bio = '';
|
||||
this.curator.photo = null;
|
||||
this.curator.visible = true;
|
||||
}
|
||||
this.curatorsPageStatus();
|
||||
}
|
||||
|
@ -289,7 +300,8 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
|||
bio: this.fb.control(this.curator.bio),
|
||||
email: this.fb.control(this.curator.email),
|
||||
photo: this.fb.control(this.curator.photo),
|
||||
affiliations: affiliations
|
||||
affiliations: affiliations,
|
||||
visible: this.fb.control(this.curator.visible)
|
||||
});
|
||||
if (this.curator.photo) {
|
||||
this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
|
||||
|
|
|
@ -13,13 +13,15 @@ import {InputModule} from "../../../openaireLibrary/sharedComponents/input/input
|
|||
import {IconsModule} from "../../../openaireLibrary/utils/icons/icons.module";
|
||||
import {UrlPrefixModule} from "../../../openaireLibrary/utils/pipes/url-prefix.module";
|
||||
import {HelpContentService} from "../../../services/help-content.service";
|
||||
import {MatSlideToggleModule} from "@angular/material/slide-toggle";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule, FormsModule, RouterModule.forChild([
|
||||
{path: '', component: PersonalInfoComponent}
|
||||
]),
|
||||
AlertModalModule, PageContentModule, UsersTabsModule, LoadingModule, ReactiveFormsModule, InputModule, IconsModule, UrlPrefixModule
|
||||
AlertModalModule, PageContentModule, UsersTabsModule, LoadingModule, ReactiveFormsModule, InputModule, IconsModule, UrlPrefixModule,
|
||||
MatSlideToggleModule
|
||||
],
|
||||
declarations: [
|
||||
PersonalInfoComponent
|
||||
|
|
Loading…
Reference in New Issue