Delete old sidebar. Make some changes in navbar and user-mini

This commit is contained in:
Konstantinos Triantafyllou 2022-03-02 23:48:21 +02:00
parent 894ce0add6
commit 4698a5fafd
14 changed files with 110 additions and 309 deletions

View File

@ -14,10 +14,10 @@ import {distinctUntilChanged} from "rxjs/operators";
selector: '[page-content]',
template: `
<div id="page_content">
<div #header id="page_content_header">
<div #header id="page_content_header" class="uk-container uk-container-large">
<ng-content select="[header]"></ng-content>
</div>
<div id="page_content_inner" [ngStyle]="{'margin-top.px': (height)?height.toString():'0'}">
<div id="page_content_inner" class="uk-section uk-container uk-container-large" [ngStyle]="{'margin-top.px': (height)?height.toString():'0'}">
<ng-content select="[inner]"></ng-content>
</div>
</div>

View File

@ -1,15 +1,5 @@
<aside id="sidebar_main">
<div id="sidebar_content">
<a *ngIf="showHeader" class="sidebar_main_header uk-text-center" target="_blank" [class.cursor-default]="!headerUrl" [attr.href]="(headerUrl)?headerUrl:null">
<img *ngIf="properties.environment =='beta' || properties.environment =='development'" class="badge"
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
[alt]="properties.environment">
<div class="logo" [class.portal-logo]="!headerLogoUrl">
<img *ngIf="headerLogoUrl" [src]="headerLogoUrl | urlPrefix">
<div *ngIf="logoLabel" class="logo-label uk-position-bottom-right">{{logoLabel}}</div>
</div>
<div *ngIf="headerName" class="uk-disabled uk-text-muted uk-margin-small-left uk-margin-small-right" [class.uk-text-center]="!open" [ngClass]="open?('uk-text-' + headerPosition):''">{{headerName}}</div>
</a>
<div *ngIf="items.length > 0" class="menu_section uk-margin-xlarge-top">
<ul class="uk-list uk-nav-parent-icon" uk-nav>
<ng-template ngFor [ngForOf]="items" let-item let-i="index">
@ -17,32 +7,15 @@
[class.uk-open]="isTheActiveMenuItem(item)"
[class.uk-parent]="item.items.length > 1">
<a *ngIf="item.items.length <= 1" [routerLink]="(item.route)?item.route:null"
[queryParams]=item.params [queryParamsHandling]="queryParamsHandling" class="uk-text-center">
<div *ngIf="item.icon && !open" class="uk-margin-auto">
<span [innerHTML]="satinizeHTML(item.icon)"></span>
[attr.uk-tooltip]="item.title"
[queryParams]=item.params [queryParamsHandling]="queryParamsHandling">
<div class="uk-grid uk-flex-middle uk-flex-center" uk-grid>
<div *ngIf="item.icon" class="uk-width-auto">
<icon class="menu-icon" [svg]="item.icon" [flex]="true"></icon>
</div>
<span *ngIf="open || !item.icon" [class.uk-text-small]="!open" class="uk-width-expand uk-text-truncate">{{item.title}}</span>
</div>
<!-- <div *ngIf="!item.icon && !open" class="uk-margin-auto"><i
class="material-icons">donut_large</i></div>-->
<span [class.uk-text-small]="!open">{{item.title}}</span>
</a>
<ng-template [ngIf]="item.items.length > 1">
<a (click)="item.open = !item.open" class=" uk-parent uk-text-center">
<div *ngIf="item.icon && !open" class="menu_icon "><i class="material-icons">{{item.icon}}</i></div>
<span [class.uk-text-small]="!open">{{item.title}}</span>
</a>
<ul [class.uk-hidden]="!open" class="uk-nav-sub uk-text-center">
<ng-template ngFor [ngForOf]="item.items" let-subItem let-j="index">
<li *ngIf="subItem.route" [class.uk-active]="isTheActiveMenuItem(item, subItem)">
<a [routerLink]="subItem.route"
[queryParams]=subItem.params [queryParamsHandling]="queryParamsHandling">
<div *ngIf="subItem.icon"><i class="material-icons">{{subItem.icon}}</i></div>
<span>{{subItem.title}}</span>
</a>
</li>
</ng-template>
</ul>
</ng-template>
</li>
</ng-template>
</ul>
@ -63,9 +36,9 @@
</div>
</ng-template>
</div>
<div *ngIf="!isSmallScreen" id="sidebar_switcher_toggle" class="clickable "
<!-- <div *ngIf="!isSmallScreen" id="sidebar_switcher_toggle" class="clickable"
(click)="toggleOpen($event)">
<span class="uk-position-center" *ngIf="!open" uk-icon="icon:chevron-right; ratio: 1.5"></span>
<span class="uk-position-center" *ngIf="open" uk-icon="icon: chevron-left; ratio:1.5"></span>
</div>
</div>-->
</aside>

View File

@ -11,16 +11,9 @@ import {LayoutService} from "./layout.service";
})
export class SideBarComponent implements OnInit {
@Input() items: MenuItem[] = [];
@Input() logoLabel: string;
@Input() headerName: string;
@Input() headerPosition: "left" | "center" | "right" = "center";
@Input() headerLogoUrl: string;
@Input() headerUrl: string;
@Input() showHeader: boolean = true;
@Input() activeItem: string = '';
@Input() activeSubItem: string = '';
@Input() specialMenuItem: MenuItem = null;
@Input() searchParams = {};
@Input() queryParamsHandling = "";
properties;

View File

@ -5,12 +5,14 @@ import {RouterModule} from "@angular/router";
import {SideBarComponent} from './sideBar.component';
import {UrlPrefixModule} from "../../../utils/pipes/url-prefix.module";
import {IconsModule} from "../../../utils/icons/icons.module";
@NgModule({
imports: [
CommonModule,
RouterModule,
UrlPrefixModule
UrlPrefixModule,
IconsModule
],
declarations: [
SideBarComponent

View File

@ -23,7 +23,6 @@ import {Session} from "../../login/utils/helper.class";
import {AnnotationComponent} from "../annotation/annotation.component";
import {ParsingFunctions} from "../landing-utils/parsingFunctions.class";
import {ConnectHelper} from "../../connect/connectHelper";
import {$e} from "codelyzer/angular/styles/chars";
@Component({
@ -86,7 +85,6 @@ export class ResultLandingComponent {
public warningMessage = "";
public errorMessage = "";
public showLoading: boolean = true;
public dashboard = properties.isDashboard;
public routerHelper: RouterHelper = new RouterHelper();
public activeTab: string = null;

View File

@ -6,44 +6,41 @@ import {Subscriber} from "rxjs";
import {MenuItem} from "../sharedComponents/menu";
import {UserManagementService} from "../services/user-management.service";
declare var UIkit;
@Component({
selector: 'user-mini',
template: `
<ng-container *ngIf="!dashboard">
<ul *ngIf="!mobileView" class="uk-navbar-nav" [class.uk-dark]="dark">
<li class="uk-parent">
<a *ngIf="!loggedIn" (click)="logIn()">Sign in</a>
<ng-container *ngIf="loggedIn">
<a class="login uk-icon">
<svg height="60" width="60">
<circle cx="30" cy="30" r="20" stroke-width="2"></circle>
<text x="50%" y="50%" text-anchor="middle" dy=".4em" font-size="16">
{{firstLetters?firstLetters:'AN'}}
</text>
</svg>
</a>
<div class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left">
<ul class="uk-nav uk-navbar-dropdown-nav">
<ng-container *ngFor="let item of userMenuItems ">
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization"
[class.uk-active]="isTheActiveSubMenu(item)">
<a *ngIf="item.route.length > 0" [routerLink]="item.route"
[queryParams]="item.params">{{item.title}}</a>
<a *ngIf="item.route.length == 0 && item.url.length > 0" href="{{item.url}}"
target="_blank">{{item.title}}</a>
</li>
</ng-container>
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
<li><a (click)="logOut()">Log out</a></li>
</ul>
</div>
</ng-container>
</li>
</ul>
<ul *ngIf="mobileView" class="uk-nav uk-nav-default">
<li>
<ul *ngIf="!mobileView" class="uk-navbar-nav" [class.uk-dark]="dark">
<li class="uk-parent">
<a *ngIf="!loggedIn" (click)="logIn()">Sign in</a>
<ng-container *ngIf="loggedIn">
<a class="login uk-icon">
<svg height="60" width="60">
<circle cx="30" cy="30" r="20" stroke-width="2"></circle>
<text x="50%" y="50%" text-anchor="middle" dy=".4em" font-size="16">
{{firstLetters ? firstLetters : 'AN'}}
</text>
</svg>
</a>
<div class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left">
<ul class="uk-nav uk-navbar-dropdown-nav">
<ng-container *ngFor="let item of userMenuItems ">
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization"
[class.uk-active]="isTheActiveSubMenu(item)">
<a *ngIf="item.route.length > 0" [routerLink]="item.route"
[queryParams]="item.params">{{item.title}}</a>
<a *ngIf="item.route.length == 0 && item.url.length > 0" href="{{item.url}}"
target="_blank">{{item.title}}</a>
</li>
</ng-container>
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
<li><a (click)="logOut()">Log out</a></li>
</ul>
</div>
</ng-container>
</li>
</ul>
<ul *ngIf="mobileView" class="uk-nav uk-nav-default">
<li>
<span *ngIf="loggedIn" class="uk-flex uk-flex-middle">
<span>{{user.fullname + " "}}</span>
<span class="uk-margin-small-right uk-icon"><svg width="20" height="20"
@ -59,53 +56,20 @@ declare var UIkit;
d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2"></path></svg>
</span>
</span>
<a *ngIf="!loggedIn" (click)="logIn()">Sign in</a>
<ul *ngIf="loggedIn" class="uk-nav-sub">
<ng-container *ngFor="let item of userMenuItems ">
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization">
<a *ngIf="item.route.length > 0" routerLink="{{item.route}}" (click)="closeCanvas()">{{item.title}}</a>
<a *ngIf="item.route.length == 0 && item.url.length > 0" (click)="closeCanvas()" href="{{item.url}}">{{item.title}}</a>
</li>
</ng-container>
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
<li><a (click)="logOut()">Log out</a></li>
</ul>
</li>
</ul>
</ng-container>
<ng-container *ngIf="dashboard">
<a *ngIf="!loggedIn" class="uk-flex" (click)="logIn()">Sign in</a>
<a *ngIf="loggedIn" class="login uk-icon">
<svg height="60" width="60">
<circle cx="30" cy="30" r="20" stroke-width="2"></circle>
<text *ngIf="firstLetters" x="50%" y="50%" text-anchor="middle" dy=".4em"
font-size="16">
{{firstLetters}}
</text>
<svg *ngIf="!firstLetters" ratio="1" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" width="20"
x="20">
<circle cx="9.9" cy="6.4" r="4.4" stroke-width="1.1"></circle>
<path d="M1.5,19 C2.3,14.5 5.8,11.2 10,11.2 C14.2,11.2 17.7,14.6 18.5,19.2" stroke-width="1.1"></path>
</svg>
</svg>
</a>
<div *ngIf="loggedIn" uk-dropdown="mode: click; offset: -2; delay-hide: 0; flip: false; pos: bottom-right"
#userMenu
class="uk-padding-remove-horizontal">
<ul class="uk-nav uk-dropdown-nav">
<a *ngIf="!loggedIn" (click)="logIn()">Sign in</a>
<ul *ngIf="loggedIn" class="uk-nav-sub">
<ng-container *ngFor="let item of userMenuItems ">
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization">
<a *ngIf="item.route.length > 0" routerLink="{{item.route}}"
[queryParams]=item.params>{{item.title}}</a>
<a *ngIf="item.route.length == 0 && item.url.length > 0" href="{{item.url}}"
target="_blank">{{item.title}}</a>
<a *ngIf="item.route.length > 0" routerLink="{{item.route}}" (click)="closeCanvas()">{{item.title}}</a>
<a *ngIf="item.route.length == 0 && item.url.length > 0" (click)="closeCanvas()"
href="{{item.url}}">{{item.title}}</a>
</li>
</ng-container>
<li *ngIf="userMenuItems.length > 0" class="uk-nav-divider"></li>
<li><a (click)="logOut()">Log out</a></li>
</ul>
</div>
</ng-container>
</li>
</ul>
`
})
export class UserMiniComponent implements OnInit, OnChanges {
@ -114,7 +78,6 @@ export class UserMiniComponent implements OnInit, OnChanges {
public isAuthorized: boolean = false;
@Input() public mobileView: boolean = false;
public firstLetters: string = "";
@Input() public dashboard: boolean = false;
public server: boolean = true;
public routerHelper: RouterHelper = new RouterHelper();
@Input() userMenuItems;

View File

@ -13,7 +13,8 @@
<ng-container *ngFor="let type of resultTypes.values; let i = index; let end = last; ">
<ng-container *ngIf="type.selected">
<span class="uk-width-auto">
<a [attr.uk-tooltip]="'Remove ' + type.name" (click)="removeResultType(type.id)" [class.uk-disabled]="disabled">
<a [attr.uk-tooltip]="'Remove ' + type.name" (click)="removeResultType(type.id)"
[class.uk-disabled]="disabled">
<span class="filter-tag uk-flex uk-flex-middle">
<span class="uk-margin-small-right uk-width-expand">{{type.name}}</span>
<icon name="close" flex="true" ratio="0.7"></icon>
@ -41,15 +42,17 @@
<ng-container *ngFor="let filter of filters ">
<ng-container *ngIf="filter.countSelectedValues > 0">
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
<span *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)" class="uk-width-auto">
<a [attr.uk-tooltip]="'Remove ' + value.name" (click)="removeFilter(value, filter)" [class.uk-disabled]="disabled">
<span *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)"
class="uk-width-auto">
<a [attr.uk-tooltip]="'Remove ' + value.name" (click)="removeFilter(value, filter)"
[class.uk-disabled]="disabled">
<span class="filter-tag uk-flex uk-flex-middle">
<span class="uk-margin-small-right uk-width-expand">{{value.name}}</span>
<icon name="close" flex="true" ratio="0.7"></icon>
</span>
</a>
</span>
</ng-container>
</ng-container>
</ng-container>
</ng-container>
</h1>
@ -68,8 +71,9 @@
class="uk-margin-top" role="alert">
<loading></loading>
</div>
<div *ngIf="searchUtils.refineStatus != errorCodes.LOADING && searchUtils.refineStatus != errorCodes.DONE && results.length > 0"
class="uk-margin-top uk-text-meta">
<div
*ngIf="searchUtils.refineStatus != errorCodes.LOADING && searchUtils.refineStatus != errorCodes.DONE && results.length > 0"
class="uk-margin-top uk-text-meta">
<span *ngIf="searchUtils.refineStatus == errorCodes.NONE">No filters available</span>
<span *ngIf="searchUtils.refineStatus != errorCodes.NONE" class="uk-text-warning">Filters temporarily unavailable. Please try again later.</span>
</div>
@ -111,10 +115,10 @@
(usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') ?
' uk-position-relative ' :(' uk-section ' ))+'}':null)">
<div [class]="' uk-background-norepeat uk-background-bottom-center uk-padding-remove-bottom uk-flex uk-flex-middle uk-background-fixed '+searchFormClass
+ (usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId') && !dashboard ?
+ (usedBy != 'deposit' && usedBy != 'orcid' && (!customFilter || customFilter.queryFieldName != 'communityId')?
' image-front-topbar searchFormMinHeight uk-padding-remove-bottom uk-section uk-section-small' : '')
+(simpleView?'':' advancedSearchFormBackground ')">
<!-- TODO - Kostis until here-->
<!-- TODO - Kostis until here-->
<div class="uk-width-1-1">
<div class="uk-container uk-container-large">
<div class="uk-padding-small uk-padding-remove-bottom">
@ -124,19 +128,19 @@
<div class="uk-position-relative">
<div class="uk-container uk-container-large uk-section uk-section-small uk-margin-bottom" id="searchForm">
<advanced-search-form
[entityType]="entityType"
[fieldIds]="fieldIds"
[fieldIdsMap]="fieldIdsMap"
[selectedFields]="selectedFields"
(queryChange)="queryChanged($event)"
[isDisabled]="disabled"
[simpleSearchLink]="simpleSearchLink"
[advancedSearchLink]="advancedSearchLink"
[advancedSearchLinkParameters]
[entityType]="entityType"
[fieldIds]="fieldIds"
[fieldIdsMap]="fieldIdsMap"
[selectedFields]="selectedFields"
(queryChange)="queryChanged($event)"
[isDisabled]="disabled"
[simpleSearchLink]="simpleSearchLink"
[advancedSearchLink]="advancedSearchLink"
[advancedSearchLinkParameters]
="this.routerHelper.createQueryParams(this.parameterNames, this.parameterValues)"
[simpleView]="simpleView" [formPlaceholderText]="formPlaceholderText"
[resultTypes]="resultTypes" [quickFilter]="quickFilter" [entitiesSelection]="entitiesSelection"
[showSwitchSearchLink]="showSwitchSearchLink" [customFilter]="customFilter"
[simpleView]="simpleView" [formPlaceholderText]="formPlaceholderText"
[resultTypes]="resultTypes" [quickFilter]="quickFilter" [entitiesSelection]="entitiesSelection"
[showSwitchSearchLink]="showSwitchSearchLink" [customFilter]="customFilter"
>
</advanced-search-form>
</div>
@ -145,7 +149,7 @@
</div>
</div>
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitleWithFilters
[searchAction]=false [description]="metaDescription" ></schema2jsonld>
[searchAction]=false [description]="metaDescription"></schema2jsonld>
<div id="tm-main" class="uk-margin-medium-top" [class.uk-margin-top]="stickyForm">
<div uk-grid>
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
@ -153,8 +157,8 @@
<div>
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0"
[texts]="pageContents['top']"></helper>
<div [class]="(showRefine && !properties.isDashboard)? 'uk-width-4-5@m uk-width-4-5@l uk-width-1-1@s' :'uk-width-1-1'">
<div *ngIf="showRefine && !dashboard" class="uk-hidden@m uk-margin-top">
<div [class]="showRefine? 'uk-width-4-5@m uk-width-4-5@l uk-width-1-1@s' :'uk-width-1-1'">
<div *ngIf="showRefine" class="uk-hidden@m uk-margin-top">
<a href="#mobile-filters" uk-toggle>
<span class="uk-icon uk-margin-small-right uk-margin-small-left">
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
@ -171,7 +175,8 @@
</svg>
</span>
<span>Filters <span
*ngIf="(selectedRangeFilters+selectedFilters) > 0">({{(selectedRangeFilters + selectedFilters)}})</span></span>
*ngIf="(selectedRangeFilters+selectedFilters) > 0">({{(selectedRangeFilters + selectedFilters)}}
)</span></span>
</a>
<div #mobileFilters id="mobile-filters" uk-offcanvas="overlay: true" style="z-index:10000;">
<!-- TODO - Kostis check offcanvas-white -->
@ -196,8 +201,7 @@
</a>
</div>
<div class="uk-grid uk-padding-small uk-padding-remove-vertical uk-margin-large-bottom">
<div *ngIf="showRefine && !properties.isDashboard
&& (results.length > 0
<div *ngIf="showRefine && (results.length > 0
|| (searchUtils.refineStatus == errorCodes.LOADING && searchUtils.status != errorCodes.LOADING)
|| (!hideFilters &&
(existingFiltersWithValues > 0 || (selectedRangeFilters + selectedFilters + selectedTypesNum) > 0)
@ -207,27 +211,19 @@
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
</div>
<div class="uk-width-expand@m uk-with-1-1@s">
<!-- Dashboard Filters -->
<div *ngIf="properties.isDashboard"
class="uk-width-1-1 uk-margin-top uk-margin-medium-bottom ">
<div class="uk-flex uk-flex-bottom">
<span class="uk-margin-small-right">Filters: </span>
<ng-container *ngTemplateOutlet="selected_filters_pills; context: {}"></ng-container>
</div>
</div>
<!-- Results only for Custom Filter? -->
<div *ngIf="customFilter && !customFilter.isHiddenFilter &&
customFilter.selected == false && customFilter.promptToAddFilter"
class="uk-alert uk-animation-slide-top-small">
Do you want to see results only for {{customFilter.valueName}}? <a
(click)="addCustomFilter();">Click here</a>.
(click)="addCustomFilter();">Click here</a>.
</div>
<!-- Related results for Custom Filter Alert -->
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !loadPaging )"
class="uk-alert uk-text-center uk-margin-small-top ">
<span *ngIf="customFilter">The following results are related to <span class="portal-color"
>{{customFilter.valueName}}</span>.</span>
Are you interested to view more results? Visit
Are you interested to view more results? Visit
<a
class="uk-margin-top uk-link"
[href]="openaireLink+this.routerHelper.createQueryParamsString(this.parameterNames, this.parameterValues)"
@ -258,13 +254,16 @@
</search-download>
</div>
<!-- No Dashboard Filters -->
<div *ngIf="selectedRangeFilters+selectedFilters + selectedTypesNum > 0 || (customFilter && (customFilter.selected == true || customFilter.isHiddenFilter))">
<div
*ngIf="selectedRangeFilters+selectedFilters + selectedTypesNum > 0 || (customFilter && (customFilter.selected == true || customFilter.isHiddenFilter))">
<ng-container *ngTemplateOutlet="selected_filters_pills;"></ng-container>
</div>
<div class="uk-grid uk-flex-middle uk-child-width-1-1 uk-child-width-1-2@m uk-margin-medium-top" uk-grid>
<div *ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)">
<div
*ngIf="(results && searchUtils.totalResults > 0) || (!loadPaging && oldTotalResults > 0 && searchUtils.status == errorCodes.LOADING)">
<div class="uk-flex uk-flex-middle">
<search-results-per-page class="uk-margin-right" *ngIf="searchUtils.totalResults >= 50" [size]="searchUtils.size"
<search-results-per-page class="uk-margin-right" *ngIf="searchUtils.totalResults >= 50"
[size]="searchUtils.size"
(sizeChange)="sizeChanged($event)"
[isDisabled]="disabled">
</search-results-per-page>
@ -281,7 +280,9 @@
[isDisabled]="disabled">
</search-paging>
</div>
<div *ngIf="(searchUtils.page <= pagingLimit) || (searchUtils.totalResults <= searchUtils.size*pagingLimit)" class="uk-margin">
<div
*ngIf="(searchUtils.page <= pagingLimit) || (searchUtils.totalResults <= searchUtils.size*pagingLimit)"
class="uk-margin">
<search-result *ngIf="( entityType !='community' && entityType != 'stakeholder') && usedBy == 'search'"
[results]="results"
[status]=searchUtils.status
@ -298,10 +299,10 @@
[properties]=properties>
</deposit-result>
<orcid-result *ngIf="usedBy == 'orcid'"
[results]="results"
[status]="searchUtils.status"
[type]="entityType"
[properties]=properties>
[results]="results"
[status]="searchUtils.status"
[type]="entityType"
[properties]=properties>
</orcid-result>
<portal-search-result
*ngIf="(entityType == 'community' || entityType == 'stakeholder') && usedBy == 'search'"
@ -324,18 +325,19 @@
</search-paging>
</div>
<div *ngIf="showIndexInfo && searchUtils.status !== errorCodes.LOADING"
class="uk-margin-small-top uk-grid uk-child-width-1-2">
class="uk-margin-small-top uk-grid uk-child-width-1-2">
<!-- Last Index Info-->
<div class="">
<img src="assets/common-assets/graph.svg" style="opacity: 0.4; width:20px; height:22px" loading="lazy"
alt="graph">
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
<span class="uk-margin-small-left uk-text-baseline uk-text-muted">Powered by <a
href="https://graph.openaire.eu" class="graph-color">OpenAIRE Research Graph</a></span>
</div>
<div class="uk-text-right">
<span *ngIf="indexUpdateDate" class="uk-text-baseline uk-text-muted">
<a *ngIf="properties.showLastIndexInformationLink"
class="uk-link"
[href]="properties.lastIndexInformationLink" target="_blank">
class="uk-link"
[href]="properties.lastIndexInformationLink" target="_blank">
Last update
</a><span *ngIf="!(properties.showLastIndexInformationLink) ">
@ -347,38 +349,11 @@
</div>
</div>
<helper *ngIf="pageContents && pageContents['bottom'] && pageContents['bottom'].length > 0"
[texts]="pageContents['bottom']"></helper>
[texts]="pageContents['bottom']"></helper>
</div>
</div>
</div>
</div>
</div>
</div>
<div *ngIf="properties.isDashboard" id="filters_switcher_toggle" href="#style_switcher" uk-toggle="" >
<i class=" uk-text-muted">
<svg style="margin-top: 8px;" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
viewBox="0 0 20 20"
fill="white" width="24px" height="16px">
<g>
<path d="M0,0h24 M24,24H0" fill="none"/>
<path
d="M4.25,5.61C6.57,8.59,10,13,10,13v5c0,1.1,0.9,2,2,2h0c1.1,0,2-0.9,2-2v-5c0,0,3.43-4.41,5.75-7.39 C20.26,4.95,19.79,4,18.95,4H5.04C4.21,4,3.74,4.95,4.25,5.61z"/>
<path d="M0,0h24v24H0V0z" fill="none"/>
</g>
</svg>
</i>
</div>
<div *ngIf="properties.isDashboard" id="style_switcher" class=" uk-offcanvas filters_switcher"
uk-offcanvas="flip:true" mode="slide" overlay="" style="z-index:982;" >
<div class="uk-offcanvas-bar offcanvas-white">
<div class="uk-float-right" >
<button class="uk-offcanvas-close uk-close uk-icon" type="button" uk-close=""></button>
</div>
<div class="uk-padding uk-padding-remove-top uk-overflow-auto" style="height:calc(100vh - 100px);">
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
</div>
</div>
</div>
</div>
<modal-alert #removeCustomFilter (alertOutput)="closeCustomFilterModal()"></modal-alert>

View File

@ -95,7 +95,6 @@ export class NewSearchPageComponent {
@Input() showBreadcrumb: boolean = false;
@Input() showDownload: boolean = true;
@Input() breadcrumbs: Breadcrumb[] = [];
public dashboard: boolean = properties.isDashboard;
private subscriptions = [];
public parameterNames: string[] = [];
public parameterValues: string[] = [];

View File

@ -9,8 +9,7 @@
<div class="tm-header-mobile uk-hidden@m">
<nav class="uk-navbar-container uk-navbar" uk-navbar=""
[class.uk-navbar-transparent]="header.stickyAnimation === false">
<div
*ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && header.badge"
<div *ngIf="(properties.environment =='beta' || properties.environment =='development') && showLogo && header.badge"
class="uk-position-top-left">
<img class="small-beta-indication"
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
@ -111,8 +110,7 @@
[src]="'assets/common-assets/'+(properties.environment =='beta'?'beta_flag.svg':'prototype_flag.svg')"
alt="BETA" style="height: 102px; width: 102px">
</div>
<nav class="uk-navbar uk-navbar-container" uk-navbar>
<!-- <div *ngIf="!onlyTop" class="uk-navbar-center"> -->
<nav class="uk-navbar uk-navbar-container uk-padding-large uk-padding-remove-vertical" uk-navbar>
<ng-container *ngIf="!onlyTop">
<div class="uk-navbar-left">
<ng-container *ngIf="showLogo && isHeaderLeft">

View File

@ -1,36 +0,0 @@
<ul class="uk-nav uk-nav-default sidebar uk-overflow-auto uk-margin-left uk-margin-large-top" style="max-height: 85vh">
<li class="uk-nav-header" *ngFor="let menu of menuItems" [class.uk-active]="isTheActiveMenu(menu.rootItem.route, menu.rootItem.params)">
<a *ngIf="menu.rootItem.route && menu.rootItem.route != ''"
[routerLink]="menu.rootItem.route" class="uk-link" [queryParams]=menu.rootItem.params>
<span><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
</a>
<a *ngIf="(!menu.rootItem.route || menu.rootItem.route == '') && (menu.rootItem.url && menu.rootItem.url != '')"
[href]="menu.rootItem.url" class="uk-link" target="_blank">
<span><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
</a>
<span *ngIf="!menu.rootItem.route || menu.rootItem.route == ''"><span class="uk-margin-small-right uk-icon" [attr.uk-icon]=menu.ukIcon></span> {{menu.rootItem.title}}</span>
<ul *ngIf="menu.items.length > 0" class="uk-nav-sub uk-margin-left">
<li *ngFor="let item of menu.items" [class.uk-active]="isTheActiveMenu(item.rootItem.route, item.rootItem.params)">
<a *ngIf="item.rootItem.route && item.rootItem.route != ''" [routerLink]="item.rootItem.route" class="uk-link" [queryParams]=item.rootItem.params>
<span>{{item.rootItem.title}}</span>
</a>
<a *ngIf="(!item.rootItem.route || item.rootItem.route == '') && (item.rootItem.url && item.rootItem.url != '')"
[href]="item.rootItem.url" class="uk-link" target="_blank">
<span>{{item.rootItem.title}}</span>
</a>
<ul *ngIf="item.items.length > 0" class="uk-nav-sub uk-margin-left">
<li *ngFor="let subItem of item.items" [class.uk-active]="isTheActiveMenu(subItem.route, subItem.params)">
<a *ngIf="subItem.route && subItem.route != ''" [routerLink]="subItem.route" class="uk-link" [queryParams]=subItem.params>
<span>{{subItem.title}}</span>
</a>
<a *ngIf="(!subItem.route || subItem.route == '') && (subItem.url && subItem.url != '')"
[href]="subItem.url" class="uk-link" target="_blank">
<span>{{subItem.title}}</span>
</a>
<span *ngIf="!subItem.route || subItem.route == ''">{{subItem.title}}</span>
</li>
</ul>
</li>
</ul>
</li>
</ul>

View File

@ -1,37 +0,0 @@
import {Component, Input, OnInit} from '@angular/core';
import {SideMenuItem} from '../menu';
import {ActivatedRoute, Router} from '@angular/router';
import {Subscriber} from "rxjs";
@Component({
selector: 'sidebar',
templateUrl: 'sideBar.component.html'
})
export class SideBarComponent implements OnInit {
@Input() communityId: string = '';
@Input() menuItems: SideMenuItem[] = [];
currentParams: any = {};
sub;
constructor(private router: Router,
private route: ActivatedRoute) {
}
ngOnDestroy() {
if (this.sub instanceof Subscriber) {
this.sub.unsubscribe();
}
}
ngOnInit(): void {
this.sub = this.route.queryParams.subscribe(params => {
this.currentParams = params;
});
}
private getCurrentRoute(): string {
return this.router.url.split('?')[0];
}
isTheActiveMenu(route: string, params: any): boolean {
return route === this.getCurrentRoute() &&
(!params || JSON.stringify(this.currentParams) === JSON.stringify(params));
}
}

View File

@ -1,22 +0,0 @@
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {RouterModule} from "@angular/router";
import {SideBarComponent} from './sideBar.component';
@NgModule({
imports: [
CommonModule,
RouterModule
],
declarations: [
SideBarComponent
],
providers: [],
exports: [
SideBarComponent
]
})
export class SideBarModule {
}

View File

@ -7,8 +7,7 @@ import {properties} from "../../../environments/environment";
template: `
<div *ngIf="status.some(checkErrorCode(errorCodes.LOADING))"
[class]="(tab_error_class ? '' : 'uk-animation-fade') + ' uk-margin-top uk-width-1-1'" role="alert">
<span *ngIf="!dashboard" class="loading-gif uk-align-center"></span>
<loading *ngIf="dashboard"></loading>
<loading></loading>
</div>
<div *ngIf="status.every(checkErrorCode(errorCodes.NONE))"
[class]="(tab_error_class ? 'uk-margin-top' : 'uk-animation-fade') + ' uk-alert uk-alert-primary'" role="alert">No {{type}} available</div>
@ -43,7 +42,6 @@ import {properties} from "../../../environments/environment";
@Input() status: Array<number>;
@Input() type: string;
@Input() tab_error_class: boolean = false;
dashboard = properties.isDashboard;
public errorCodes:ErrorCodes;

View File

@ -11,8 +11,7 @@ declare var UIkit: any;
[ngClass]="classBody">
<div [ngClass]="classTitle" class="uk-modal-title" [hidden]=!alertHeader>
<button class="uk-modal-close-default uk-float-right" (click)='cancel()' uk-close></button>
<h4 *ngIf="!isDashboard" class="modal-title">{{alertTitle}}</h4>
<h6 *ngIf="isDashboard" class="uk-text-bold">{{alertTitle}}</h6>
<h4 class="modal-title">{{alertTitle}}</h4>
</div>
<div class="uk-margin">
<div *ngIf="message" [hidden]=!alertMessage [innerHTML]="message | safeHtml"></div>
@ -26,8 +25,7 @@ declare var UIkit: any;
<div [ngClass]="(choice)?'uk-width-1-2':'uk-width-1-1'">
<div *ngIf="alertFooter" class="uk-flex-right uk-grid uk-grid-small" uk-grid>
<span *ngIf="okButton" [class.uk-flex-last]="!okButtonLeft">
<button class="uk-button" [class.uk-button-primary]="!isDashboard"
[class.uk-button-secondary]="isDashboard" [class.outlined]="isDashboard" [disabled]="okDisabled"
<button class="uk-button uk-button-primary" [disabled]="okDisabled"
[class.uk-disabled]="okDisabled" (click)="ok()">{{okButtonText}}</button>
</span>
<span *ngIf="cancelButton">
@ -50,7 +48,6 @@ export class AlertModal {
@Input() classTitle: string = "";
@Input() classBody: string = "";
@Input() large: boolean = false;
isDashboard: boolean = properties.isDashboard;
/**
* Caption for the title.
*/