Compare commits
7 Commits
a1b49630db
...
750b279ed3
Author | SHA1 | Date |
---|---|---|
argirok | 750b279ed3 | |
argirok | 50051f2de8 | |
Alex Martzios | 894667955c | |
Alex Martzios | cafe0e4926 | |
Konstantina Galouni | b6cda48e2f | |
Alex Martzios | 6c4a4d9721 | |
Konstantina Galouni | ca8b732a64 |
|
@ -56,25 +56,44 @@
|
||||||
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
<div *ngIf="claims && claims.length == 0" class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
<div>No links found</div>
|
<div>No links found</div>
|
||||||
</div>
|
</div>
|
||||||
<ul class="uk-margin-small-top uk-list uk-list-xlarge">
|
<ng-container *ngIf="claims && claims.length > 0">
|
||||||
<li *ngFor="let claim of claims; let i=index" class="uk-card uk-card-default">
|
|
||||||
<div class="uk-card-body">
|
<div class="uk-flex uk-flex-middle uk-margin-top uk-margin-small-bottom uk-padding-small uk-padding-remove-horizontal">
|
||||||
<div class="uk-grid uk-grid-small" uk-grid>
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
<label>
|
||||||
|
<input id="checkAll" type="checkbox" (click)="selectAll($event)" class="uk-checkbox" title="Select All"
|
||||||
|
[ngModel]="selected.length == claims.length"/>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<button class="uk-button uk-button-link" [class.uk-disabled]="selected.length == 0" [disabled]="selected.length == 0"
|
||||||
|
(click)="deleteOpen()">
|
||||||
|
<span>Delete ({{selected.length}})</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="uk-margin-small-top uk-list uk-list-striped">
|
||||||
|
<li *ngFor="let claim of claims; let i=index" class="uk-flex uk-flex-middle uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
|
<input type="checkbox" class="uk-checkbox"
|
||||||
|
[id]="claim.id" (click)="selectClaim(claim, $event)" [ngModel]="isSelectedClaim(claim.id)">
|
||||||
|
</div>
|
||||||
<div class="uk-width-expand">
|
<div class="uk-width-expand">
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-grid uk-grid-small uk-flex-middle" uk-grid>
|
||||||
|
<div class="uk-width-expand">
|
||||||
|
<div class="uk-margin-small-bottom">
|
||||||
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
<claim-entity [entity]="claim.target" [type]="claim.targetType" [properties]=properties
|
||||||
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
[externalPortalUrl]=externalPortalUrl [source]="true" [linkAvailable]="isClaimAvailable(claim)"></claim-entity>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-bottom">
|
<div class="uk-margin-small-bottom">
|
||||||
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-success"
|
<span *ngIf="isClaimAvailable(claim) else notAvailable" class="uk-label uk-label-small uk-label-success"
|
||||||
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
[attr.uk-tooltip]="'title: The link information is available in the portal and the APIs.'">available</span>
|
||||||
<ng-template #notAvailable>
|
<ng-template #notAvailable>
|
||||||
<span class="uk-label uk-label-danger"
|
<span class="uk-label uk-label-small uk-label-danger"
|
||||||
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
[attr.uk-tooltip]="'title:The link information will be added in the portal and the APIs in the next content provision workflow.'">pending</span>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-text-small">
|
<div class="uk-text-small">
|
||||||
<div *ngIf="showUserEmail" class="uk-margin-small-bottom">
|
<div *ngIf="showUserEmail" class="uk-margin-xsmall-bottom">
|
||||||
<span class="uk-text-meta">Claimed by:</span>
|
<span class="uk-text-meta">Claimed by:</span>
|
||||||
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
<span class="uk-margin-xsmall-left">{{claim.userMail}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -89,16 +108,15 @@
|
||||||
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
<icon class="uk-position-center" name="link" customClass="uk-text-primary" ratio="2" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-1-2@m uk-width-1-1 uk-flex uk-flex-column uk-flex-center">
|
<div class="uk-width-1-2@m uk-width-1-1">
|
||||||
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
<claim-entity [entity]="claim.source" [type]="claim.sourceType" [source]="false" [properties]=properties
|
||||||
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
[externalPortalUrl]=externalPortalUrl></claim-entity>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-card-footer uk-flex uk-flex-right">
|
<div class="uk-width-xsmall uk-flex uk-flex-center uk-flex-middle">
|
||||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle" (click)="deleteOpen(i)">
|
||||||
<icon name="delete" [flex]="true"></icon>
|
<icon name="delete" [flex]="true"></icon>
|
||||||
<span class="uk-margin-xsmall-left">Delete</span>
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -107,6 +125,7 @@
|
||||||
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
<paging-no-load *ngIf="resultsNum" [currentPage]="page" [totalResults]="resultsNum" [size]="size"
|
||||||
(pageChange)="pageChange($event)"></paging-no-load>
|
(pageChange)="pageChange($event)"></paging-no-load>
|
||||||
</div>
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,14 +4,4 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 50%;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
border-left: @global-border-width solid @global-border;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
lastIndexDate = null;
|
lastIndexDate = null;
|
||||||
public filterForm: FormGroup;
|
public filterForm: FormGroup;
|
||||||
public entities: string[] = [];
|
public entities: string[] = [];
|
||||||
|
selected = [];
|
||||||
|
|
||||||
allOptions: Option[] = [
|
allOptions: Option[] = [
|
||||||
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
|
{label: OpenaireEntities.PUBLICATIONS, value: "publication"},
|
||||||
|
@ -310,23 +311,34 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
|
|
||||||
isSelected(value: string) {
|
isSelected(value: string) {
|
||||||
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value)
|
return this.filterForm && this.filterForm.get('entities').value.find(entity => entity === value);
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteOpen(index: number) {
|
deleteOpen(index: number = null) {
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.deleteModal.alertTitle = 'Delete Confirmation';
|
this.deleteModal.alertTitle = 'Delete Confirmation';
|
||||||
this.deleteModal.message = 'Are you sure you want to delete this link?';
|
this.deleteModal.message = 'Are you sure you want to delete ' + (this.index != null ? '1' : this.selected.length) + ' link(s)?';
|
||||||
this.deleteModal.okButtonText = 'Yes';
|
this.deleteModal.okButtonText = 'Yes';
|
||||||
this.deleteModal.open();
|
this.deleteModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
this.subscriptions.push(this._claimService.deleteBulk([this.claims[this.index].id], this.properties.claimsAPIURL).subscribe(
|
let claimsToBeDeleted = ((this.index != null) ? [this.claims[this.index].id] : this.selected.map(claim => claim.id));
|
||||||
|
console.log(claimsToBeDeleted);
|
||||||
|
this.subscriptions.push(this._claimService.deleteBulk(claimsToBeDeleted, this.properties.claimsAPIURL).subscribe(
|
||||||
res => {
|
res => {
|
||||||
|
if (this.index != null) {
|
||||||
this.claims.splice(this.index, 1);
|
this.claims.splice(this.index, 1);
|
||||||
this.resultsNum = this.resultsNum - 1;
|
this.resultsNum = this.resultsNum - 1;
|
||||||
NotificationHandler.rise('Link has been deleted successfully');
|
NotificationHandler.rise('Link has been deleted successfully');
|
||||||
|
} else {
|
||||||
|
claimsToBeDeleted.forEach(claimId => {
|
||||||
|
this.claims.splice(this.claims.findIndex((id) => id == claimId), 1);
|
||||||
|
});
|
||||||
|
this.resultsNum = this.resultsNum - claimsToBeDeleted.length;
|
||||||
|
NotificationHandler.rise(claimsToBeDeleted.length + ' links have been deleted successfully');
|
||||||
|
}
|
||||||
|
this.selected = [];
|
||||||
let goToPage = this.page;
|
let goToPage = this.page;
|
||||||
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
|
if (this.totalPages(this.resultsNum) < this.page && this.page > 0) {
|
||||||
goToPage = this.page - 1;
|
goToPage = this.page - 1;
|
||||||
|
@ -334,7 +346,8 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
this.goTo(goToPage);
|
this.goTo(goToPage);
|
||||||
}, err => {
|
}, err => {
|
||||||
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
|
this.handleErrors(err, "Error deleting claim with id: " + this.claims[this.index].id);
|
||||||
}));
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
pageChange($event) {
|
pageChange($event) {
|
||||||
|
@ -363,6 +376,43 @@ export class DisplayClaimsComponent implements OnInit, OnDestroy {
|
||||||
return totalPages;
|
return totalPages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
selectClaim(item: any, event) {
|
||||||
|
let value = event.currentTarget.checked;
|
||||||
|
if (value) {
|
||||||
|
this.selected.push(item);
|
||||||
|
} else {
|
||||||
|
for (var _i = 0; _i < this.selected.length; _i++) {
|
||||||
|
let claim = this.selected[_i];
|
||||||
|
if (claim['id'] == item.id) {
|
||||||
|
this.selected.splice(_i, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
selectAll(event) {
|
||||||
|
let value = event.currentTarget.checked;
|
||||||
|
if (value) {
|
||||||
|
this.selected = [];
|
||||||
|
for (let _i = 0; _i < this.claims.length; _i++) {
|
||||||
|
let claim = this.claims[_i];
|
||||||
|
this.selected.push(claim);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.selected = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
isSelectedClaim(id: string) {
|
||||||
|
for (let _i = 0; _i < this.selected.length; _i++) {
|
||||||
|
let claim = this.selected[_i];
|
||||||
|
if (claim['id'] == id) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
private updateDescription(description: string) {
|
private updateDescription(description: string) {
|
||||||
this._meta.updateTag({content: description}, "name='description'");
|
this._meta.updateTag({content: description}, "name='description'");
|
||||||
this._meta.updateTag({content: description}, "property='og:description'");
|
this._meta.updateTag({content: description}, "property='og:description'");
|
||||||
|
|
|
@ -15,21 +15,22 @@ import {StringUtils} from "../../../utils/string-utils.class";
|
||||||
<div *ngIf="source" class="uk-text-small">
|
<div *ngIf="source" class="uk-text-small">
|
||||||
{{getEntityName(type)}}
|
{{getEntityName(type)}}
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-flex">
|
<div>
|
||||||
<span *ngIf="!source" class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
<span *ngIf="!source" class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
<publication-title [entity]="entity" param="id"
|
<publication-title [entity]="entity" param="id"
|
||||||
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
|
path="/search/result" [externalPortalUrl]=externalPortalUrl [linkAvailable]="linkAvailable"></publication-title>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)"
|
<div *ngIf="type == 'project'" [attr.uk-tooptip]="getEntityName(type)">
|
||||||
class="uk-flex">
|
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
<span class="uk-text-meta uk-margin-small-right uk-text-large uk-text-nowrap">Link to:</span>
|
|
||||||
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
|
<project-title [project]="entity" [searchLink]=properties.searchLinkToProject
|
||||||
[externalPortalUrl]=externalPortalUrl></project-title>
|
[externalPortalUrl]=externalPortalUrl></project-title>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="type == 'context'" class="uk-flex uk-text-large">
|
<div *ngIf="type == 'context'">
|
||||||
<span class="uk-text-meta uk-margin-small-right uk-text-nowrap">Link to:</span>
|
<span class="uk-text-meta uk-text-small uk-margin-small-right uk-text-nowrap">Link to:</span>
|
||||||
|
<h6 class="uk-h6 uk-margin-remove">
|
||||||
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
<span class="uk-text-truncate" uk-tooltip="Concept">{{entity.title}}</span>
|
||||||
|
</h6>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -20,7 +20,7 @@ import {properties} from "../../../../../environments/environment";
|
||||||
</h6>
|
</h6>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
||||||
<span class="uk-text-muted">Funder: </span>{{project['funderName']}}
|
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||||
</span>
|
</span>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div *ngIf="!community " class="uk-text-muted uk-text-center">
|
<div *ngIf="!community " class="uk-text-meta uk-text-center">
|
||||||
No community info available
|
No community info available
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-section uk-container ">
|
<div class="uk-section uk-container ">
|
||||||
|
@ -64,8 +64,9 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="heroBackground generalSearchForm uk-border-rounded uk-padding uk-margin-medium-bottom">
|
<div class="heroBackground generalSearchForm uk-border-rounded uk-padding uk-margin-medium-bottom"
|
||||||
<!-- <img class="plugin-background" src="assets/common-assets/connect_image_faded.png">-->
|
[class.uk-light]="!this.fontsDarkMode"
|
||||||
|
[style]="style">
|
||||||
<div class="plugin-content">
|
<div class="plugin-content">
|
||||||
<div class="uk-text-lead uk-text-large uk-text-bold uk-margin-bottom">
|
<div class="uk-text-lead uk-text-large uk-text-bold uk-margin-bottom">
|
||||||
{{ pluginObject.title}}
|
{{ pluginObject.title}}
|
||||||
|
@ -96,7 +97,7 @@
|
||||||
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
||||||
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
||||||
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
||||||
[customClass]="'uk-text-muted'"></icon>
|
[customClass]="'uk-text-meta'"></icon>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -115,7 +116,7 @@
|
||||||
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
||||||
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
||||||
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
||||||
[customClass]="'uk-text-muted'"></icon>
|
[customClass]="'uk-text-meta'"></icon>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -134,7 +135,7 @@
|
||||||
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
[attr.uk-tooltip]="'pos: bottom-right; delay: 10;'"
|
||||||
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
class="uk-link-reset uk-margin-xsmall-left" [class.uk-disabled] =previewInAdmin>
|
||||||
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
<icon [name]="'help_outline'" [type]="'outlined'" [ratio]="0.8" [flex]="true"
|
||||||
[customClass]="'uk-text-muted'"></icon>
|
[customClass]="'uk-text-meta'"></icon>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,7 +12,7 @@ import {HttpClient} from "@angular/common/http";
|
||||||
import {Filter} from "../../../../searchPages/searchUtils/searchHelperClasses.class";
|
import {Filter} from "../../../../searchPages/searchUtils/searchHelperClasses.class";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
import {SearchResearchResultsService} from "../../../../services/searchResearchResults.service";
|
import {SearchResearchResultsService} from "../../../../services/searchResearchResults.service";
|
||||||
import {properties} from "../../../../../../environments/environment";
|
import {CustomizationService} from "../../../../services/customization.service";
|
||||||
|
|
||||||
export class PluginGatewayInformation extends PluginBaseInfo{
|
export class PluginGatewayInformation extends PluginBaseInfo{
|
||||||
showTitle:boolean = true;
|
showTitle:boolean = true;
|
||||||
|
@ -36,7 +36,6 @@ export class PluginGatewayInformation extends PluginBaseInfo{
|
||||||
|
|
||||||
compare(oldObject): any {
|
compare(oldObject): any {
|
||||||
let newObj= super.compare(oldObject);
|
let newObj= super.compare(oldObject);
|
||||||
console.log("PluginGatewayInformation", oldObject, newObj)
|
|
||||||
return newObj;
|
return newObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,7 +102,7 @@ export class PluginGatewayInformationComponent extends PluginBaseComponent<Plugi
|
||||||
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
|
private searchCommunityDataprovidersService: SearchCommunityDataprovidersService,
|
||||||
private zenodoCommunitiesService: ZenodoCommunitiesService, private _router: Router,
|
private zenodoCommunitiesService: ZenodoCommunitiesService, private _router: Router,
|
||||||
private _searchResearchResultsService: SearchResearchResultsService,
|
private _searchResearchResultsService: SearchResearchResultsService,
|
||||||
private cdr: ChangeDetectorRef) {
|
private cdr: ChangeDetectorRef, protected layoutService: CustomizationService) {
|
||||||
super();
|
super();
|
||||||
this.searchLinkToResults = this.properties.searchLinkToResults;
|
this.searchLinkToResults = this.properties.searchLinkToResults;
|
||||||
this.searchLinkToProjects = this.properties.searchLinkToProjects;
|
this.searchLinkToProjects = this.properties.searchLinkToProjects;
|
||||||
|
@ -182,7 +181,11 @@ export class PluginGatewayInformationComponent extends PluginBaseComponent<Plugi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
if (this.community) {
|
||||||
|
this.getLayout(this.community.communityId);
|
||||||
|
}
|
||||||
|
}
|
||||||
isEntityEnabled(entity: string) {
|
isEntityEnabled(entity: string) {
|
||||||
return this.portal.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
|
return this.portal.entities.some(x => x['pid'] == entity && x['isEnabled'] === true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
||||||
<div class="uk-margin-top uk-text-meta uk-text-xsmall ">
|
<div class="uk-margin-top uk-text-meta uk-text-xsmall ">
|
||||||
Community info
|
Community info
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small"> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
|
||||||
<div class="uk-grid uk-child-width-1-1 uk-text-small uk-hr ">
|
<div class="uk-grid uk-child-width-1-1 uk-text-small uk-hr ">
|
||||||
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
|
<div class="uk-margin-xsmall-bottom uk-margin-xsmall-top">
|
||||||
<plugin-field-edit [value]=" pluginObject.showTitle"
|
<plugin-field-edit [value]=" pluginObject.showTitle"
|
||||||
|
@ -89,6 +89,7 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
||||||
</plugin-field-edit>
|
</plugin-field-edit>
|
||||||
Subjects
|
Subjects
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
||||||
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
||||||
Pages & menus
|
Pages & menus
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,8 +147,12 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-alert uk-alert-warning uk-text-small"> If some information is enabled here,
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall"> If some information is enabled here,
|
||||||
but still not visible, please check related <a routerLink="../entities" target="_blank">entity</a> or <a routerLink="../pages" target="_blank">page</a>.</div>
|
but still not visible, please check related <a routerLink="../entities" target="_blank">entity</a> or <a routerLink="../pages" target="_blank">page</a>.
|
||||||
|
</div>
|
||||||
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||||
|
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,12 @@ import {AdvancedSearchInputModule} from "../../../../sharedComponents/advanced-s
|
||||||
import {EntitiesSelectionModule} from "../../../../searchPages/searchUtils/entitiesSelection.module";
|
import {EntitiesSelectionModule} from "../../../../searchPages/searchUtils/entitiesSelection.module";
|
||||||
import {QuickSelectionsModule} from "../../../../searchPages/searchUtils/quick-selections.module";
|
import {QuickSelectionsModule} from "../../../../searchPages/searchUtils/quick-selections.module";
|
||||||
import {InputModule} from "../../../../sharedComponents/input/input.module";
|
import {InputModule} from "../../../../sharedComponents/input/input.module";
|
||||||
|
import {CustomizationServiceModule} from "../../../../services/customizationService.module";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule,
|
CommonModule, RouterModule, FormsModule, IconsModule, NumberRoundModule, SearchResearchResultsServiceModule, PluginFieldEditModule,
|
||||||
CuratorsModule, AdvancedSearchInputModule, EntitiesSelectionModule, QuickSelectionsModule, InputModule
|
CuratorsModule, AdvancedSearchInputModule, EntitiesSelectionModule, QuickSelectionsModule, InputModule, CustomizationServiceModule
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
PluginsService, SearchCommunityProjectsService, SearchCommunityDataprovidersService, ZenodoCommunitiesService
|
PluginsService, SearchCommunityProjectsService, SearchCommunityDataprovidersService, ZenodoCommunitiesService
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
<div>
|
<div>
|
||||||
<div style="max-width: 550px;">
|
<div style="max-width: 550px;">
|
||||||
<h2>{{pluginObject.title}}</h2>
|
<h2>{{pluginObject.title}}</h2>
|
||||||
<div class="">
|
<div class="" [innerHTML]="pluginObject.paragraph1">
|
||||||
{{pluginObject.paragraph1}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,9 +20,7 @@
|
||||||
<div class="uk-section uk-padding-remove-top">
|
<div class="uk-section uk-padding-remove-top">
|
||||||
<div class="uk-container">
|
<div class="uk-container">
|
||||||
<div class="uk-width-1-2@m uk-margin-auto uk-margin-small-top uk-text-center" style="max-width: 600px;">
|
<div class="uk-width-1-2@m uk-margin-auto uk-margin-small-top uk-text-center" style="max-width: 600px;">
|
||||||
<div>
|
<div [innerHTML]="pluginObject.paragraph2"></div>
|
||||||
{{pluginObject.paragraph2}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="uk-margin-top">
|
<div class="uk-margin-top">
|
||||||
<a [href]="pluginObject.url.url" [target]="pluginObject.url.target"
|
<a [href]="pluginObject.url.url" [target]="pluginObject.url.target"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<div *ngIf="pluginObject" #parent class="heroBackground generalSearchForm ">
|
<div *ngIf="pluginObject" #parent class="heroBackground generalSearchForm " [class.uk-light]="!this.fontsDarkMode"
|
||||||
|
[style]="style">
|
||||||
<div class="uk-section uk-container ">
|
<div class="uk-section uk-container ">
|
||||||
<div class="uk-width-1-1 uk-margin-medium-bottom">
|
<div class="uk-width-1-1 uk-margin-medium-bottom">
|
||||||
<h2 class="uk-margin-remove-top uk-text-center ">
|
<h2 class="uk-margin-remove-top uk-text-center ">
|
||||||
|
|
|
@ -2,6 +2,8 @@ import {Component} from '@angular/core';
|
||||||
import {PluginBaseComponent, PluginBaseInfo, PluginInfoCards, PluginURL} from "../../utils/base-plugin.component";
|
import {PluginBaseComponent, PluginBaseInfo, PluginInfoCards, PluginURL} from "../../utils/base-plugin.component";
|
||||||
import {OpenaireEntities} from "../../../../utils/properties/searchFields";
|
import {OpenaireEntities} from "../../../../utils/properties/searchFields";
|
||||||
import {properties} from "../../../../../../environments/environment";
|
import {properties} from "../../../../../../environments/environment";
|
||||||
|
import {CustomizationService} from "../../../../services/customization.service";
|
||||||
|
import {CommunityService} from "../../../../connect/community/community.service";
|
||||||
export class PluginSearchDepositLink extends PluginBaseInfo{
|
export class PluginSearchDepositLink extends PluginBaseInfo{
|
||||||
title:string ="Search, link and deposit your research in one place";
|
title:string ="Search, link and deposit your research in one place";
|
||||||
cardInfoArray: PluginInfoCards[] = [
|
cardInfoArray: PluginInfoCards[] = [
|
||||||
|
@ -22,7 +24,6 @@ export class PluginSearchDepositLink extends PluginBaseInfo{
|
||||||
|
|
||||||
compare(oldObject): any {
|
compare(oldObject): any {
|
||||||
let newObj= super.compare(oldObject);
|
let newObj= super.compare(oldObject);
|
||||||
console.log("PluginSearchDepositLink", oldObject, newObj)
|
|
||||||
return newObj;
|
return newObj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,9 +35,16 @@ export class PluginSearchDepositLink extends PluginBaseInfo{
|
||||||
export class PluginSearchDepositLinkComponent extends PluginBaseComponent<PluginSearchDepositLink>{
|
export class PluginSearchDepositLinkComponent extends PluginBaseComponent<PluginSearchDepositLink>{
|
||||||
entities= OpenaireEntities;
|
entities= OpenaireEntities;
|
||||||
|
|
||||||
constructor() {
|
constructor(private communityService: CommunityService, protected layoutService: CustomizationService) {
|
||||||
super()
|
super()
|
||||||
}
|
}
|
||||||
|
ngOnInit() {
|
||||||
|
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(
|
||||||
|
community => {
|
||||||
|
this.getLayout(community.communityId);
|
||||||
|
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
get activeCards(){
|
get activeCards(){
|
||||||
return this.pluginObject.cardInfoArray.filter( card => card.show);
|
return this.pluginObject.cardInfoArray.filter( card => card.show);
|
||||||
|
|
|
@ -32,6 +32,9 @@ import {PluginBaseFormComponent, PluginEditEvent} from "../../utils/base-plugin.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||||
|
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||||
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="selectedIndex > -1">
|
<ng-container *ngIf="selectedIndex > -1">
|
||||||
<div *ngIf="editTemplate" class="back uk-margin-bottom">
|
<div *ngIf="editTemplate" class="back uk-margin-bottom">
|
||||||
|
|
|
@ -4,11 +4,15 @@ import {PluginTemplate} from "../../../utils/entities/adminTool/pluginTemplate";
|
||||||
import {EnvProperties} from "../../../utils/properties/env-properties";
|
import {EnvProperties} from "../../../utils/properties/env-properties";
|
||||||
import {properties} from 'src/environments/environment';
|
import {properties} from 'src/environments/environment';
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber} from "rxjs";
|
||||||
|
import {CustomizationOptions, Layout} from "../../../connect/community/CustomizationOptions";
|
||||||
|
import {CustomizationService} from "../../../services/customization.service";
|
||||||
|
|
||||||
export class PluginBaseInfo {
|
export class PluginBaseInfo {
|
||||||
title: string = "Lorem ipsum";
|
title: string = "Lorem ipsum";
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
compare(oldObject) {
|
compare(oldObject) {
|
||||||
if (!oldObject) {
|
if (!oldObject) {
|
||||||
oldObject = Object.assign(this)
|
oldObject = Object.assign(this)
|
||||||
|
@ -26,11 +30,13 @@ export class PluginBaseInfo {
|
||||||
return oldObject;
|
return oldObject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PluginURL {
|
export class PluginURL {
|
||||||
url: string;
|
url: string;
|
||||||
linkText: string;
|
linkText: string;
|
||||||
target: string;
|
target: string;
|
||||||
route: boolean;
|
route: boolean;
|
||||||
|
|
||||||
constructor(url, linkText, target = "_blank", route = false) {
|
constructor(url, linkText, target = "_blank", route = false) {
|
||||||
this.url = url;
|
this.url = url;
|
||||||
this.linkText = linkText;
|
this.linkText = linkText;
|
||||||
|
@ -48,6 +54,7 @@ export class PluginInfoCards{
|
||||||
image?: string;
|
image?: string;
|
||||||
show: boolean;
|
show: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Directive()
|
@Directive()
|
||||||
export abstract class PluginBaseComponent<T extends PluginBaseInfo> implements OnDestroy {
|
export abstract class PluginBaseComponent<T extends PluginBaseInfo> implements OnDestroy {
|
||||||
public properties: EnvProperties = properties;
|
public properties: EnvProperties = properties;
|
||||||
|
@ -56,9 +63,14 @@ export class PluginInfoCards{
|
||||||
@Input() pluginObject: T;
|
@Input() pluginObject: T;
|
||||||
@Input() previewInAdmin: boolean = false;
|
@Input() previewInAdmin: boolean = false;
|
||||||
subscriptions = [];
|
subscriptions = [];
|
||||||
constructor() {
|
|
||||||
|
|
||||||
|
customizationOptions: CustomizationOptions;
|
||||||
|
style:string ='';
|
||||||
|
fontsDarkMode:boolean = true;
|
||||||
|
protected layoutService: CustomizationService
|
||||||
|
constructor( ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,4 +93,25 @@ export class PluginInfoCards{
|
||||||
|| (!this.plugin && this.pluginTemplate && this.pluginObject && this.pluginObject[field] == true) /* template is on */
|
|| (!this.plugin && this.pluginTemplate && this.pluginObject && this.pluginObject[field] == true) /* template is on */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getLayout(communityId) {
|
||||||
|
if (this.previewInAdmin) {
|
||||||
|
let defaultCustomizationOptions = new CustomizationOptions(CustomizationOptions.getIdentity(communityId).mainColor, CustomizationOptions.getIdentity(communityId).secondaryColor);
|
||||||
|
this.subscriptions.push(this.layoutService.getLayout(this.properties, communityId).subscribe(layout => {
|
||||||
|
layout = (layout ? layout : new Layout(communityId, defaultCustomizationOptions));
|
||||||
|
this.customizationOptions = (layout ? CustomizationOptions.checkForObsoleteVersion(layout.layoutOptions, communityId) : Object.assign({}, defaultCustomizationOptions));
|
||||||
|
this.setStyle()
|
||||||
|
}, error => {
|
||||||
|
this.customizationOptions = defaultCustomizationOptions;
|
||||||
|
this.setStyle();
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
setStyle() {
|
||||||
|
this.style = `background-color: ` + this.customizationOptions.backgrounds.form.color + `;
|
||||||
|
background-image: ` + (this.customizationOptions.backgrounds.form.imageFile ? (Layout.getUrl(properties.utilsService + '/download/' + this.customizationOptions.backgrounds.form.imageFile)) : 'none') + `;
|
||||||
|
background-position:` + this.customizationOptions.backgrounds.form.position + `;`
|
||||||
|
this.fontsDarkMode = this.customizationOptions.backgrounds.form.fontsDarkMode;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
import {NgModule} from '@angular/core';
|
||||||
|
import {CommonModule} from '@angular/common';
|
||||||
|
import {CustomizationService} from "./customization.service";
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [
|
||||||
|
CommonModule
|
||||||
|
],
|
||||||
|
declarations: [],
|
||||||
|
providers: [
|
||||||
|
CustomizationService
|
||||||
|
],
|
||||||
|
exports: []
|
||||||
|
})
|
||||||
|
export class CustomizationServiceModule {
|
||||||
|
}
|
|
@ -23,10 +23,11 @@ export class MenuItem {
|
||||||
isFeatured: boolean;
|
isFeatured: boolean;
|
||||||
isActive: boolean;
|
isActive: boolean;
|
||||||
target: string = "_blank";
|
target: string = "_blank";
|
||||||
|
badge?: string = ""; // used only for RDGraph portal (FAIRCORE4EOSC)
|
||||||
|
|
||||||
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[],
|
constructor(id: string, title: string, url: string, route: string, needsAuthorization: boolean, entitiesRequired: string[],
|
||||||
routeRequired: string[], params, icon: Icon = null, fragment = null, customClass = null, routeActive = null,
|
routeRequired: string[], params, icon: Icon = null, fragment = null, customClass = null, routeActive = null,
|
||||||
target: string = "_blank", type: string = "internal", isFeatured: boolean = false, items: MenuItem[] = []) {
|
target: string = "_blank", type: string = "internal", isFeatured: boolean = false, items: MenuItem[] = [], badge: string = "") {
|
||||||
this._id = id;
|
this._id = id;
|
||||||
this.title = title;
|
this.title = title;
|
||||||
this.url = url;
|
this.url = url;
|
||||||
|
@ -43,6 +44,7 @@ export class MenuItem {
|
||||||
this.target = target;
|
this.target = target;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
this.isFeatured = isFeatured;
|
this.isFeatured = isFeatured;
|
||||||
|
this.badge = badge;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static isTheActiveMenu(menu: MenuItem, currentRoute: any, activeMenuItem: string = ""): boolean {
|
public static isTheActiveMenu(menu: MenuItem, currentRoute: any, activeMenuItem: string = ""): boolean {
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
<a *ngIf="!menu.url" [routerLink]="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired) && menu.items.length === 0?menu.route:null"
|
<a *ngIf="!menu.url" [routerLink]="menu.route && (isEnabled([menu.route], showPage) || !menu.routeRequired) && menu.items.length === 0?menu.route:null"
|
||||||
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||||
[queryParams]="menu.params"
|
[queryParams]="menu.params"
|
||||||
[fragment]="menu.fragment">{{menu.title}}<span *ngIf="menu.items.length > 0" class="uk-nav-parent-icon"></span></a>
|
[fragment]="menu.fragment">
|
||||||
|
<span *ngIf="menu.badge" style="position: relative"><span class="badge-mobile">{{menu.badge}}</span></span>
|
||||||
|
{{menu.title}}<span *ngIf="menu.items.length > 0" class="uk-nav-parent-icon"></span></a>
|
||||||
<a *ngIf="menu.url"
|
<a *ngIf="menu.url"
|
||||||
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
(click)="menu.items.length === 0?closeCanvas(canvas):null"
|
||||||
[href]="menu.items.length === 0?menu.url:null"
|
[href]="menu.items.length === 0?menu.url:null"
|
||||||
|
@ -215,7 +217,9 @@
|
||||||
<a *ngIf="menu.route.length == 0 && menu.url.length > 0"
|
<a *ngIf="menu.route.length == 0 && menu.url.length > 0"
|
||||||
href="{{menu.url}}" target="{{menu.target}}"
|
href="{{menu.url}}" target="{{menu.target}}"
|
||||||
[class.custom-external]="menu.target != '_self'">{{menu.title}}</a>
|
[class.custom-external]="menu.target != '_self'">{{menu.title}}</a>
|
||||||
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">{{menu.title}}</a>
|
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">
|
||||||
|
<span *ngIf="menu.badge" class="badge">{{menu.badge}}</span>
|
||||||
|
{{menu.title}}</a>
|
||||||
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
||||||
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -6,11 +6,14 @@ import {
|
||||||
ElementRef, EventEmitter,
|
ElementRef, EventEmitter,
|
||||||
Input, OnDestroy, Output,
|
Input, OnDestroy, Output,
|
||||||
QueryList,
|
QueryList,
|
||||||
ViewChild
|
ViewChild,
|
||||||
|
Inject,
|
||||||
|
PLATFORM_ID
|
||||||
} from "@angular/core";
|
} from "@angular/core";
|
||||||
import {SliderTabComponent} from "./slider-tab.component";
|
import {SliderTabComponent} from "./slider-tab.component";
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {Subscription} from "rxjs";
|
import {Subscription} from "rxjs";
|
||||||
|
import {isPlatformServer} from "@angular/common";
|
||||||
import Timeout = NodeJS.Timeout;
|
import Timeout = NodeJS.Timeout;
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
@ -20,7 +23,7 @@ declare var UIkit;
|
||||||
template: `
|
template: `
|
||||||
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
||||||
[ngClass]="customClass">
|
[ngClass]="customClass">
|
||||||
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'">
|
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
||||||
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
<ul #tabsElement [class.uk-flex-nowrap]="position === 'horizontal'"
|
||||||
[class.uk-slider-items]="position === 'horizontal'"
|
[class.uk-slider-items]="position === 'horizontal'"
|
||||||
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
[class.uk-tab-left]="position === 'left'" [class.uk-tab-right]="position === 'right'"
|
||||||
|
@ -78,8 +81,10 @@ declare var UIkit;
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
<ng-container *ngIf="!isServer">
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="previous"></slider-arrow>
|
||||||
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
<slider-arrow *ngIf="position === 'horizontal' && arrows" type="next"></slider-arrow>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
})
|
})
|
||||||
|
@ -112,6 +117,11 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
* */
|
* */
|
||||||
@Input()
|
@Input()
|
||||||
public flexPosition: 'center' | 'left' | 'right' = 'left';
|
public flexPosition: 'center' | 'left' | 'right' = 'left';
|
||||||
|
/**
|
||||||
|
* Set a class for the container
|
||||||
|
* */
|
||||||
|
@Input()
|
||||||
|
public containerClass: string;
|
||||||
/**
|
/**
|
||||||
* Set a class above tabs
|
* Set a class above tabs
|
||||||
* */
|
* */
|
||||||
|
@ -138,10 +148,13 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
private observer: IntersectionObserver;
|
private observer: IntersectionObserver;
|
||||||
private timeout: Timeout;
|
private timeout: Timeout;
|
||||||
|
isServer: boolean;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private cdr: ChangeDetectorRef) {
|
private cdr: ChangeDetectorRef,
|
||||||
|
@Inject(PLATFORM_ID) private platform: any) {
|
||||||
|
this.isServer = isPlatformServer(this.platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
|
@ -164,7 +177,7 @@ export class SliderTabsComponent implements AfterViewInit, OnDestroy {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.type === 'static') {
|
if (this.type === 'static') {
|
||||||
let tabs = UIkit.tab(this.tabsElement.nativeElement, {connect: this.connect});
|
let tabs = UIkit.switcher(this.tabsElement.nativeElement, {connect: this.connect});
|
||||||
tabs.show(this.activeIndex);
|
tabs.show(this.activeIndex);
|
||||||
if (this.connect.includes('#')) {
|
if (this.connect.includes('#')) {
|
||||||
this.scrollToStart();
|
this.scrollToStart();
|
||||||
|
|
|
@ -341,6 +341,14 @@ export class SearchFieldsBase {
|
||||||
operator: "pf",
|
operator: "pf",
|
||||||
equalityOperator: " = ",
|
equalityOperator: " = ",
|
||||||
filterType: "triplet"
|
filterType: "triplet"
|
||||||
|
},
|
||||||
|
["haslicense"]: {
|
||||||
|
name: "License",
|
||||||
|
type: "triplet",
|
||||||
|
param: "haslicense",
|
||||||
|
operator: "hl",
|
||||||
|
equalityOperator: " = ",
|
||||||
|
filterType: "triplet"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -377,6 +385,11 @@ export class SearchFieldsBase {
|
||||||
{ name: "All", id: "", count: "0" },
|
{ name: "All", id: "", count: "0" },
|
||||||
{ name: "Yes", id: "true", count: "0" },
|
{ name: "Yes", id: "true", count: "0" },
|
||||||
{ name: "No", id: "false", count: "0" }
|
{ name: "No", id: "false", count: "0" }
|
||||||
|
],
|
||||||
|
["haslicense"]: [
|
||||||
|
{ name: "All", id: "", count: "0" },
|
||||||
|
{ name: "Yes", id: "true", count: "0" },
|
||||||
|
{ name: "No", id: "false", count: "0" }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue