Fix zenodo loading. Change all pages in order to apply sticky in actions instead of header
This commit is contained in:
parent
206e3f5900
commit
d3b5889f7a
|
@ -1 +1 @@
|
||||||
Subproject commit 770c3fb3eff99ddab059f0de657f576443b01a7d
|
Subproject commit 3b6498cb2eb938f0ae1f60d9d9551ba1f4ba984d
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Organizations
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Organizations
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,8 +9,9 @@
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="organizations"></community-info>
|
<community-info tab="organizations"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-center uk-flex-right@m uk-margin-top">
|
<div class="uk-section-xsmall">
|
||||||
|
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||||
<button *ngIf="!organizationsEnabled" class="uk-button uk-button-default uk-margin-right" [class.uk-disabled]="loading"
|
<button *ngIf="!organizationsEnabled" class="uk-button uk-button-default uk-margin-right" [class.uk-disabled]="loading"
|
||||||
[disabled]="loading"
|
[disabled]="loading"
|
||||||
(click)="enableAffiliations()">Enable Organizations Page
|
(click)="enableAffiliations()">Enable Organizations Page
|
||||||
|
@ -22,6 +23,9 @@
|
||||||
<span class="uk-margin-small-left">New Organization</span>
|
<span class="uk-margin-small-left">New Organization</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="loading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
|
|
@ -32,7 +32,6 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
|
||||||
public page: number = 1;
|
public page: number = 1;
|
||||||
public pageSize: number = 10;
|
public pageSize: number = 10;
|
||||||
private subs: any[] = [];
|
private subs: any[] = [];
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
@ViewChild('affiliationModal') affiliationModal: AlertModal;
|
@ViewChild('affiliationModal') affiliationModal: AlertModal;
|
||||||
@ViewChild('removeAffiliationModal') removeAffiliationModal: AlertModal;
|
@ViewChild('removeAffiliationModal') removeAffiliationModal: AlertModal;
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,11 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'claims',
|
selector: 'claims',
|
||||||
template: `
|
template: `
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Personal Info &
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Links
|
||||||
Affiliations
|
|
||||||
</div>
|
</div>
|
||||||
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -32,7 +31,6 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
||||||
|
|
||||||
export class ClaimsComponent implements OnInit {
|
export class ClaimsComponent implements OnInit {
|
||||||
public community: CommunityInfo;
|
public community: CommunityInfo;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
claimsInfoURL: string;
|
claimsInfoURL: string;
|
||||||
externalPortalUrl = '';
|
externalPortalUrl = '';
|
||||||
subs: any[] = [];
|
subs: any[] = [];
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFie
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'community-info',
|
selector: 'community-info',
|
||||||
template: `
|
template: `
|
||||||
<ul *ngIf="community" class="uk-tab uk-flex uk-flex-center uk-flex-left@m" uk-tab>
|
<ul *ngIf="community" class="uk-tab uk-margin-top uk-flex uk-flex-center uk-flex-left@m" uk-tab>
|
||||||
<li [class.uk-active]="tab === 'profile'"><a routerLink="../profile">Profile</a></li>
|
<li [class.uk-active]="tab === 'profile'"><a routerLink="../profile">Profile</a></li>
|
||||||
<li [class.uk-active]="tab === 'organizations'"><a routerLink="../organizations">Organizations</a></li>
|
<li [class.uk-active]="tab === 'organizations'"><a routerLink="../organizations">Organizations</a></li>
|
||||||
<li [class.uk-active]="tab === 'projects'"><a routerLink="../projects">{{openAIREEntities.PROJECTS}}</a></li>
|
<li [class.uk-active]="tab === 'projects'"><a routerLink="../projects">{{openAIREEntities.PROJECTS}}</a></li>
|
||||||
|
|
|
@ -10,9 +10,9 @@ import {Subscription} from "rxjs";
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'community-profile',
|
selector: 'community-profile',
|
||||||
template: `
|
template: `
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Community
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Community
|
||||||
Profile
|
Profile
|
||||||
|
@ -22,18 +22,22 @@ import {Subscription} from "rxjs";
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="profile"></community-info>
|
<community-info tab="profile"></community-info>
|
||||||
</div>
|
</div>
|
||||||
|
<div actions>
|
||||||
|
<div class="uk-container uk-section-xsmall">
|
||||||
|
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||||
|
<button class="uk-button uk-button-default uk-margin-right"
|
||||||
|
(click)="reset()" [class.uk-disabled]="loading || !editCommunityComponent.dirty"
|
||||||
|
[disabled]="loading || !editCommunityComponent.dirty">Reset
|
||||||
|
</button>
|
||||||
|
<button class="uk-button uk-button-primary"
|
||||||
|
[class.uk-disabled]="loading || editCommunityComponent.disabled"
|
||||||
|
(click)="save()" [disabled]="loading || editCommunityComponent.disabled">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div class="uk-container">
|
<div class="uk-container">
|
||||||
<div class="uk-margin-top uk-flex uk-flex-center uk-flex-right@m">
|
|
||||||
<button class="uk-button uk-button-default uk-margin-right"
|
|
||||||
(click)="reset()" [class.uk-disabled]="loading || !editCommunityComponent.dirty"
|
|
||||||
[disabled]="loading || !editCommunityComponent.dirty">Reset
|
|
||||||
</button>
|
|
||||||
<button class="uk-button uk-button-primary"
|
|
||||||
[class.uk-disabled]="loading || editCommunityComponent.disabled"
|
|
||||||
(click)="save()" [disabled]="loading || editCommunityComponent.disabled">Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<div class="uk-position-relative" style="min-height: 60vh">
|
<div class="uk-position-relative" style="min-height: 60vh">
|
||||||
<div [class.hidden]="loading" class="uk-section uk-section-small">
|
<div [class.hidden]="loading" class="uk-section uk-section-small">
|
||||||
<edit-community #editCommunityComponent></edit-community>
|
<edit-community #editCommunityComponent></edit-community>
|
||||||
|
@ -55,8 +59,6 @@ export class ProfileComponent implements OnInit, OnDestroy {
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
@ViewChild('editCommunityComponent', {static: true}) editCommunityComponent: EditCommunityComponent;
|
@ViewChild('editCommunityComponent', {static: true}) editCommunityComponent: EditCommunityComponent;
|
||||||
|
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
|
|
||||||
constructor(private communityService: CommunityService,
|
constructor(private communityService: CommunityService,
|
||||||
private title: Title) {
|
private title: Title) {
|
||||||
}
|
}
|
||||||
|
@ -66,11 +68,9 @@ export class ProfileComponent implements OnInit, OnDestroy {
|
||||||
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||||
this.community = community;
|
this.community = community;
|
||||||
if (this.community) {
|
if (this.community) {
|
||||||
this.title.setTitle(this.community.communityId.toUpperCase() + " | Profile");
|
this.title.setTitle(this.community.shortTitle.toUpperCase() + " | Profile");
|
||||||
setTimeout(() => {
|
this.reset();
|
||||||
this.reset();
|
this.loading = false;
|
||||||
this.loading = false;
|
|
||||||
}, 200);
|
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -200,7 +200,6 @@ export class AddContentProvidersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
goTo(page: number = 1) {
|
goTo(page: number = 1) {
|
||||||
HelperFunctions.scroll();
|
|
||||||
this.openaireSearchUtils.page = page;
|
this.openaireSearchUtils.page = page;
|
||||||
this.openaireSearchUtils.status = this.errorCodes.LOADING;
|
this.openaireSearchUtils.status = this.errorCodes.LOADING;
|
||||||
this._getOpenaireContentProviders(this.queryParameters, page, this.resultsPerPage);
|
this._getOpenaireContentProviders(this.queryParameters, page, this.resultsPerPage);
|
||||||
|
|
|
@ -19,7 +19,7 @@ import {CriteriaComponent} from "./criteria/criteria.component";
|
||||||
template: `
|
template: `
|
||||||
<remove-content-providers #removeContentProviders (addContentProviders)="openAddContentProviders()"
|
<remove-content-providers #removeContentProviders (addContentProviders)="openAddContentProviders()"
|
||||||
[communityContentProviders]="communityContentProviders"
|
[communityContentProviders]="communityContentProviders"
|
||||||
[loading]="showLoadingInRemove" [community]="community" [disableAdd]="addContentProviders.loading"
|
[loading]="showLoadingInRemove" [community]="community"
|
||||||
(editCriteria)="openCriteria($event)"
|
(editCriteria)="openCriteria($event)"
|
||||||
(communityContentProvidersChanged)="communityContentProvidersChanged($event)">
|
(communityContentProvidersChanged)="communityContentProvidersChanged($event)">
|
||||||
</remove-content-providers>
|
</remove-content-providers>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage <span class="uk-text-capitalize">{{openAIREEntities.DATASOURCES}}</span>
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage <span class="uk-text-capitalize">{{openAIREEntities.DATASOURCES}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,20 +9,24 @@
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="content-providers"></community-info>
|
<community-info tab="content-providers"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
<div class="uk-section-xsmall">
|
||||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||||
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"
|
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"
|
||||||
<div>
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
<div>
|
||||||
[attr.uk-tooltip]="'<div><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '<span></span></div><div>The research results collected from the <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '</span> specified here will be automatically linked to your community dashboard.</div></div>'"
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
||||||
[disabled]="loading || disableAdd" [class.uk-disabled]="loading || disableAdd">
|
[attr.uk-tooltip]="'<div><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '<span></span></div><div>The research results collected from the <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '</span> specified here will be automatically linked to your community dashboard.</div></div>'"
|
||||||
<icon name="add" [flex]="true"></icon>
|
[disabled]="loading" [class.uk-disabled]="loading">
|
||||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New {{openAIREEntities.DATASOURCE}}</span>
|
<icon name="add" [flex]="true"></icon>
|
||||||
</button>
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New {{openAIREEntities.DATASOURCE}}</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="loading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
|
|
@ -31,14 +31,12 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
public errorCodes: ErrorCodes;
|
public errorCodes: ErrorCodes;
|
||||||
public openAIREEntities = OpenaireEntities;
|
public openAIREEntities = OpenaireEntities;
|
||||||
@Input() public loading: boolean = true;
|
@Input() public loading: boolean = true;
|
||||||
@Input() public disableAdd: boolean = false;
|
|
||||||
@Input() public community: CommunityInfo;
|
@Input() public community: CommunityInfo;
|
||||||
@Input() public communityContentProviders: ContentProvider[] = [];
|
@Input() public communityContentProviders: ContentProvider[] = [];
|
||||||
@Output() communityContentProvidersChanged = new EventEmitter();
|
@Output() communityContentProvidersChanged = new EventEmitter();
|
||||||
private properties: EnvProperties = properties;
|
private properties: EnvProperties = properties;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
private selectedCommunityContentProvider: any;
|
private selectedCommunityContentProvider: any;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
@ViewChild('deleteModal') deleteModal: AlertModal;
|
@ViewChild('deleteModal') deleteModal: AlertModal;
|
||||||
/** Criteria */
|
/** Criteria */
|
||||||
private fields = CriteriaUtils.fields;
|
private fields = CriteriaUtils.fields;
|
||||||
|
|
|
@ -1,198 +1,192 @@
|
||||||
<aside *ngIf="draftCustomizationOptions" id="sidebar_main">
|
<aside *ngIf="draftCustomizationOptions" id="sidebar_main">
|
||||||
<div id="sidebar_content">
|
<div id="sidebar_content">
|
||||||
<div class="menu_section uk-margin-top">
|
<div class="menu_section uk-margin-top">
|
||||||
<ul class="uk-list uk-nav uk-nav-default" uk-nav>
|
<ul class="uk-list uk-nav uk-nav-default" uk-nav>
|
||||||
<li>
|
<li>
|
||||||
<a>
|
<a>
|
||||||
<div (click)="close()" class="uk-flex uk-flex-middle uk-flex-center">
|
<div (click)="close()" class="uk-flex uk-flex-middle uk-flex-center">
|
||||||
<div class="uk-width-auto">
|
<div class="uk-width-auto">
|
||||||
<icon *ngIf="menuSelected.id != 'home'" class="menu-icon" name="west" ratio="2"
|
<icon *ngIf="menuSelected.id != 'home'" class="menu-icon" name="west" ratio="2"
|
||||||
[flex]="true"></icon>
|
[flex]="true"></icon>
|
||||||
<icon *ngIf="menuSelected.id == 'home'" class="menu-icon" name="close" ratio="2"
|
<icon *ngIf="menuSelected.id == 'home'" class="menu-icon" name="close" ratio="2"
|
||||||
[flex]="true"></icon>
|
[flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
class="uk-width-expand uk-text-truncate uk-margin-small-left uk-text-large">{{menuSelected.name}}</span>
|
class="uk-width-expand uk-text-truncate uk-margin-small-left uk-text-large">{{menuSelected.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="menu_section uk-margin-large-top">
|
<div class="menu_section uk-margin-large-top">
|
||||||
<ul *ngIf="menuSelected.id == 'home'" class="uk-list uk-nav uk-nav-default" uk-nav>
|
<ul *ngIf="menuSelected.id == 'home'" class="uk-list uk-nav uk-nav-default" uk-nav>
|
||||||
<ng-template ngFor [ngForOf]="sidebarItems" let-item let-i="index">
|
<ng-template ngFor [ngForOf]="sidebarItems" let-item let-i="index">
|
||||||
<li class="uk-visible-toggle" [class.uk-active]="menuSelected.id == item.id">
|
<li class="uk-visible-toggle" [class.uk-active]="menuSelected.id == item.id">
|
||||||
<a (click)="changeMenu(item)"
|
<a (click)="changeMenu(item)"
|
||||||
[title]="item.name">
|
[title]="item.name">
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-center">
|
<div class="uk-flex uk-flex-middle uk-flex-center">
|
||||||
<div *ngIf="item.icon" class="uk-width-auto">
|
<div *ngIf="item.icon" class="uk-width-auto">
|
||||||
<icon class="menu-icon" [name]="item.icon" [flex]="true"></icon>
|
<icon class="menu-icon" [name]="item.icon" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
class="uk-width-expand uk-text-truncate uk-margin-small-left">
|
class="uk-width-expand uk-text-truncate uk-margin-small-left">
|
||||||
{{item.name}}
|
{{item.name}}
|
||||||
</span>
|
</span>
|
||||||
<span uk-icon="triangle-right"></span>
|
<span uk-icon="triangle-right"></span>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ng-container *ngIf="menuSelected.id == 'identity'">
|
|
||||||
<ng-container
|
|
||||||
*ngTemplateOutlet="identityOptions ; context: { }"></ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="menuSelected.id == 'backgrounds'">
|
|
||||||
<ng-container
|
|
||||||
*ngTemplateOutlet="backgroundOptions ; context: { }"></ng-container>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="menuSelected.id == 'buttons'">
|
|
||||||
<ng-container
|
|
||||||
*ngTemplateOutlet="buttonOptions ; context: { }"></ng-container>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<ng-container *ngIf="menuSelected.id == 'identity'">
|
||||||
|
<ng-container
|
||||||
|
*ngTemplateOutlet="identityOptions ; context: { }"></ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="menuSelected.id == 'backgrounds'">
|
||||||
|
<ng-container
|
||||||
|
*ngTemplateOutlet="backgroundOptions ; context: { }"></ng-container>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="menuSelected.id == 'buttons'">
|
||||||
|
<ng-container
|
||||||
|
*ngTemplateOutlet="buttonOptions ; context: { }"></ng-container>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
<div *ngIf="draftCustomizationOptions" page-content>
|
<div *ngIf="draftCustomizationOptions" page-content>
|
||||||
<div header>
|
<div actions>
|
||||||
<div class="uk-padding uk-margin-bottom">
|
<div class="uk-section-small">
|
||||||
<ng-container
|
<ng-container *ngTemplateOutlet="applyResetButtons;"></ng-container>
|
||||||
*ngTemplateOutlet="applyResetButtons ; context: { }"></ng-container>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
</div>
|
||||||
<div class="uk-padding">
|
<div inner>
|
||||||
|
<div class="uk-section-small">
|
||||||
|
<div *ngIf="menuSelected.id == 'backgrounds'" class=" uk-padding-small ">
|
||||||
|
<div class="customizationMenuItems uk-margin-small">
|
||||||
|
<div class="uk-h4">Backgrounds</div>
|
||||||
|
<div>Note: Custom background style settings will override any identity settings that effect the
|
||||||
|
visualisation of a background.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-margin-large-top uk-margin-small-bottom uk-h5"> Quick look
|
||||||
|
|
||||||
<div *ngIf="menuSelected.id == 'backgrounds'" class=" uk-padding-small ">
|
</div>
|
||||||
<div class="customizationMenuItems uk-margin-small">
|
<quick-look-backgrounds [darkBackgroundColor]="draftCustomizationOptions.backgrounds.dark.color "
|
||||||
<div class="uk-h4">Backgrounds</div>
|
[lightBackgroundColor]="draftCustomizationOptions.backgrounds.light.color "
|
||||||
<div>Note: Custom background style settings will override any identity settings that effect the
|
[formBackgroundColor]="draftCustomizationOptions.backgrounds.form.color"
|
||||||
visualisation of a background.
|
[primaryColor]="draftCustomizationOptions.identity.mainColor"
|
||||||
</div>
|
[secondaryColor]="draftCustomizationOptions.identity.secondaryColor"
|
||||||
|
[buttonsOnDark]="draftCustomizationOptions.buttons.darkBackground"
|
||||||
|
[buttonsOnLight]="draftCustomizationOptions.buttons.lightBackground"
|
||||||
|
></quick-look-backgrounds>
|
||||||
|
|
||||||
<div class="uk-margin-large-top uk-margin-small-bottom uk-h5"> Quick look
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<quick-look-backgrounds [darkBackgroundColor]="draftCustomizationOptions.backgrounds.dark.color "
|
|
||||||
[lightBackgroundColor]="draftCustomizationOptions.backgrounds.light.color "
|
|
||||||
[formBackgroundColor]="draftCustomizationOptions.backgrounds.form.color"
|
|
||||||
[primaryColor]="draftCustomizationOptions.identity.mainColor"
|
|
||||||
[secondaryColor]="draftCustomizationOptions.identity.secondaryColor"
|
|
||||||
[buttonsOnDark]="draftCustomizationOptions.buttons.darkBackground"
|
|
||||||
[buttonsOnLight]="draftCustomizationOptions.buttons.lightBackground"
|
|
||||||
></quick-look-backgrounds>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="menuSelected.id == 'buttons'" class=" uk-padding-small ">
|
|
||||||
<div class="customizationMenuItems uk-margin-small">
|
|
||||||
<div class="uk-h4">Buttons</div>
|
|
||||||
<div>Note: Custom background style settings will override any identity settings that effect the
|
|
||||||
visualisation of a background.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="uk-margin-large-top uk-margin-small-bottom uk-h5"> Quick look
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<quick-look-backgrounds [darkBackgroundColor]="draftCustomizationOptions.backgrounds.dark.color "
|
|
||||||
[lightBackgroundColor]="draftCustomizationOptions.backgrounds.light.color "
|
|
||||||
[formBackgroundColor]="draftCustomizationOptions.backgrounds.form.color"
|
|
||||||
[primaryColor]="draftCustomizationOptions.identity.mainColor"
|
|
||||||
[secondaryColor]="draftCustomizationOptions.identity.secondaryColor"
|
|
||||||
[buttonsOnDark]="draftCustomizationOptions.buttons.darkBackground"
|
|
||||||
[buttonsOnLight]="draftCustomizationOptions.buttons.lightBackground"
|
|
||||||
[buttonView]="true"
|
|
||||||
></quick-look-backgrounds>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div *ngIf="menuSelected.id == 'identity'" class=" uk-padding-small ">
|
|
||||||
<div class=" customizationMenuItems uk-margin-small">
|
|
||||||
|
|
||||||
<div class="uk-h4">Identity</div>
|
|
||||||
<div>Note: Custom identity style settings will effect the visualisation of the whole gateway. That
|
|
||||||
includes <span class="uk-text-bold">buttons, links, tabs, backgrounds, etc.</span></div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class=" uk-padding-small ">
|
|
||||||
<div class="uk-margin-top uk-margin-small-bottom uk-h5">See a preview</div>
|
|
||||||
<div id="container" class=" uk-flex uk-flex-center uk-flex-middle">
|
|
||||||
<div id="iframecontainer" class="">
|
|
||||||
<div class="uk-height-1-1">
|
|
||||||
<div class=" uk-width-1-1 refresh-indicator">
|
|
||||||
<div class="uk-position-relative uk-height-1-1">
|
|
||||||
<div class="uk-position-center uk-text-center clickable uk-h3" style="color:white"
|
|
||||||
(click)="applyLayout()">
|
|
||||||
<div>
|
|
||||||
<icon name="refresh" ratio="2.5"></icon>
|
|
||||||
</div>
|
|
||||||
<div class="uk-margin-medium-top">Style has been changed.</div>
|
|
||||||
<div class="uk-margin-top"> Click to refresh the view.</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<iframe *ngIf="previewUrl" [src]="previewUrl" class="uk-width-1-1 "
|
|
||||||
style=" border-radius: 10px;"
|
|
||||||
></iframe>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div *ngIf="menuSelected.id == 'buttons'" class=" uk-padding-small ">
|
||||||
|
<div class="customizationMenuItems uk-margin-small">
|
||||||
|
<div class="uk-h4">Buttons</div>
|
||||||
|
<div>Note: Custom background style settings will override any identity settings that effect the
|
||||||
|
visualisation of a background.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="uk-margin-large-top uk-margin-small-bottom uk-h5"> Quick look
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<quick-look-backgrounds [darkBackgroundColor]="draftCustomizationOptions.backgrounds.dark.color "
|
||||||
|
[lightBackgroundColor]="draftCustomizationOptions.backgrounds.light.color "
|
||||||
|
[formBackgroundColor]="draftCustomizationOptions.backgrounds.form.color"
|
||||||
|
[primaryColor]="draftCustomizationOptions.identity.mainColor"
|
||||||
|
[secondaryColor]="draftCustomizationOptions.identity.secondaryColor"
|
||||||
|
[buttonsOnDark]="draftCustomizationOptions.buttons.darkBackground"
|
||||||
|
[buttonsOnLight]="draftCustomizationOptions.buttons.lightBackground"
|
||||||
|
[buttonView]="true"
|
||||||
|
></quick-look-backgrounds>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div *ngIf="menuSelected.id == 'identity'" class=" uk-padding-small ">
|
||||||
|
<div class=" customizationMenuItems uk-margin-small">
|
||||||
|
|
||||||
|
<div class="uk-h4">Identity</div>
|
||||||
|
<div>Note: Custom identity style settings will effect the visualisation of the whole gateway. That
|
||||||
|
includes <span class="uk-text-bold">buttons, links, tabs, backgrounds, etc.</span></div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="uk-padding-small">
|
||||||
|
<div class="uk-margin-top uk-margin-small-bottom uk-h5">See a preview</div>
|
||||||
|
<div id="container" class=" uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
<div id="iframecontainer" class="">
|
||||||
|
<div class="uk-height-1-1">
|
||||||
|
<div class=" uk-width-1-1 refresh-indicator">
|
||||||
|
<div class="uk-position-relative uk-height-1-1">
|
||||||
|
<div class="uk-position-center uk-text-center clickable uk-h3" style="color:white"
|
||||||
|
(click)="applyLayout()">
|
||||||
|
<div>
|
||||||
|
<icon name="refresh" ratio="2.5"></icon>
|
||||||
|
</div>
|
||||||
|
<div class="uk-margin-medium-top">Style has been changed.</div>
|
||||||
|
<div class="uk-margin-top"> Click to refresh the view.</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<iframe *ngIf="previewUrl" [src]="previewUrl" class="uk-width-1-1 "
|
||||||
|
style=" border-radius: 10px;"
|
||||||
|
></iframe>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-template #identityOptions>
|
<ng-template #identityOptions>
|
||||||
<div class="functionalities-container">
|
<div class="functionalities-container">
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<div class="">
|
<div class="">
|
||||||
<span>Custom style</span>
|
<span>Custom style</span>
|
||||||
<mat-slide-toggle class="uk-margin-large-left"
|
<mat-slide-toggle class="uk-margin-large-left"
|
||||||
[checked]="draftCustomizationOptions.identityIsCustom"
|
[checked]="draftCustomizationOptions.identityIsCustom"
|
||||||
(change)="draftCustomizationOptions.identityIsCustom =
|
(change)="draftCustomizationOptions.identityIsCustom =
|
||||||
!draftCustomizationOptions.identityIsCustom;
|
!draftCustomizationOptions.identityIsCustom;
|
||||||
draftCustomizationOptions.identityIsCustom?'':this.resetIdentityToDefault();"
|
draftCustomizationOptions.identityIsCustom?'':this.resetIdentityToDefault();"
|
||||||
[attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
|
[attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
|
||||||
(draftCustomizationOptions.identityIsCustom?'Change to default identity values':'Customize identity colors')+'</div>'"
|
(draftCustomizationOptions.identityIsCustom?'Change to default identity values':'Customize identity colors')+'</div>'"
|
||||||
>
|
>
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div *ngIf="draftCustomizationOptions.identityIsCustom" class=" uk-margin-large-top">
|
|
||||||
<div class=" uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold">
|
|
||||||
Colors
|
|
||||||
<a *ngIf="hasChanges(publishedCustomizationOptions.identity, draftCustomizationOptions.identity) &&
|
|
||||||
draftCustomizationOptions.identityIsCustom" class="uk-margin-small-left"
|
|
||||||
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
|
||||||
(click)="resetIdentityToPublished();">
|
|
||||||
<icon name="reset"></icon>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<color [color]="draftCustomizationOptions.identity.mainColor" [light]="false" (colorChange)=
|
|
||||||
" draftCustomizationOptions.identity.mainColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()"
|
|
||||||
label="Primary"></color>
|
|
||||||
<color [color]="draftCustomizationOptions.identity.secondaryColor" [light]="false" (colorChange)=
|
|
||||||
" draftCustomizationOptions.identity.secondaryColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()"
|
|
||||||
label="Secondary"></color>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="draftCustomizationOptions.identityIsCustom" class=" uk-margin-large-top">
|
||||||
|
<div class=" uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold">
|
||||||
|
Colors
|
||||||
|
<a *ngIf="hasChanges(publishedCustomizationOptions.identity, draftCustomizationOptions.identity) &&
|
||||||
|
draftCustomizationOptions.identityIsCustom" class="uk-margin-small-left"
|
||||||
|
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
||||||
|
(click)="resetIdentityToPublished();">
|
||||||
|
<icon name="reset"></icon>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<color [color]="draftCustomizationOptions.identity.mainColor" [light]="false" (colorChange)=
|
||||||
|
" draftCustomizationOptions.identity.mainColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()"
|
||||||
|
label="Primary"></color>
|
||||||
|
<color [color]="draftCustomizationOptions.identity.secondaryColor" [light]="false" (colorChange)=
|
||||||
|
" draftCustomizationOptions.identity.secondaryColor= $event; updateBackgroundsAndButtonsBasedOnIdentity()"
|
||||||
|
label="Secondary"></color>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #backgroundOptions>
|
<ng-template #backgroundOptions>
|
||||||
<div class="functionalities-container">
|
<div class="functionalities-container">
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<span>Custom style </span>
|
<span>Custom style </span>
|
||||||
<span>
|
<span>
|
||||||
<mat-slide-toggle class="uk-margin-large-left"
|
<mat-slide-toggle class="uk-margin-large-left"
|
||||||
[checked]="draftCustomizationOptions.backgroundsIsCustom"
|
[checked]="draftCustomizationOptions.backgroundsIsCustom"
|
||||||
(change)="draftCustomizationOptions.backgroundsIsCustom=!draftCustomizationOptions.backgroundsIsCustom;
|
(change)="draftCustomizationOptions.backgroundsIsCustom=!draftCustomizationOptions.backgroundsIsCustom;
|
||||||
|
@ -202,105 +196,108 @@
|
||||||
>
|
>
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="draftCustomizationOptions.backgroundsIsCustom" class=" uk-overflow-auto" style="max-height: 50vh">
|
<div *ngIf="draftCustomizationOptions.backgroundsIsCustom" class=" uk-overflow-auto" style="max-height: 50vh">
|
||||||
|
|
||||||
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
||||||
Colors
|
Colors
|
||||||
<a *ngIf="(
|
<a *ngIf="(
|
||||||
hasChanges(publishedCustomizationOptions.backgrounds.light, draftCustomizationOptions.backgrounds.light)||
|
hasChanges(publishedCustomizationOptions.backgrounds.light, draftCustomizationOptions.backgrounds.light)||
|
||||||
hasChanges(publishedCustomizationOptions.backgrounds.dark, draftCustomizationOptions.backgrounds.dark)||
|
hasChanges(publishedCustomizationOptions.backgrounds.dark, draftCustomizationOptions.backgrounds.dark)||
|
||||||
hasChanges(publishedCustomizationOptions.backgrounds.form.color, draftCustomizationOptions.backgrounds.form.color))
|
hasChanges(publishedCustomizationOptions.backgrounds.form.color, draftCustomizationOptions.backgrounds.form.color))
|
||||||
&& draftCustomizationOptions.backgroundsIsCustom"
|
&& draftCustomizationOptions.backgroundsIsCustom"
|
||||||
(click)="resetBackgroundsTo(publishedCustomizationOptions.backgrounds);"
|
(click)="resetBackgroundsTo(publishedCustomizationOptions.backgrounds);"
|
||||||
class="uk-margin-small-left"
|
class="uk-margin-small-left"
|
||||||
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
||||||
>
|
>
|
||||||
<icon name="reset"></icon>
|
<icon name="reset"></icon>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<background label="Dark" [background]="draftCustomizationOptions.backgrounds.dark"
|
<background label="Dark" [background]="draftCustomizationOptions.backgrounds.dark"
|
||||||
[light]="false"></background>
|
[light]="false"></background>
|
||||||
<background label="Light" [background]="draftCustomizationOptions.backgrounds.light"
|
<background label="Light" [background]="draftCustomizationOptions.backgrounds.light"
|
||||||
[light]="true"></background>
|
[light]="true"></background>
|
||||||
<background label="Form" [background]="draftCustomizationOptions.backgrounds.form"
|
<background label="Form" [background]="draftCustomizationOptions.backgrounds.form"
|
||||||
[light]="true"
|
[light]="true"
|
||||||
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
||||||
[communityId]="communityId"></background>
|
[communityId]="communityId"></background>
|
||||||
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
<div class="uk-margin-xsmall-bottom uk-text-uppercase uk-text-meta uk-text-bold uk-margin-large-top">
|
||||||
Image
|
Image
|
||||||
<a *ngIf="(formHasChanges(publishedCustomizationOptions, draftCustomizationOptions) )
|
<a *ngIf="(formHasChanges(publishedCustomizationOptions, draftCustomizationOptions) )
|
||||||
&& draftCustomizationOptions.backgroundsIsCustom"
|
&& draftCustomizationOptions.backgroundsIsCustom"
|
||||||
(click)="resetImageTo(publishedCustomizationOptions.backgrounds);" class="uk-margin-small-left"
|
(click)="resetImageTo(publishedCustomizationOptions.backgrounds);" class="uk-margin-small-left"
|
||||||
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
uk-tooltip="title:<div class='uk-padding-small uk-width-large'>Reset to previously saved options</div>"
|
||||||
>
|
>
|
||||||
<icon name="reset"></icon>
|
<icon name="reset"></icon>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<background-upload label="Form" [background]="draftCustomizationOptions.backgrounds.form"
|
<background-upload label="Form" [background]="draftCustomizationOptions.backgrounds.form"
|
||||||
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
[oldBackground]="publishedCustomizationOptions.backgrounds.form"
|
||||||
[communityId]="communityId"></background-upload>
|
[communityId]="communityId"></background-upload>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #buttonOptions>
|
<ng-template #buttonOptions>
|
||||||
<div class="functionalities-container">
|
<div class="functionalities-container">
|
||||||
<div class="">
|
<div class="">
|
||||||
<div class="uk-margin-top uk-margin-large-bottom">
|
<div class="uk-margin-top uk-margin-large-bottom">
|
||||||
<span>Custom style </span>
|
<span>Custom style </span>
|
||||||
<span>
|
<span>
|
||||||
<mat-slide-toggle class="uk-margin-large-left"
|
<mat-slide-toggle class="uk-margin-large-left"
|
||||||
[checked]="draftCustomizationOptions.buttonsIsCustom"
|
[checked]="draftCustomizationOptions.buttonsIsCustom"
|
||||||
(change)="draftCustomizationOptions.buttonsIsCustom=!draftCustomizationOptions.buttonsIsCustom;
|
(change)="draftCustomizationOptions.buttonsIsCustom=!draftCustomizationOptions.buttonsIsCustom;
|
||||||
draftCustomizationOptions.buttonsIsCustom?'':this.resetBackgroundsAndButtonsToDefault(); "
|
draftCustomizationOptions.buttonsIsCustom?'':this.resetBackgroundsAndButtonsToDefault(); "
|
||||||
[attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
|
[attr.uk-tooltip]="'title:<div class=\'uk-padding-small uk-width-large\'>' +
|
||||||
(draftCustomizationOptions.buttonsIsCustom?'Change to default values produced based on the identity colors':'Customize options for background and buttons')+'</div>'"
|
(draftCustomizationOptions.buttonsIsCustom?'Change to default values produced based on the identity colors':'Customize options for background and buttons')+'</div>'"
|
||||||
>
|
>
|
||||||
</mat-slide-toggle>
|
</mat-slide-toggle>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="draftCustomizationOptions.buttonsIsCustom">
|
<ng-container *ngIf="draftCustomizationOptions.buttonsIsCustom">
|
||||||
|
|
||||||
<div class="uk-margin-top uk-margin-large-bottom uk-grid uk-flex uk-flex-middle">
|
<div class="uk-margin-top uk-margin-large-bottom uk-grid uk-flex uk-flex-middle">
|
||||||
<div class="uk-text-uppercase uk-text-bold uk-text-meta uk-margin-right">style on</div>
|
<div class="uk-text-uppercase uk-text-bold uk-text-meta uk-margin-right">style on</div>
|
||||||
<div class="uk-width-expand uk-padding-remove-left " inputClass="inner x-small" input type="select"
|
<div class="uk-width-expand uk-padding-remove-left " inputClass="inner x-small" input type="select"
|
||||||
[(value)]="buttonsSelected"
|
[(value)]="buttonsSelected"
|
||||||
[options]="[{value: 'dark',label:'Dark BG'},{value: 'light',label:'Light BG'}]">
|
[options]="[{value: 'dark',label:'Dark BG'},{value: 'light',label:'Light BG'}]">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="functionalities-border uk-overflow-auto" style="max-height: 50vh">
|
|
||||||
<ng-container *ngIf="buttonsSelected == 'dark'">
|
|
||||||
<customize-buttons
|
|
||||||
[buttons]="draftCustomizationOptions.buttons.darkBackground" [light]="true"
|
|
||||||
[buttonsPublished]="publishedCustomizationOptions.buttons.darkBackground"
|
|
||||||
></customize-buttons>
|
|
||||||
</ng-container>
|
|
||||||
<ng-container *ngIf="buttonsSelected == 'light'">
|
|
||||||
<customize-buttons
|
|
||||||
[buttons]="draftCustomizationOptions.buttons.lightBackground" [light]="false"
|
|
||||||
[buttonsPublished]="publishedCustomizationOptions.buttons.lightBackground"
|
|
||||||
></customize-buttons>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="functionalities-border uk-overflow-auto" style="max-height: 50vh">
|
||||||
|
<ng-container *ngIf="buttonsSelected == 'dark'">
|
||||||
|
<customize-buttons
|
||||||
|
[buttons]="draftCustomizationOptions.buttons.darkBackground" [light]="true"
|
||||||
|
[buttonsPublished]="publishedCustomizationOptions.buttons.darkBackground"
|
||||||
|
></customize-buttons>
|
||||||
|
</ng-container>
|
||||||
|
<ng-container *ngIf="buttonsSelected == 'light'">
|
||||||
|
<customize-buttons
|
||||||
|
[buttons]="draftCustomizationOptions.buttons.lightBackground" [light]="false"
|
||||||
|
[buttonsPublished]="publishedCustomizationOptions.buttons.lightBackground"
|
||||||
|
></customize-buttons>
|
||||||
|
</ng-container>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template #applyResetButtons>
|
<ng-template #applyResetButtons>
|
||||||
<button class="uk-float-right uk-button uk-margin-left uk-button-primary "
|
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||||
[disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
<button class="uk-button uk-button-secondary"
|
||||||
[title]="(hasChanges(publishedCustomizationOptions, draftCustomizationOptions)?'Save changes':'No changes to save')"
|
|
||||||
(click)="saveLayout()">
|
|
||||||
Publish
|
|
||||||
</button>
|
|
||||||
<button class="uk-float-right uk-button uk-margin-left uk-button-secondary outlined"
|
|
||||||
[disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
[disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
||||||
|
[class.uk-disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
||||||
(click)="resetLayout()">
|
(click)="resetLayout()">
|
||||||
|
|
||||||
<span>Reset all</span>
|
<span>Reset all</span>
|
||||||
</button>
|
</button>
|
||||||
|
<button class="uk-button uk-margin-left uk-button-primary"
|
||||||
|
[disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
||||||
|
[class.uk-disabled]="!hasChanges(publishedCustomizationOptions, draftCustomizationOptions)"
|
||||||
|
[title]="(hasChanges(publishedCustomizationOptions, draftCustomizationOptions)?'Save changes':'No changes to save')"
|
||||||
|
(click)="saveLayout()">
|
||||||
|
Publish
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<modal-alert #leaveModal [overflowBody]="false" (alertOutput)="confirmClose()" ></modal-alert>
|
<modal-alert #leaveModal [overflowBody]="false" (alertOutput)="confirmClose()" ></modal-alert>
|
||||||
|
|
|
@ -18,9 +18,9 @@ type Tab = 'all' | 'communities' | 'ris';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'manage-communities',
|
selector: 'manage-communities',
|
||||||
template: `
|
template: `
|
||||||
<div page-content [id]="tab" (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content [id]="tab">
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">
|
||||||
Admin Dashboard - Manage Communities
|
Admin Dashboard - Manage Communities
|
||||||
|
@ -36,12 +36,16 @@ type Tab = 'all' | 'communities' | 'ris';
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-margin-top">
|
<div class="uk-section-xsmall">
|
||||||
<div search-input [searchControl]="filterForm.get('keyword')" [expandable]="true"
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle">
|
||||||
placeholder="Search Communities" searchInputClass="outer"
|
<div search-input [searchControl]="filterForm.get('keyword')" [expandable]="true"
|
||||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-right"></div>
|
placeholder="Search Communities" searchInputClass="outer"
|
||||||
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-right"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="loading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
@ -114,7 +118,6 @@ export class ManageCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
public filteredRis: CommunityInfo[] = [];
|
public filteredRis: CommunityInfo[] = [];
|
||||||
public loading: boolean;
|
public loading: boolean;
|
||||||
public user: User;
|
public user: User;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
public tab: Tab = "all";
|
public tab: Tab = "all";
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
public communitySearchUtils: SearchUtilsClass = new SearchUtilsClass();
|
public communitySearchUtils: SearchUtilsClass = new SearchUtilsClass();
|
||||||
|
|
|
@ -269,7 +269,6 @@ export class AddProjectsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
goTo(page: number = 1, refineQuery: boolean = true) {
|
goTo(page: number = 1, refineQuery: boolean = true) {
|
||||||
HelperFunctions.scroll();
|
|
||||||
this.openaireSearchUtils.page = page;
|
this.openaireSearchUtils.page = page;
|
||||||
this.openaireSearchUtils.status = this.errorCodes.LOADING;
|
this.openaireSearchUtils.status = this.errorCodes.LOADING;
|
||||||
if(refineQuery) {
|
if(refineQuery) {
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {CommunityService} from "../../openaireLibrary/connect/community/communit
|
||||||
selector: 'manage-projects',
|
selector: 'manage-projects',
|
||||||
template: `
|
template: `
|
||||||
<remove-projects #removeProjectsComponent (addProjects)="openAddProjects()" [communityProjects]="communityProjects"
|
<remove-projects #removeProjectsComponent (addProjects)="openAddProjects()" [communityProjects]="communityProjects"
|
||||||
[loading]="showLoadingInRemove" [community]="community" [disableAdd]="addProjects.loading"
|
[loading]="showLoadingInRemove" [community]="community"
|
||||||
(communityProjectsChanged)="communityProjectsChanged($event)">
|
(communityProjectsChanged)="communityProjectsChanged($event)">
|
||||||
</remove-projects>
|
</remove-projects>
|
||||||
<fs-modal #fsModalProjects>
|
<fs-modal #fsModalProjects>
|
||||||
|
@ -33,7 +33,6 @@ export class ManageProjectsComponent implements OnInit {
|
||||||
@ViewChild('fsModalProjects', { static: true }) fullscreen: FullScreenModalComponent;
|
@ViewChild('fsModalProjects', { static: true }) fullscreen: FullScreenModalComponent;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
public showLoadingInRemove: boolean = true;
|
public showLoadingInRemove: boolean = true;
|
||||||
|
|
||||||
public body: string = "Send from page";
|
public body: string = "Send from page";
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
public community: CommunityInfo = null;
|
public community: CommunityInfo = null;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage {{openaireEntiites.PROJECTS}}
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage {{openaireEntiites.PROJECTS}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,31 +9,34 @@
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="projects"></community-info>
|
<community-info tab="projects"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top">
|
<div class="uk-section-xsmall">
|
||||||
<div class="uk-width-expand@m uk-width-1-1 uk-grid uk-flex-middle uk-flex-right@m uk-flex-center uk-margin-remove-left" uk-grid>
|
<div class="uk-flex uk-flex-middle">
|
||||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
<div class="uk-width-expand@m uk-width-1-1 uk-grid uk-flex-middle uk-flex-right@m uk-flex-center uk-margin-remove-left" uk-grid>
|
||||||
placeholder="Search project" [disabled]="loading"
|
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
placeholder="Search project" [disabled]="loading"
|
||||||
<div>
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
<div>
|
||||||
(click)="addNew()"
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||||
[attr.uk-tooltip]="('cls: uk-active; ') +
|
(click)="addNew()"
|
||||||
|
[attr.uk-tooltip]="('cls: uk-active; ') +
|
||||||
'title: <div class=\'uk-margin-bottom uk-text-bold\'> Search and add more '+openaireEntiites.PROJECTS+'</div>' +
|
'title: <div class=\'uk-margin-bottom uk-text-bold\'> Search and add more '+openaireEntiites.PROJECTS+'</div>' +
|
||||||
'<div>The research results linked to the <span class=\'uk-text-lowercase\'>'+openaireEntiites.PROJECTS +
|
'<div>The research results linked to the <span class=\'uk-text-lowercase\'>'+openaireEntiites.PROJECTS +
|
||||||
'</span> specified here will be automatically linked to your <span class=\'uk-text-lowercase\'>'+openaireEntiites.COMMUNITY+'</span> dashboard.</div>'"
|
'</span> specified here will be automatically linked to your <span class=\'uk-text-lowercase\'>'+openaireEntiites.COMMUNITY+'</span> dashboard.</div>'"
|
||||||
[disabled]="loading || disableAdd" [class.uk-disabled]="loading || disableAdd">
|
[disabled]="loading" [class.uk-disabled]="loading">
|
||||||
<icon name="add" [flex]="true"></icon>
|
<icon name="add" [flex]="true"></icon>
|
||||||
<span class="uk-margin-small-left">New {{openaireEntiites.PROJECT}}</span>
|
<span class="uk-margin-small-left">New {{openaireEntiites.PROJECT}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<results-and-pages [type]="openaireEntiites.PROJECTS | lowercase" [page]="page" [pageSize]="resultsPerPage"
|
<results-and-pages [type]="openaireEntiites.PROJECTS | lowercase" [page]="page" [pageSize]="resultsPerPage"
|
||||||
[totalResults]="previewCommunityProjects.length"></results-and-pages>
|
[totalResults]="previewCommunityProjects.length"></results-and-pages>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
|
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
|
||||||
<div *ngIf="allOptions.length > 0">
|
<div *ngIf="allOptions.length > 0">
|
||||||
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
|
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
|
||||||
|
|
|
@ -8,9 +8,6 @@ import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properti
|
||||||
import {ManageCommunityProjectsService} from '../../services/manageProjects.service';
|
import {ManageCommunityProjectsService} from '../../services/manageProjects.service';
|
||||||
import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service';
|
import {SearchCommunityProjectsService} from '../../openaireLibrary/connect/projects/searchProjects.service';
|
||||||
import {RouterHelper} from '../../openaireLibrary/utils/routerHelper.class';
|
import {RouterHelper} from '../../openaireLibrary/utils/routerHelper.class';
|
||||||
|
|
||||||
import {Session} from '../../openaireLibrary/login/utils/helper.class';
|
|
||||||
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
|
|
||||||
import {FormArray, FormBuilder, FormGroup} from "@angular/forms";
|
import {FormArray, FormBuilder, FormGroup} from "@angular/forms";
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||||
|
@ -20,24 +17,21 @@ import {DropdownFilterComponent} from "../../openaireLibrary/utils/dropdown-filt
|
||||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
||||||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||||
|
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
||||||
declare var UIkit;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'remove-projects',
|
selector: 'remove-projects',
|
||||||
templateUrl: './remove-projects.component.html'
|
templateUrl: './remove-projects.component.html'
|
||||||
})
|
})
|
||||||
|
|
||||||
export class RemoveProjectsComponent implements OnInit {
|
export class RemoveProjectsComponent implements OnInit {
|
||||||
@Input() public community: CommunityInfo;
|
@Input() public community: CommunityInfo;
|
||||||
@Input() public loading: boolean = true;
|
@Input() public loading: boolean = true;
|
||||||
@Input() public disableAdd: boolean = false;
|
|
||||||
@Output() addProjects: EventEmitter<void> = new EventEmitter();
|
@Output() addProjects: EventEmitter<void> = new EventEmitter();
|
||||||
|
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
private projectUrl = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToProject.split("?")[0];
|
public projectUrl = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToProject.split("?")[0];
|
||||||
|
|
||||||
@Output() communityProjectsChanged = new EventEmitter();
|
@Output() communityProjectsChanged = new EventEmitter();
|
||||||
@Input() public communityProjects = [];
|
@Input() public communityProjects = [];
|
||||||
|
@ -70,8 +64,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
{label: "Funder ", value: {sort: "funder", descending: false}}
|
{label: "Funder ", value: {sort: "funder", descending: false}}
|
||||||
];
|
];
|
||||||
|
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
|
|
||||||
public openaireEntiites = OpenaireEntities;
|
public openaireEntiites = OpenaireEntities;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private _router: Router,
|
constructor(private route: ActivatedRoute, private _router: Router,
|
||||||
|
@ -130,19 +122,6 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public inCommunity(result: any): any {
|
|
||||||
let found = false;
|
|
||||||
for (let project of this.communityProjects) {
|
|
||||||
if (project.opeaireId == result.id) {
|
|
||||||
return true;
|
|
||||||
} else if (result['title'].name.search("(" + project.grantId + ")") != -1 && result.funderShortname == project.funder) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
totalPages(): number {
|
totalPages(): number {
|
||||||
let totalPages: any = this.communitySearchUtils.totalResults / (this.resultsPerPage);
|
let totalPages: any = this.communitySearchUtils.totalResults / (this.resultsPerPage);
|
||||||
if (!(Number.isInteger(totalPages))) {
|
if (!(Number.isInteger(totalPages))) {
|
||||||
|
@ -156,19 +135,11 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
data => {
|
data => {
|
||||||
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
|
let index = this.communityProjects.indexOf(this.selectedCommunityProject);
|
||||||
this.communityProjects.splice(index, 1);
|
this.communityProjects.splice(index, 1);
|
||||||
|
|
||||||
this.applyFilters();
|
this.applyFilters();
|
||||||
|
NotificationHandler.rise(OpenaireEntities.PROJECT+' successfully removed!');
|
||||||
UIkit.notification(OpenaireEntities.PROJECT+' successfully removed!', {
|
|
||||||
status: 'success',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.communityProjectsChanged.emit({
|
this.communityProjectsChanged.emit({
|
||||||
value: this.communityProjects,
|
value: this.communityProjects,
|
||||||
});
|
});
|
||||||
|
|
||||||
this.communitySearchUtils.totalResults--;
|
this.communitySearchUtils.totalResults--;
|
||||||
this.communitySearchUtils.page = 1;
|
this.communitySearchUtils.page = 1;
|
||||||
},
|
},
|
||||||
|
@ -271,10 +242,8 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
|
|
||||||
public applyFilters() {
|
public applyFilters() {
|
||||||
this.previewCommunityProjects = this.communityProjects.filter(project => {
|
this.previewCommunityProjects = this.communityProjects.filter(project => {
|
||||||
let return_value: boolean = (this.filterCommunityProjectByKeyword(project) && this.filterCommunityProjectByFunder(project));
|
return (this.filterCommunityProjectByKeyword(project) && this.filterCommunityProjectByFunder(project));
|
||||||
return return_value;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// check paging here!!!
|
// check paging here!!!
|
||||||
if (this.previewCommunityProjects.slice((this.page - 1) * this.resultsPerPage, this.page * this.resultsPerPage).length == 0) {
|
if (this.previewCommunityProjects.slice((this.page - 1) * this.resultsPerPage, this.page * this.resultsPerPage).length == 0) {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
|
@ -284,10 +253,8 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public filterCommunityProjectByKeyword(project): boolean {
|
public filterCommunityProjectByKeyword(project): boolean {
|
||||||
const textFlag = this.searchText.toString() === ''
|
return this.searchText.toString() === ''
|
||||||
|| ((project.name + " " + project.acronym + " " + project.grantId + " " + project.funder)).match(this.searchText) != null;
|
|| ((project.name + " " + project.acronym + " " + project.grantId + " " + project.funder)).match(this.searchText) != null;
|
||||||
|
|
||||||
return textFlag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public filterCommunityProjectByFunder(project): boolean {
|
public filterCommunityProjectByFunder(project): boolean {
|
||||||
|
@ -340,11 +307,7 @@ export class RemoveProjectsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string) {
|
handleError(message: string) {
|
||||||
UIkit.notification(message, {
|
NotificationHandler.rise(message, 'danger');
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
select(value: string, event, dropdownFilter: DropdownFilterComponent) {
|
select(value: string, event, dropdownFilter: DropdownFilterComponent) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Subjects
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Subjects
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,26 +9,30 @@
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="subjects"></community-info>
|
<community-info tab="subjects"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
<div class="uk-section-xsmall">
|
||||||
<div [disabled]="showLoading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
||||||
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
|
<div [disabled]="showLoading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
||||||
</div>
|
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
|
||||||
<!-- <a *ngIf="!subjectsEnabled" (click)="enablePage()" class="uk-link-heading uk-text-small uk-text-uppercase"
|
</div>
|
||||||
uk-tooltip="title:<div class='uk-padding-small'>This information will be visible in <b>Subjects page</b> of Research Community Dashboard, which is <b>disabled</b>. <br> Click to enable id.</div>">
|
<!-- <a *ngIf="!subjectsEnabled" (click)="enablePage()" class="uk-link-heading uk-text-small uk-text-uppercase"
|
||||||
<span class="uk-text-secondary"><icon name="check_circle_outlined"></icon></span>
|
uk-tooltip="title:<div class='uk-padding-small'>This information will be visible in <b>Subjects page</b> of Research Community Dashboard, which is <b>disabled</b>. <br> Click to enable id.</div>">
|
||||||
Enable page
|
<span class="uk-text-secondary"><icon name="check_circle_outlined"></icon></span>
|
||||||
</a>-->
|
Enable page
|
||||||
<div>
|
</a>-->
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
<div>
|
||||||
[disabled]="showLoading" [class.uk-disabled]="showLoading"
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||||
(click)="newSubject()"
|
[disabled]="showLoading" [class.uk-disabled]="showLoading"
|
||||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add new subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
(click)="newSubject()"
|
||||||
<icon name="add" [flex]="true"></icon>
|
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add new subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||||
<span class="uk-margin-small-left">New Subject</span>
|
<icon name="add" [flex]="true"></icon>
|
||||||
</button>
|
<span class="uk-margin-small-left">New Subject</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="showLoading" class="uk-position-center">
|
<div *ngIf="showLoading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
|
|
@ -15,14 +15,12 @@ import {CommunityInfo} from '../../../openaireLibrary/connect/community/communit
|
||||||
import {concat} from 'rxjs/operators';
|
import {concat} from 'rxjs/operators';
|
||||||
import {FullScreenModalComponent} from 'src/app/openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component';
|
import {FullScreenModalComponent} from 'src/app/openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component';
|
||||||
import {HelperFunctions} from 'src/app/openaireLibrary/utils/HelperFunctions.class';
|
import {HelperFunctions} from 'src/app/openaireLibrary/utils/HelperFunctions.class';
|
||||||
|
import {NotificationHandler} from "../../../openaireLibrary/utils/notification-handler";
|
||||||
declare var UIkit;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'subjects-edit-form',
|
selector: 'subjects-edit-form',
|
||||||
templateUrl: './subjects-edit-form.component.html',
|
templateUrl: './subjects-edit-form.component.html',
|
||||||
})
|
})
|
||||||
|
|
||||||
export class SubjectsEditFormComponent implements OnInit {
|
export class SubjectsEditFormComponent implements OnInit {
|
||||||
myForm = new FormArray([new FormControl({subject: ''})]);
|
myForm = new FormArray([new FormControl({subject: ''})]);
|
||||||
public showLoading = true;
|
public showLoading = true;
|
||||||
|
@ -44,7 +42,6 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
||||||
public filterForm: FormControl;
|
public filterForm: FormControl;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
/*//Check again functionality to enable page
|
/*//Check again functionality to enable page
|
||||||
subjectsPage;
|
subjectsPage;
|
||||||
@ViewChild('enablePageModal') enablePageModal: AlertModal;*/
|
@ViewChild('enablePageModal') enablePageModal: AlertModal;*/
|
||||||
|
@ -171,12 +168,11 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
handleUpdateError(message: string, error) {
|
handleUpdateError(message: string, error = null) {
|
||||||
UIkit.notification(message, {
|
if(error) {
|
||||||
status: 'danger',
|
console.error(error)
|
||||||
timeout: 6000,
|
}
|
||||||
pos: 'bottom-right'
|
NotificationHandler.rise(message, 'danger');
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -200,11 +196,7 @@ export class SubjectsEditFormComponent implements OnInit {
|
||||||
this.community.subjects = this.originalSubjects.filter(subject => {
|
this.community.subjects = this.originalSubjects.filter(subject => {
|
||||||
return !this.filterForm.value || subject.toLowerCase().indexOf(this.filterForm.value.toLowerCase()) != -1
|
return !this.filterForm.value || subject.toLowerCase().indexOf(this.filterForm.value.toLowerCase()) != -1
|
||||||
}).sort();
|
}).sort();
|
||||||
UIkit.notification('Subject successfully ' + message + '!', {
|
NotificationHandler.rise('Subject successfully ' + message + '!')
|
||||||
status: 'success',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Notification Settings</div>
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Notification Settings</div>
|
||||||
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||||
|
@ -8,22 +8,23 @@
|
||||||
</div>
|
</div>
|
||||||
<users-tabs tab="notifications"></users-tabs>
|
<users-tabs tab="notifications"></users-tabs>
|
||||||
</div>
|
</div>
|
||||||
|
<div actions>
|
||||||
|
<div class="uk-container uk-container-xsmall uk-section-xsmall">
|
||||||
|
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||||
|
<button class="uk-button uk-button-secondary" [class.uk-disabled]="!hasChanged || showLoading"
|
||||||
|
[disabled]="!hasChanged || showLoading"
|
||||||
|
(click)="resetForm()">Reset
|
||||||
|
</button>
|
||||||
|
<button class="uk-button uk-margin-left uk-button-primary"
|
||||||
|
[disabled]="!hasChanged || showLoading" [class.uk-disabled]="!hasChanged || showLoading"
|
||||||
|
(click)="updateUserNotifications()">Save
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div class="uk-flex uk-flex-center">
|
<div class="uk-container uk-container-xsmall">
|
||||||
<div class="uk-width-xlarge">
|
<div class="uk-section uk-position-relative" style="min-height: 60vh">
|
||||||
<div class="uk-margin-top">
|
|
||||||
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
|
||||||
<button class="uk-button uk-button-secondary" [class.uk-disabled]="!hasChanged || showLoading"
|
|
||||||
[disabled]="!hasChanged || showLoading"
|
|
||||||
(click)="resetForm()">Reset
|
|
||||||
</button>
|
|
||||||
<button class="uk-button uk-margin-left uk-button-primary"
|
|
||||||
[disabled]="!hasChanged || showLoading" [class.uk-disabled]="!hasChanged || showLoading"
|
|
||||||
(click)="updateUserNotifications()">Save
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-section uk-position-relative" style="min-height: 60vh">
|
|
||||||
<div *ngIf="!showLoading">
|
<div *ngIf="!showLoading">
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-margin-bottom">
|
||||||
<div class="uk-margin uk-grid" uk-grid>
|
<div class="uk-margin uk-grid" uk-grid>
|
||||||
|
@ -71,7 +72,6 @@
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -22,10 +22,8 @@ import {NotificationHandler} from "../../openaireLibrary/utils/notification-hand
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ManageUserNotificationsComponent implements OnInit {
|
export class ManageUserNotificationsComponent implements OnInit {
|
||||||
|
|
||||||
@Input('group')
|
@Input('group')
|
||||||
myForm: FormGroup;
|
myForm: FormGroup;
|
||||||
|
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
public community: CommunityInfo;
|
public community: CommunityInfo;
|
||||||
public userNotifications: UserNotificationsRights = null;
|
public userNotifications: UserNotificationsRights = null;
|
||||||
|
@ -33,7 +31,6 @@ export class ManageUserNotificationsComponent implements OnInit {
|
||||||
public notifications = null;
|
public notifications = null;
|
||||||
public initialNotifications = [];
|
public initialNotifications = [];
|
||||||
public userEmail = null;
|
public userEmail = null;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
public showLoading = true;
|
public showLoading = true;
|
||||||
public hasChanged = false;
|
public hasChanged = false;
|
||||||
public user: User;
|
public user: User;
|
||||||
|
|
|
@ -22,9 +22,9 @@ declare var UIkit;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'personal-info',
|
selector: 'personal-info',
|
||||||
template: `
|
template: `
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Personal Info &
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Personal Info &
|
||||||
Affiliations
|
Affiliations
|
||||||
|
@ -34,8 +34,8 @@ declare var UIkit;
|
||||||
</div>
|
</div>
|
||||||
<users-tabs tab="personal"></users-tabs>
|
<users-tabs tab="personal"></users-tabs>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-margin-top uk-container">
|
<div class="uk-container uk-section-xsmall">
|
||||||
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
<div class="uk-flex uk-flex-center uk-flex-right@m">
|
||||||
<button class="uk-button uk-button-secondary" [class.uk-disabled]="!hasChanged || loading"
|
<button class="uk-button uk-button-secondary" [class.uk-disabled]="!hasChanged || loading"
|
||||||
[disabled]="!hasChanged || loading"
|
[disabled]="!hasChanged || loading"
|
||||||
|
@ -47,6 +47,8 @@ declare var UIkit;
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="loading" class="uk-position-center">
|
<div *ngIf="loading" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
@ -182,7 +184,6 @@ export class PersonalInfoComponent implements OnInit, OnDestroy {
|
||||||
public curatorsPage: Page;
|
public curatorsPage: Page;
|
||||||
public newCurator = false;
|
public newCurator = false;
|
||||||
public community: CommunityInfo;
|
public community: CommunityInfo;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
/** Photo */
|
/** Photo */
|
||||||
public photo: any = null;
|
public photo: any = null;
|
||||||
private photoChanged: boolean = false;
|
private photoChanged: boolean = false;
|
||||||
|
|
|
@ -12,8 +12,8 @@ import {CommunityInfo} from "../../../openaireLibrary/connect/community/communit
|
||||||
selector: 'users-managers',
|
selector: 'users-managers',
|
||||||
template: `
|
template: `
|
||||||
<role-users [id]="community.communityId" [type]="community.type" [name]="community.shortTitle" [inviteDisableMessage]="inviteDisableMessage"
|
<role-users [id]="community.communityId" [type]="community.type" [name]="community.shortTitle" [inviteDisableMessage]="inviteDisableMessage"
|
||||||
[link]="link" [role]="'manager'" [message]="message" [emailComposer]="emailComposer" (stickyEmitter)="stickyPageHeader = $event">
|
[link]="link" [role]="'manager'" [message]="message" [emailComposer]="emailComposer">
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Managers</div>
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Managers</div>
|
||||||
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||||
|
@ -32,7 +32,6 @@ export class UsersManagersComponent implements OnInit {
|
||||||
public emailComposer: Function = (name, recipient, role):Email => {
|
public emailComposer: Function = (name, recipient, role):Email => {
|
||||||
return Composer.composeEmailForCommunityDashboard(name, recipient);
|
return Composer.composeEmailForCommunityDashboard(name, recipient);
|
||||||
}
|
}
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
constructor(private communityService: CommunityService,
|
constructor(private communityService: CommunityService,
|
||||||
|
@ -50,7 +49,7 @@ export class UsersManagersComponent implements OnInit {
|
||||||
this.message = 'A manager has the right to access the administration part of Research Community Dashboard, ' +
|
this.message = 'A manager has the right to access the administration part of Research Community Dashboard, ' +
|
||||||
'where he is able to customize and manage the content, invite other users as managers or to subscribe.';
|
'where he is able to customize and manage the content, invite other users as managers or to subscribe.';
|
||||||
if(community.status === "hidden") {
|
if(community.status === "hidden") {
|
||||||
this.inviteDisableMessage = "<div class='uk-padding-small'>Community's status is Hidden and invitation to manage the Research community dashboard is disabled. Update the community status to enable invitations.</div>"
|
this.inviteDisableMessage = "Community's status is Hidden and invitation to manage the Research community dashboard is disabled. Update the community status to enable invitations."
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import {CommunityInfo} from "../../../openaireLibrary/connect/community/communit
|
||||||
selector: 'users-subscribers',
|
selector: 'users-subscribers',
|
||||||
template: `
|
template: `
|
||||||
<subscribers [id]="community.communityId" [type]="'community'" [name]="community.shortTitle"
|
<subscribers [id]="community.communityId" [type]="'community'" [name]="community.shortTitle"
|
||||||
[inviteDisableMessage]="inviteDisableMessage" (stickyEmitter)="stickyPageHeader = $event">
|
[inviteDisableMessage]="inviteDisableMessage">
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Members</div>
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Members</div>
|
||||||
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||||
|
@ -24,7 +24,6 @@ export class UsersSubscribersComponent implements OnInit {
|
||||||
public community: CommunityInfo;
|
public community: CommunityInfo;
|
||||||
public loading: boolean;
|
public loading: boolean;
|
||||||
public inviteDisableMessage: string;
|
public inviteDisableMessage: string;
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
constructor(private communityService: CommunityService,
|
constructor(private communityService: CommunityService,
|
||||||
|
@ -39,7 +38,7 @@ export class UsersSubscribersComponent implements OnInit {
|
||||||
this.community = community;
|
this.community = community;
|
||||||
this.title.setTitle(this.community.shortTitle.toUpperCase() + " | Subscribers");
|
this.title.setTitle(this.community.shortTitle.toUpperCase() + " | Subscribers");
|
||||||
if(community.status !== "all") {
|
if(community.status !== "all") {
|
||||||
this.inviteDisableMessage = "<div class='uk-padding-small'>Community's status is " + (community.status === 'manager'?'Visible to managers':'Hidden') + " and invitation to subscribe to the Research community dashboard is disabled. Update the community status to enable invitations.</div>"
|
this.inviteDisableMessage = "Community's status is " + (community.status === 'manager'?'Visible to managers':'Hidden') + " and invitation to subscribe to the Research community dashboard is disabled. Update the community status to enable invitations."
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {ActivatedRoute} from '@angular/router';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'users-tabs',
|
selector: 'users-tabs',
|
||||||
template: `
|
template: `
|
||||||
<ul class="uk-tab uk-flex uk-flex-center uk-flex-left@m" uk-tab>
|
<ul class="uk-tab uk-margin-top uk-flex uk-flex-center uk-flex-left@m" uk-tab>
|
||||||
<li [class.uk-active]="tab === 'manager'"><a routerLink="../manager">Managers</a></li>
|
<li [class.uk-active]="tab === 'manager'"><a routerLink="../manager">Managers</a></li>
|
||||||
<li [class.uk-active]="tab === 'member'"><a routerLink="../member">Members</a></li>
|
<li [class.uk-active]="tab === 'member'"><a routerLink="../member">Members</a></li>
|
||||||
<li *ngIf="canManageNotifications" [class.uk-active]="tab === 'notifications'"><a routerLink="../notifications">Notification
|
<li *ngIf="canManageNotifications" [class.uk-active]="tab === 'notifications'"><a routerLink="../notifications">Notification
|
||||||
|
|
|
@ -93,7 +93,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public goTo(page: number = 1) {
|
public goTo(page: number = 1) {
|
||||||
HelperFunctions.scroll();
|
|
||||||
this.zenodoCommunitySearchUtils.page = page;
|
this.zenodoCommunitySearchUtils.page = page;
|
||||||
this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
|
this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
|
||||||
if(this.subResults){
|
if(this.subResults){
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
<div page-content>
|
||||||
<div header>
|
<div header>
|
||||||
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
<div class="uk-flex uk-flex-middle uk-margin-top info">
|
||||||
<div>
|
<div>
|
||||||
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Zenodo Communities
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Zenodo Communities
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,22 +9,25 @@
|
||||||
</div>
|
</div>
|
||||||
<community-info tab="zenodo-communities"></community-info>
|
<community-info tab="zenodo-communities"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div actions>
|
||||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
<div class="uk-section-xsmall">
|
||||||
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer"
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||||
placeholder="Search Zenodo Community" [disabled]="searchUtils.status === errorCodes.LOADING"
|
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer"
|
||||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
placeholder="Search Zenodo Community" [disabled]="searchUtils.status === errorCodes.LOADING"
|
||||||
<div>
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
<div>
|
||||||
uk-tooltip="title:<div class='uk-text-bold'> Search and add more Zenodo Communities</div><div>The research results of a Zenodo community specified here will be automatically linked to your community dashboard.</div>"
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
||||||
[disabled]="searchUtils.status === errorCodes.LOADING || disableAdd"
|
uk-tooltip="title:<div class='uk-text-bold'> Search and add more Zenodo Communities</div><div>The research results of a Zenodo community specified here will be automatically linked to your community dashboard.</div>"
|
||||||
[class.uk-disabled]="searchUtils.status === errorCodes.LOADING || disableAdd">
|
[disabled]="searchUtils.status === errorCodes.LOADING"
|
||||||
<icon name="add" [flex]="true"></icon>
|
[class.uk-disabled]="searchUtils.status === errorCodes.LOADING">
|
||||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New Zenodo Community</span>
|
<icon name="add" [flex]="true"></icon>
|
||||||
</button>
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New Zenodo Community</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
<div inner>
|
||||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||||
<loading></loading>
|
<loading></loading>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import {
|
import {
|
||||||
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
|
@ -19,48 +20,38 @@ import {SearchInputComponent} from '../../openaireLibrary/sharedComponents/searc
|
||||||
import {Subscription} from 'rxjs';
|
import {Subscription} from 'rxjs';
|
||||||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||||
|
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
||||||
declare var UIkit;
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'manage-zenodo-communities',
|
selector: 'manage-zenodo-communities',
|
||||||
templateUrl: './manage-zenodo-communities.component.html',
|
templateUrl: './manage-zenodo-communities.component.html'
|
||||||
encapsulation: ViewEncapsulation.None // this used in order styles to work
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
properties: EnvProperties = properties;
|
properties: EnvProperties = properties;
|
||||||
@Input() community: CommunityInfo = null;
|
@Input() community: CommunityInfo = null;
|
||||||
@Input() public loading: boolean = true;
|
@Input() public loading: boolean = true;
|
||||||
@Input() public disableAdd: boolean = false;
|
|
||||||
@Input() searchUtils: SearchUtilsClass = null;
|
@Input() searchUtils: SearchUtilsClass = null;
|
||||||
|
|
||||||
errorCodes: ErrorCodes;
|
errorCodes: ErrorCodes;
|
||||||
public rowsOnPage = 10;
|
public rowsOnPage = 10;
|
||||||
@Input() masterCommunity = null;
|
@Input() masterCommunity = null;
|
||||||
@Input() selectedCommunities = [];
|
@Input() selectedCommunities = [];
|
||||||
previewCommunities = [];
|
previewCommunities = [];
|
||||||
|
|
||||||
@ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
|
@ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
|
||||||
selectedToDelete = null;
|
selectedToDelete = null;
|
||||||
@Output() addZenodoCommunity: EventEmitter<any> = new EventEmitter();
|
@Output() addZenodoCommunity: EventEmitter<any> = new EventEmitter();
|
||||||
@Output() zenodoCommunitiesChanged = new EventEmitter();
|
@Output() zenodoCommunitiesChanged = new EventEmitter();
|
||||||
|
|
||||||
page = 1;
|
page = 1;
|
||||||
size = 10;
|
size = 10;
|
||||||
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
||||||
public filterForm: FormControl;
|
public filterForm: FormControl;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
public stickyPageHeader: boolean = false;
|
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private _router: Router,
|
private _router: Router,
|
||||||
public _fb: FormBuilder,
|
public _fb: FormBuilder,
|
||||||
|
private cdr: ChangeDetectorRef,
|
||||||
private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
|
private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
|
||||||
|
|
||||||
this.errorCodes = new ErrorCodes();
|
this.errorCodes = new ErrorCodes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
@ -93,6 +84,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
if (this.previewCommunities.slice((this.page - 1) * this.rowsOnPage, this.page * this.rowsOnPage).length == 0) {
|
if (this.previewCommunities.slice((this.page - 1) * this.rowsOnPage, this.page * this.rowsOnPage).length == 0) {
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
}
|
}
|
||||||
|
this.cdr.detectChanges();
|
||||||
}
|
}
|
||||||
|
|
||||||
public confirmedDeleteCommunity(data: any) {
|
public confirmedDeleteCommunity(data: any) {
|
||||||
|
@ -111,11 +103,7 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
this.searchUtils.totalResults = this.selectedCommunities.length;
|
this.searchUtils.totalResults = this.selectedCommunities.length;
|
||||||
this.filterPreviewCommunities(this.filterForm.value);
|
this.filterPreviewCommunities(this.filterForm.value);
|
||||||
UIkit.notification('Community has been <b>successfully removed</b>!', {
|
NotificationHandler.rise('Community has been <b>successfully removed</b>!')
|
||||||
status: 'success',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
this.zenodoCommunitiesChanged.emit({
|
this.zenodoCommunitiesChanged.emit({
|
||||||
value: this.selectedCommunities,
|
value: this.selectedCommunities,
|
||||||
});
|
});
|
||||||
|
@ -165,10 +153,6 @@ export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
handleError(message: string) {
|
handleError(message: string) {
|
||||||
UIkit.notification(message, {
|
NotificationHandler.rise(message, 'danger');
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,13 @@ import {ManageZenodoCommunitiesComponent} from './manage-zenodo-communities.comp
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'zenodo-communities',
|
selector: 'zenodo-communities',
|
||||||
template: `
|
template: `
|
||||||
<manage-zenodo-communities #manage *ngIf="community && zenodoSearchUtils && zenodoSearchUtils.status != errorCodes.LOADING"
|
<manage-zenodo-communities #manage *ngIf="community && zenodoSearchUtils"
|
||||||
[loading]="showLoadingInRemove" [disableAdd]="add && add.loading"
|
[loading]="showLoadingInRemove"
|
||||||
[masterCommunity]=masterZenodoCommunity [selectedCommunities]=selectedCommunities
|
[masterCommunity]=masterZenodoCommunity [selectedCommunities]=selectedCommunities
|
||||||
[community]="community" [searchUtils]=zenodoSearchUtils (addZenodoCommunity)="openAddZenodoCommunites()"
|
[community]="community" [searchUtils]=zenodoSearchUtils (addZenodoCommunity)="openAddZenodoCommunites()"
|
||||||
(zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></manage-zenodo-communities>
|
(zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></manage-zenodo-communities>
|
||||||
<fs-modal #fsModal>
|
<fs-modal #fsModal>
|
||||||
<add-zenodo-communities #add *ngIf="zenodoSearchUtils.status != errorCodes.LOADING" [masterCommunity]=masterZenodoCommunity
|
<add-zenodo-communities [masterCommunity]=masterZenodoCommunity
|
||||||
[selectedCommunities]=selectedCommunities
|
[selectedCommunities]=selectedCommunities
|
||||||
[community]="community" (zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></add-zenodo-communities>
|
[community]="community" (zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></add-zenodo-communities>
|
||||||
</fs-modal>
|
</fs-modal>
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 141c71c3104bab1382e6008697043ea87e03ea44
|
Subproject commit f4557fd17a42d8200eab272c05ccf38dbdee772d
|
|
@ -1 +1 @@
|
||||||
Subproject commit e4c7254752de49fc801a30bde3cf0120e42cf9da
|
Subproject commit a61c749816accd456cf30c9e4983d61282f28a89
|
Loading…
Reference in New Issue