[angular-irish-16 | DONE]: Add datasource in Entities. Add logo in sidebar.

This commit is contained in:
Konstantinos Triantafyllou 2023-11-16 14:36:44 +02:00
parent 752baad8de
commit 79d49c80e3
5 changed files with 13 additions and 0 deletions

View File

@ -28,6 +28,9 @@
[class.hide-on-close]="backItem.icon">{{backItem.title}}</span>
</a>
</div>
<div *ngIf="logoURL" id="sidebar_logo" class="uk-margin-top">
<img [src]="logoURL">
</div>
<div *ngIf="items.length > 0" class="menu_section uk-margin-large-top" [class.mobile]="mobile" style="min-height: 30vh">
<ul #nav class="uk-list uk-nav" [class.uk-list-large]="mobile"
[class.uk-nav-default]="!mobile" [class.uk-nav-primary]="mobile" uk-nav="duration: 400">

View File

@ -28,6 +28,7 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
@Input() activeSubItem: string = '';
@Input() backItem: MenuItem = null;
@Input() queryParamsHandling;
@Input() logoURL: string;
@ViewChild("nav") nav: ElementRef;
@ViewChild("sidebar_offcanvas") sidebar_offcanvas: ElementRef;
public offset: number;

View File

@ -9,6 +9,9 @@
<span class="uk-width-expand uk-text-truncate uk-margin-left hide-on-close">Indicators</span>
</a>
</div>
<div *ngIf="showLogo" id="sidebar_logo" class="uk-margin-top">
<img [src]="stakeholder | logoUrl">
</div>
<div class="menu_section uk-margin-large-top">
<ul class="uk-list uk-nav uk-nav-default" transition-group [id]="'topics'"
uk-nav="duration: 400">

View File

@ -39,6 +39,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
public offset: number;
public loading: boolean = false;
public stakeholder: Stakeholder;
public showLogo: boolean = false;
public user: User;
/**
* Stakeholder change event
@ -93,6 +94,9 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
}
public ngOnInit() {
if(this._route.snapshot.data?.showLogo === true) {
this.showLogo = true;
}
if (typeof document !== "undefined") {
this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height'));
}

View File

@ -24,12 +24,14 @@ class Entities {
organization = 'Research Institution';
project = 'Project';
country = 'National';
datasource = 'Repository';
stakeholders = 'Dashboards';
funders = 'Funders';
ris = 'Research Initiatives';
organizations = 'Research Institutions';
projects = 'Projects';
datasources = 'Repositories';
}
export class StakeholderConfiguration {