Add icons in menu items. Fix initialization of menus. Finish content providers base page
This commit is contained in:
parent
1e71eafa45
commit
4160f837c1
|
@ -5,10 +5,9 @@
|
||||||
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar">
|
<div class="sidebar_main_swipe" [class.sidebar_main_active]="open && hasSidebar" [class.sidebar_mini]="!open && hasSidebar">
|
||||||
<div id="modal-container"></div>
|
<div id="modal-container"></div>
|
||||||
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
|
<navbar *ngIf="hasHeader" portal="connect-admin" [header]="menuHeader" [communityId]="community ? community.communityId : null"
|
||||||
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user" [offCanvasFlip]="true"
|
[userMenuItems]=userMenuItems [menuItems]="menuItems" [user]="user" [offCanvasFlip]="true"></navbar>
|
||||||
[detectCommunityIdChanges]="true"></navbar>
|
|
||||||
<div>
|
<div>
|
||||||
<dashboard-sidebar *ngIf="hasSidebar" [headerUrl]="headerUrl" [items]="sideBarItems" [headerLogoUrl]="headerLogoUrl" [specialMenuItem]="specialSideBarMenuItem"></dashboard-sidebar>
|
<dashboard-sidebar *ngIf="hasSidebar" [items]="sideBarItems" [specialMenuItem]="specialSideBarMenuItem"></dashboard-sidebar>
|
||||||
<main>
|
<main>
|
||||||
<router-outlet></router-outlet>
|
<router-outlet></router-outlet>
|
||||||
</main>
|
</main>
|
||||||
|
|
|
@ -27,7 +27,7 @@ export class AppComponent implements OnInit {
|
||||||
params: BehaviorSubject<Params> = new BehaviorSubject<Params>(null);
|
params: BehaviorSubject<Params> = new BehaviorSubject<Params>(null);
|
||||||
data: BehaviorSubject<Data> = new BehaviorSubject<Data>(null);
|
data: BehaviorSubject<Data> = new BehaviorSubject<Data>(null);
|
||||||
hasSidebar: boolean = false;
|
hasSidebar: boolean = false;
|
||||||
hasHeader: boolean = false;
|
hasHeader: boolean = true;
|
||||||
hasAdminMenu: boolean = false;
|
hasAdminMenu: boolean = false;
|
||||||
isFrontPage: boolean = false;
|
isFrontPage: boolean = false;
|
||||||
sideBarItems: MenuItem[] = [];
|
sideBarItems: MenuItem[] = [];
|
||||||
|
@ -83,6 +83,11 @@ export class AppComponent implements OnInit {
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.layoutService.hasHeader.subscribe(hasHeader => {
|
this.subscriptions.push(this.layoutService.hasHeader.subscribe(hasHeader => {
|
||||||
this.hasHeader = hasHeader;
|
this.hasHeader = hasHeader;
|
||||||
|
if(!this.hasHeader) {
|
||||||
|
document.documentElement.style.setProperty('--header-height', '0');
|
||||||
|
} else {
|
||||||
|
document.documentElement.style.setProperty('--header-height', '65px');
|
||||||
|
}
|
||||||
this.cdr.detectChanges();
|
this.cdr.detectChanges();
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
|
this.subscriptions.push(this.layoutService.hasAdminMenu.subscribe(hasAdminMenu => {
|
||||||
|
@ -113,14 +118,14 @@ export class AppComponent implements OnInit {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
this.buildMenu();
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.communityService.setCommunity(null);
|
if(this.community) {
|
||||||
this.layoutService.setOpen(!(this.innerWidth && this.innerWidth < 1219));
|
this.communityService.setCommunity(null);
|
||||||
this.community = null;
|
this.community = null;
|
||||||
this.buildMenu();
|
this.buildMenu();
|
||||||
|
}
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -212,12 +217,12 @@ export class AppComponent implements OnInit {
|
||||||
badge: false,
|
badge: false,
|
||||||
stickyAnimation: false
|
stickyAnimation: false
|
||||||
};
|
};
|
||||||
this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, null, null, null, "/" + this.community.communityId + "/info"));
|
this.sideBarItems.push(new MenuItem("community", "Community Info", "", "/" + this.community.communityId, false, [], [], {}, {name: 'badge'}, null, null, "/" + this.community.communityId + "/info"));
|
||||||
this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/users"));
|
this.sideBarItems.push(new MenuItem("users", "Users", "", "/" + this.community.communityId + "/users", false, [], [], {}, {name: 'group'}, null, null, "/" + this.community.communityId + "/users"));
|
||||||
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/admin-tools"));
|
this.sideBarItems.push(new MenuItem("admin-tools", "Pages & Entities", "", "/" + this.community.communityId + "/admin-tools/pages", false, [], [], {}, {name: 'description'}, null, null, "/" + this.community.communityId + "/admin-tools"));
|
||||||
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}));
|
this.sideBarItems.push(new MenuItem("customization", "Customization", "", "/" + this.community.communityId + "/customize-layout", false, [], [], {}, {name: 'brush'}));
|
||||||
if (this.community.type === 'ri') {
|
if (this.community.type === 'ri') {
|
||||||
this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, null, null, null, "/" + this.community.communityId + "/mining"));
|
this.sideBarItems.push(new MenuItem("mining", "Mining", "", "/" + this.community.communityId + "/mining/manage-profiles", false, [], [], {}, {name: 'architecture'}, null, null, "/" + this.community.communityId + "/mining"));
|
||||||
}
|
}
|
||||||
this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
|
this.specialSideBarMenuItem = new MenuItem("back", "Manage communities", "", "/", false, [], null, {}, {name: 'search', class: 'uk-text-secondary'});
|
||||||
|
|
||||||
|
@ -283,7 +288,9 @@ export class AppComponent implements OnInit {
|
||||||
badge: false,
|
badge: false,
|
||||||
stickyAnimation: false
|
stickyAnimation: false
|
||||||
};
|
};
|
||||||
this.sideBarItems.push(new MenuItem("communities", "Manage Communities", "", "/", false, [], [], {}, {name: 'settings'}));
|
if(this.isCurator()) {
|
||||||
|
this.sideBarItems.push(new MenuItem("communities", "Manage Communities", "", "/", false, [], [], {}, {name: 'settings'}));
|
||||||
|
}
|
||||||
if (Session.isPortalAdministrator(this.user)) {
|
if (Session.isPortalAdministrator(this.user)) {
|
||||||
this.sideBarItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin-tools'));
|
this.sideBarItems.push(new MenuItem("super_admin", "Super Admin Options", "", "/admin-tools/portals", false, [], [], {}, {name: 'settings'}, null, null, '/admin-tools'));
|
||||||
this.sideBarItems.push(new MenuItem("connect", "Connect Options", "", "/connect/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/connect/admin-tools'));
|
this.sideBarItems.push(new MenuItem("connect", "Connect Options", "", "/connect/admin-tools/pages", false, [], [], {}, {name: 'settings'}, null, null, '/connect/admin-tools'));
|
||||||
|
@ -291,6 +298,7 @@ export class AppComponent implements OnInit {
|
||||||
}
|
}
|
||||||
this.specialSideBarMenuItem = null;
|
this.specialSideBarMenuItem = null;
|
||||||
}
|
}
|
||||||
|
this.hasSidebar = this.hasSidebar && this.sideBarItems.length > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
private isCurator() {
|
private isCurator() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {NgModule} from '@angular/core';
|
import {NgModule} from '@angular/core';
|
||||||
import {PreloadAllModules, RouterModule, Routes} from '@angular/router';
|
import {RouterModule, Routes} from '@angular/router';
|
||||||
import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard';
|
import {IsCommunity} from './openaireLibrary/connect/communityGuard/isCommunity.guard';
|
||||||
import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
|
import {ConnectAdminLoginGuard} from './openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
|
||||||
import {AdminErrorPageComponent} from './pages/error/errorPage.component';
|
import {AdminErrorPageComponent} from './pages/error/errorPage.component';
|
||||||
|
@ -60,10 +60,7 @@ const routes: Routes = [
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [RouterModule.forRoot(routes, {
|
imports: [RouterModule.forRoot(routes)],
|
||||||
preloadingStrategy: PreloadAllModules,
|
|
||||||
onSameUrlNavigation: "reload"
|
|
||||||
})],
|
|
||||||
exports: [ RouterModule ]
|
exports: [ RouterModule ]
|
||||||
})
|
})
|
||||||
export class AppRoutingModule {}
|
export class AppRoutingModule {}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 936c870abcb48b632f3a1433130e8701c813fa65
|
Subproject commit a738d3bb49d1af38f7eaf3ce34d519c76f075e4a
|
|
@ -35,47 +35,47 @@
|
||||||
<no-load-paging (pageChange)="updatePage($event)" [page]="page" [totalResults]="affiliations.length"
|
<no-load-paging (pageChange)="updatePage($event)" [page]="page" [totalResults]="affiliations.length"
|
||||||
[pageSize]="pageSize" [type]="'supporting organization' + (affiliations.length > 1?'s':'')">
|
[pageSize]="pageSize" [type]="'supporting organization' + (affiliations.length > 1?'s':'')">
|
||||||
</no-load-paging>
|
</no-load-paging>
|
||||||
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-top uk-margin-bottom">
|
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-top uk-margin-bottom" uk-height-match="target: .uk-card-body; row: false" uk-grid>
|
||||||
<div *ngFor="let affiliation of currentPage; let i=index">
|
<div *ngFor="let affiliation of currentPage; let i=index">
|
||||||
<div class="uk-card uk-card-default uk-margin-bottom">
|
<div class="uk-card uk-card-default">
|
||||||
<div class="uk-card-body">
|
<div class="uk-card-body">
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-column">
|
<div class="uk-flex uk-flex-middle uk-flex-column">
|
||||||
<div class="uk-width-small uk-height-max-small">
|
<div class="uk-flex uk-flex-center">
|
||||||
<img [src]="affiliation.logo_url | urlPrefix">
|
<img class="uk-height-xsmall uk-blend-multiply" [src]="affiliation.logo_url | urlPrefix">
|
||||||
</div>
|
</div>
|
||||||
<h5>{{affiliation.name}}</h5>
|
<h5>{{affiliation.name}}</h5>
|
||||||
<div class="uk-text-truncate uk-text-small">
|
<div class="uk-text-truncate uk-text-small">
|
||||||
<span class="uk-text-meta uk-margin-xsmall-right">URL:</span>
|
<span class="uk-text-meta uk-margin-xsmall-right">URL:</span>
|
||||||
<a [href]="affiliation.website_url | urlPrefix" class="uk-link"
|
<a [href]="affiliation.website_url | urlPrefix" class="uk-link"
|
||||||
target="_blank">{{affiliation.website_url}}</a>
|
target="_blank">{{affiliation.website_url}}</a>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="uk-card-footer uk-padding-remove-vertical">
|
|
||||||
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
|
|
||||||
<div>
|
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
|
||||||
<a (click)="editAffiliationOpen(i)"
|
|
||||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
|
||||||
<icon name="edit" [flex]="true"></icon>
|
|
||||||
<span class="uk-margin-xsmall-left">Edit</span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</div>
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
<div class="uk-card-footer uk-padding-remove-vertical">
|
||||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
|
||||||
(click)="deleteAffiliationOpen(i)">
|
<div>
|
||||||
<icon name="delete" [flex]="true"></icon>
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
<span class="uk-margin-xsmall-left">Delete</span>
|
<a (click)="editAffiliationOpen(i)"
|
||||||
</button>
|
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||||
|
<icon name="edit" [flex]="true"></icon>
|
||||||
|
<span class="uk-margin-xsmall-left">Edit</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
|
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||||
|
(click)="deleteAffiliationOpen(i)">
|
||||||
|
<icon name="delete" [flex]="true"></icon>
|
||||||
|
<span class="uk-margin-xsmall-left">Delete</span>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="uk-margin-small-top">
|
<div class="uk-margin-small-top">
|
||||||
<paging-no-load [currentPage]="page"
|
<paging-no-load [currentPage]="page"
|
||||||
[totalResults]="affiliations.length" [size]="pageSize"
|
[totalResults]="affiliations.length" [size]="pageSize"
|
||||||
|
|
|
@ -189,7 +189,6 @@ export class EditCommunityComponent {
|
||||||
|
|
||||||
public save(callback: Function, errorCallback: Function = null) {
|
public save(callback: Function, errorCallback: Function = null) {
|
||||||
if (this.file) {
|
if (this.file) {
|
||||||
this.communityFb.get('shortName').enable();
|
|
||||||
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/community/" + encodeURIComponent(this.community.communityId), this.file).subscribe(res => {
|
this.subscriptions.push(this.utilsService.uploadPhoto(this.properties.utilsService + "/upload/community/" + encodeURIComponent(this.community.communityId), this.file).subscribe(res => {
|
||||||
this.deletePhoto();
|
this.deletePhoto();
|
||||||
this.communityFb.get('logoUrl').setValue(res.filename);
|
this.communityFb.get('logoUrl').setValue(res.filename);
|
||||||
|
@ -211,7 +210,7 @@ export class EditCommunityComponent {
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
this.removePhoto();
|
this.removePhoto();
|
||||||
this.subscriptions.push(this.communityService.updateCommunity(
|
this.subscriptions.push(this.communityService.updateCommunity(
|
||||||
this.properties.communityAPI + this.community.communityId, this.communityFb.value).subscribe(() => {
|
this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
|
||||||
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
||||||
UIkit.notification(community.shortTitle + ' has been <b>successfully created</b>', {
|
UIkit.notification(community.shortTitle + ' has been <b>successfully created</b>', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
@ -231,7 +230,7 @@ export class EditCommunityComponent {
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this.communityService.updateCommunity(this.properties.communityAPI + this.community.communityId, this.communityFb.value).subscribe(() => {
|
this.subscriptions.push(this.communityService.updateCommunity(this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
|
||||||
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
|
||||||
UIkit.notification(community.shortTitle + ' has been <b>successfully saved</b>', {
|
UIkit.notification(community.shortTitle + ' has been <b>successfully saved</b>', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
|
|
@ -17,7 +17,7 @@ import {NoLoadPaging} from "../../openaireLibrary/searchPages/searchUtils/no-loa
|
||||||
import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module";
|
import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module";
|
||||||
import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module";
|
import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module";
|
||||||
import {IconsService} from "../../openaireLibrary/utils/icons/icons.service";
|
import {IconsService} from "../../openaireLibrary/utils/icons/icons.service";
|
||||||
import {add, arrow_left, close, edit, remove_circle_outline} from "../../openaireLibrary/utils/icons/icons";
|
import {add, arrow_left, close, edit, filters, remove_circle_outline} from "../../openaireLibrary/utils/icons/icons";
|
||||||
import {FullScreenModalModule} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module";
|
import {FullScreenModalModule} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module";
|
||||||
import {ResultPreviewModule} from "../../openaireLibrary/utils/result-preview/result-preview.module";
|
import {ResultPreviewModule} from "../../openaireLibrary/utils/result-preview/result-preview.module";
|
||||||
import {SearchDataprovidersServiceModule} from "../../openaireLibrary/connect/contentProviders/searchDataprovidersService.module";
|
import {SearchDataprovidersServiceModule} from "../../openaireLibrary/connect/contentProviders/searchDataprovidersService.module";
|
||||||
|
@ -63,6 +63,6 @@ import {SearchDataprovidersService} from "../../openaireLibrary/services/searchD
|
||||||
|
|
||||||
export class CommunityContentProvidersModule {
|
export class CommunityContentProvidersModule {
|
||||||
constructor(private iconsService: IconsService) {
|
constructor(private iconsService: IconsService) {
|
||||||
this.iconsService.registerIcons([remove_circle_outline, add, edit, close, arrow_left]);
|
this.iconsService.registerIcons([filters]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,34 +1,35 @@
|
||||||
import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
|
import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
|
||||||
import {ActivatedRoute, Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
|
|
||||||
import {RemoveContentProvidersComponent} from './remove-content-providers.component';
|
import {RemoveContentProvidersComponent} from './remove-content-providers.component';
|
||||||
|
|
||||||
import {Session} from '../../openaireLibrary/login/utils/helper.class';
|
|
||||||
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
|
|
||||||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||||
import {Title} from '@angular/platform-browser';
|
import {Title} from '@angular/platform-browser';
|
||||||
import {FullScreenModalComponent} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component";
|
import {
|
||||||
|
FullScreenModalComponent
|
||||||
|
} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component";
|
||||||
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
import {StringUtils} from "../../openaireLibrary/utils/string-utils.class";
|
||||||
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
import {EnvProperties} from "../../openaireLibrary/utils/properties/env-properties";
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
import {Subscriber} from "rxjs";
|
import {Subscriber} from "rxjs";
|
||||||
|
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||||
|
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'manage-content-providers',
|
selector: 'manage-content-providers',
|
||||||
template: `
|
template: `
|
||||||
<remove-content-providers (toggleView)="toggleAction()" [communityContentProviders]="communityContentProviders"
|
<remove-content-providers (toggleView)="toggleAction()" [communityContentProviders]="communityContentProviders"
|
||||||
[showLoading]="showLoadingInRemove"
|
[loading]="showLoadingInRemove" [community]="community"
|
||||||
(communityContentProvidersChanged)="communityContentProvidersChanged($event)" [toggle]="toggle">
|
(communityContentProvidersChanged)="communityContentProvidersChanged($event)" [toggle]="toggle">
|
||||||
</remove-content-providers>
|
</remove-content-providers>
|
||||||
<fs-modal #fsModal (cancelEmitter)="toggleAction()">
|
<fs-modal #fsModal (cancelEmitter)="toggleAction()">
|
||||||
<div actions class="uk-flex uk-flex-middle uk-height-1-1">
|
<div actions class="uk-flex uk-flex-middle uk-height-1-1">
|
||||||
<span class="uk-button uk-text-secondary" uk-icon="icon: info; ratio: 1.3"></span>
|
<span class="uk-button uk-text-secondary" uk-icon="icon: info; ratio: 1.3"></span>
|
||||||
<div *ngIf="communityId" uk-drop="mode: hover">
|
<div *ngIf="community" uk-drop="mode: hover">
|
||||||
<div class="uk-card uk-card-body uk-card-default">
|
<div class="uk-card uk-card-body uk-card-default">
|
||||||
If you cannot find a content provider relevant to your community, probably it is not OpenAIRE compliant.
|
If you cannot find a content provider relevant to your community, probably it is not OpenAIRE compliant.
|
||||||
Feel free to contact us
|
Feel free to contact us
|
||||||
(<a
|
(<a
|
||||||
[href]="'mailto:' + properties.feedbackmailForMissingEntities +'?Subject=[OpenAIRE Connect - '+ communityId + '] report missing Funder' + '&body=' + body"
|
[href]="'mailto:' + properties.feedbackmailForMissingEntities +'?Subject=[OpenAIRE Connect - '+ community.shortTitle + '] report missing Funder' + '&body=' + body"
|
||||||
target="_top">{{properties.feedbackmailForMissingEntities}}</a>)
|
target="_top">{{properties.feedbackmailForMissingEntities}}</a>)
|
||||||
to let us know and we'll try to get the provider on board!
|
to let us know and we'll try to get the provider on board!
|
||||||
</div>
|
</div>
|
||||||
|
@ -45,33 +46,27 @@ export class ManageContentProvidersComponent implements OnInit {
|
||||||
@Input() communityContentProviders = [];
|
@Input() communityContentProviders = [];
|
||||||
@ViewChild(RemoveContentProvidersComponent) removeContentProvidersComponent: RemoveContentProvidersComponent;
|
@ViewChild(RemoveContentProvidersComponent) removeContentProvidersComponent: RemoveContentProvidersComponent;
|
||||||
@ViewChild('fsModal', { static: true }) fullscreen: FullScreenModalComponent;
|
@ViewChild('fsModal', { static: true }) fullscreen: FullScreenModalComponent;
|
||||||
|
|
||||||
public toggle: boolean = false;
|
public toggle: boolean = false;
|
||||||
|
|
||||||
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 communityId: string = "";
|
public community: CommunityInfo;
|
||||||
|
|
||||||
constructor(private element: ElementRef,
|
constructor(private element: ElementRef,
|
||||||
private title: Title,
|
private title: Title,
|
||||||
private route: ActivatedRoute, private _router: Router) {
|
private communityService: CommunityService, private _router: Router) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.route.params.subscribe(params => {
|
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
||||||
this.communityId = params['community'];
|
this.community = community;
|
||||||
|
if (this.community) {
|
||||||
if (this.communityId) {
|
this.title.setTitle(this.community.shortTitle.toUpperCase() + ' | Content Providers');
|
||||||
this.title.setTitle(this.communityId.toUpperCase() + ' | Content Providers');
|
|
||||||
this.body = "[Please write your message here]";
|
this.body = "[Please write your message here]";
|
||||||
this.body = StringUtils.URIEncode(this.body);
|
this.body = StringUtils.URIEncode(this.body);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.fullscreen.title = "Search and Add Content Providers";
|
this.fullscreen.title = "Search and Add Content Providers";
|
||||||
this.fullscreen.okButtonText = "Done";
|
this.fullscreen.okButtonText = "Done";
|
||||||
this.fullscreen.okButton = true;
|
this.fullscreen.okButton = true;
|
||||||
|
@ -86,17 +81,10 @@ export class ManageContentProvidersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleAction() {
|
public toggleAction() {
|
||||||
if (!Session.isLoggedIn()) {
|
HelperFunctions.scroll();
|
||||||
this._router.navigate(['/user-info'], {
|
this.toggle = !this.toggle;
|
||||||
queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
|
if (this.toggle) {
|
||||||
});
|
this.fullscreen.open();
|
||||||
} else {
|
|
||||||
HelperFunctions.scroll();
|
|
||||||
|
|
||||||
this.toggle = !this.toggle;
|
|
||||||
if (this.toggle) {
|
|
||||||
this.fullscreen.open();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,150 +1,111 @@
|
||||||
<div page-content>
|
<div page-content (stickyEmitter)="stickyPageHeader = $event">
|
||||||
<div header>
|
<div header>
|
||||||
<community-info tab="content-providers"></community-info>
|
<div class="uk-flex uk-flex-middle uk-margin-top info" [class.uk-active]="stickyPageHeader">
|
||||||
<div [class.uk-invisible]="showLoading"
|
<div>
|
||||||
class="uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-flex-wrap uk-flex-middle uk-grid" uk-grid>
|
<div class="uk-margin-remove uk-text-background uk-text-bold uk-h6">Admin Dashboard - Manage Content Providers
|
||||||
<div class="uk-flex-last@m">
|
</div>
|
||||||
<a class="uk-text-uppercase uk-flex uk-flex-middle" (click)="addNew()"
|
<h1 class="uk-h4 uk-margin-remove">{{community.shortTitle}}</h1>
|
||||||
[attr.uk-tooltip]="(toggle? 'cls: uk-invisible; ' : 'cls: uk-active; ') +
|
|
||||||
'title: <div class=\'uk-padding-small\'><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more Content Providers</div><div>The research results collected from the content providers specified here will be automatically linked to your community dashboard.</div></div>'">
|
|
||||||
<button class="uk-icon-button large uk-button-secondary">
|
|
||||||
<icon name="add"></icon>
|
|
||||||
</button>
|
|
||||||
<button class="uk-button uk-button-link uk-margin-small-left uk-text-secondary">Add new content provider
|
|
||||||
</button>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div #searchInputComponent search-input [control]="filterForm.controls.keyword" [showSearch]="false"
|
|
||||||
placeholder="Search Content Providers"
|
|
||||||
[selected]="communitySearchUtils.keyword" (closeEmitter)="onSearchClose()" (resetEmitter)="resetInput()"
|
|
||||||
[bordered]="true" colorClass="uk-text-secondary"
|
|
||||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<community-info tab="content-providers"></community-info>
|
||||||
</div>
|
</div>
|
||||||
<div inner>
|
<div inner>
|
||||||
<div *ngIf="showLoading" class="uk-margin-large-top">
|
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
|
||||||
<loading></loading>
|
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||||
</div>
|
placeholder="Search Content Providers" [disabled]="loading"
|
||||||
<div *ngIf="!showLoading">
|
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||||
<div>
|
<div>
|
||||||
<!-- <div class="uk-grid uk-flex uk-flex-middle uk-margin-medium-bottom" uk-grid>-->
|
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
||||||
<!-- <div *ngIf="previewCommunityContentProviders.length > 0"-->
|
[attr.uk-tooltip]="(toggle? 'cls: uk-invisible; ' : 'cls: uk-active; ') +
|
||||||
<!-- class="uk-width-expand@m uk-width-1-1">-->
|
'title: <div><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more Content Providers</div><div>The research results collected from the content providers specified here will be automatically linked to your community dashboard.</div></div>'"
|
||||||
<!-- <div class="uk-flex-middle uk-flex-right@m uk-flex-center uk-grid">-->
|
[disabled]="loading" [class.uk-disabled]="loading">
|
||||||
<!-- <span class="">Sort by: </span>-->
|
<icon name="add" [flex]="true"></icon>
|
||||||
<!-- <div class="uk-width-medium uk-padding-remove uk-margin-small-left" dashboard-input-->
|
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New content provider</span>
|
||||||
<!-- [formInput]="filterForm.get('sort')"-->
|
</button>
|
||||||
<!-- type="select"-->
|
</div>
|
||||||
<!-- [options]="sortOptions">-->
|
</div>
|
||||||
<!-- </div>-->
|
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||||
<!-- </div>-->
|
<div *ngIf="loading" class="uk-margin-large-top">
|
||||||
<!-- </div>-->
|
<loading></loading>
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<no-load-paging *ngIf="previewCommunityContentProviders.length > 0" [type]="'content providers'"
|
<div *ngIf="!loading">
|
||||||
(pageChange)="updatePage($event)"
|
<div *ngIf="previewCommunityContentProviders.length == 0"
|
||||||
[page]="page" [pageSize]="resultsPerPage"
|
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||||
[totalResults]="previewCommunityContentProviders.length">
|
<div>No content providers found</div>
|
||||||
</no-load-paging>
|
</div>
|
||||||
<div class="uk-margin-medium-top uk-margin-medium-bottom">
|
<div *ngIf="previewCommunityContentProviders.length > 0">
|
||||||
<div *ngIf="previewCommunityContentProviders.length == 0"
|
<no-load-paging [type]="'content providers'"
|
||||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
(pageChange)="updatePage($event)"
|
||||||
<div>No content providers for {{name}}</div>
|
[page]="page" [pageSize]="resultsPerPage"
|
||||||
</div>
|
[totalResults]="previewCommunityContentProviders.length">
|
||||||
|
</no-load-paging>
|
||||||
<div class="uk-card uk-card-default uk-text-small uk-margin-bottom"
|
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-top uk-margin-bottom"
|
||||||
*ngFor="let item of previewCommunityContentProviders.slice((page - 1)*resultsPerPage, page*resultsPerPage)">
|
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||||
<div class="uk-grid uk-grid-divider uk-padding" uk-grid>
|
<div *ngFor="let item of currentPage; let i=index">
|
||||||
<div class="uk-width-expand@m uk-width-1-1">
|
<div class="uk-card uk-card-default">
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
<div class="uk-card-body">
|
||||||
<!-- <h6 *ngIf="item.name || item.officialname || item.openaireId || item.selectioncriteria"-->
|
<h6 class="uk-margin-bottom">
|
||||||
<!-- class="uk-margin-small-bottom">-->
|
|
||||||
<!-- <a *ngIf="item.openaireId"-->
|
|
||||||
<!-- target="_blank"-->
|
|
||||||
<!-- [href]="contentProviderUrl+item.openaireId">-->
|
|
||||||
<!-- <span *ngIf="item.name">{{item.name}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name && item.officialname">{{item.officialname}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name && !item.officialname">[no title available]</span>-->
|
|
||||||
<!-- <span class="custom-external custom-icon space"></span>-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- <span *ngIf="!item.openaireId">-->
|
|
||||||
<!-- <span *ngIf="item.name">{{item.name}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name && item.officialname">{{item.officialname}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name && !item.officialname">[no title available]</span>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </h6>-->
|
|
||||||
<!-- <h6 *ngIf="item.name || item.officialname || item.openaireId || item.selectioncriteria"-->
|
|
||||||
<!-- class="uk-margin-small-bottom">-->
|
|
||||||
<!-- <a *ngIf="item.openaireId"-->
|
|
||||||
<!-- target="_blank"-->
|
|
||||||
<!-- [href]="contentProviderUrl+item.openaireId">-->
|
|
||||||
<!-- <span *ngIf="item.name">{{item.name}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name">[no title available]</span>-->
|
|
||||||
<!-- <span class="custom-external custom-icon space"></span>-->
|
|
||||||
<!-- </a>-->
|
|
||||||
<!-- <span *ngIf="!item.openaireId">-->
|
|
||||||
<!-- <span *ngIf="item.name">{{item.name}}</span>-->
|
|
||||||
<!-- <span *ngIf="!item.name">[no title available]</span>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </h6>-->
|
|
||||||
<h6 class="uk-margin-small-bottom">
|
|
||||||
<a *ngIf="item.openaireId"
|
<a *ngIf="item.openaireId"
|
||||||
target="_blank"
|
target="_blank" class="custom-external uk-link-text"
|
||||||
[href]="contentProviderUrl+item.openaireId">
|
[href]="contentProviderUrl+item.openaireId">
|
||||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||||
<span class="custom-external custom-icon space"></span>
|
|
||||||
</a>
|
</a>
|
||||||
<span *ngIf="!item.openaireId">
|
<span *ngIf="!item.openaireId">
|
||||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||||
</span>
|
</span>
|
||||||
</h6>
|
</h6>
|
||||||
<!-- <div *ngIf="item.name && item.officialname" class="uk-margin-small-bottom">-->
|
<div *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-bottom uk-text-small">
|
||||||
<!-- <div *ngIf="item.officialname" class="uk-margin-small-bottom">-->
|
<div class="uk-text-meta uk-margin-small-bottom">Filters</div>
|
||||||
<!-- <span class="title">Official Name: </span>-->
|
|
||||||
<!-- <span>{{item.officialname}}</span>-->
|
|
||||||
<!-- </div>-->
|
|
||||||
<div *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-bottom">
|
|
||||||
<div class="title uk-margin-small-bottom">Filters</div>
|
|
||||||
<div [innerHTML]="getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
<div [innerHTML]="getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
||||||
<a *ngIf="item.selectioncriteria.criteria.length > 3" class="uk-link uk-margin-top" [routerLink]="'./' + item.openaireId">View all {{item.selectioncriteria.criteria.length}} filters</a>
|
<div *ngIf="item.selectioncriteria.criteria.length > 3" class="uk-margin-small-top">
|
||||||
|
<a class="uk-link view-more-less-link" [routerLink]="'./' + item.openaireId">View all {{item.selectioncriteria.criteria.length}} filters</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="uk-card-footer uk-padding-remove-vertical">
|
||||||
<div class="uk-width-auto@m uk-width-1-1">
|
<div class="uk-grid uk-grid-small uk-flex-nowrap uk-grid-divider uk-flex-right" uk-grid>
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-center uk-flex-column uk-height-1-1">
|
<div>
|
||||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
<a (click)="goToCriteria(item.openaireId)" class="uk-button action uk-flex uk-flex-middle">
|
<a (click)="goToCriteria(item.openaireId)" class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||||
<icon name="edit"></icon>
|
<icon name="filters" [flex]="true"></icon>
|
||||||
<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"
|
<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"
|
||||||
uk-tooltip="<div class='uk-padding-small'>Edit filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
uk-tooltip="<div>Edit filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
||||||
Edit filters
|
Edit filters
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"
|
<span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"
|
||||||
uk-tooltip="<div class='uk-padding-small'>Add filter to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
uk-tooltip="<div>Add filter to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
||||||
Add filters
|
Add filters
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<a (click)="removeContentProvider(item)"
|
</div>
|
||||||
class="uk-button action uk-flex uk-flex-middle uk-margin-small-top">
|
</div>
|
||||||
<icon name="remove_circle_outline"></icon>
|
<div>
|
||||||
<span class="uk-margin-small-left">Remove content provider</span>
|
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||||
</a>
|
<a (click)="removeContentProvider(item)"
|
||||||
|
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||||
|
<icon name="delete" [flex]="true"></icon>
|
||||||
|
<span class="uk-margin-small-left">Delete</span>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="uk-margin-small-top">
|
||||||
|
<paging-no-load [currentPage]="page"
|
||||||
|
[totalResults]="previewCommunityContentProviders.length" [size]="resultsPerPage"
|
||||||
|
(pageChange)="updatePage($event)" customClasses="uk-flex-right@m uk-flex-center">
|
||||||
|
</paging-no-load>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<no-load-paging *ngIf="previewCommunityContentProviders.length > 0" [type]="'content providers'"
|
|
||||||
(pageChange)="updatePage($event)"
|
|
||||||
[page]="page" [pageSize]="resultsPerPage"
|
|
||||||
[totalResults]="previewCommunityContentProviders.length">
|
|
||||||
</no-load-paging>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteContentProvider($event)"></modal-alert>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeleteContentProvider()"></modal-alert>
|
||||||
|
|
|
@ -3,43 +3,39 @@ import {ActivatedRoute, Router} from "@angular/router";
|
||||||
import {Subscriber} from 'rxjs';
|
import {Subscriber} from 'rxjs';
|
||||||
|
|
||||||
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
|
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
|
||||||
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
|
|
||||||
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
|
||||||
import {ManageCommunityContentProvidersService} from '../../services/manageContentProviders.service';
|
import {ManageCommunityContentProvidersService} from '../../services/manageContentProviders.service';
|
||||||
import {SearchCommunityDataprovidersService} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
|
import {
|
||||||
|
SearchCommunityDataprovidersService
|
||||||
|
} from '../../openaireLibrary/connect/contentProviders/searchDataproviders.service';
|
||||||
import {RouterHelper} from '../../openaireLibrary/utils/routerHelper.class';
|
import {RouterHelper} from '../../openaireLibrary/utils/routerHelper.class';
|
||||||
|
import {Criteria} from '../../openaireLibrary/utils/entities/contentProvider';
|
||||||
import {Session} from '../../openaireLibrary/login/utils/helper.class';
|
|
||||||
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
|
|
||||||
import {Criteria, SelectionCriteria} from '../../openaireLibrary/utils/entities/contentProvider';
|
|
||||||
import {properties} from "../../../environments/environment";
|
import {properties} from "../../../environments/environment";
|
||||||
import {SearchInputComponent} from "../../openaireLibrary/sharedComponents/search-input/search-input.component";
|
import {SearchInputComponent} from "../../openaireLibrary/sharedComponents/search-input/search-input.component";
|
||||||
import {FormBuilder, FormGroup} from "@angular/forms";
|
import {FormBuilder, FormGroup} from "@angular/forms";
|
||||||
import {Option} from "../../openaireLibrary/sharedComponents/input/input.component";
|
|
||||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
|
||||||
import {CriteriaUtils} from "./criteria-utils";
|
import {CriteriaUtils} from "./criteria-utils";
|
||||||
|
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||||
declare var UIkit;
|
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
||||||
|
import {AlertModal} from "../../openaireLibrary/utils/modal/alert";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'remove-content-providers',
|
selector: 'remove-content-providers',
|
||||||
templateUrl: './remove-content-providers.component.html'
|
templateUrl: './remove-content-providers.component.html'
|
||||||
})
|
})
|
||||||
export class RemoveContentProvidersComponent implements OnInit {
|
export class RemoveContentProvidersComponent implements OnInit {
|
||||||
public portal: string;
|
|
||||||
public name: string;
|
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
public contentProviderUrl = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToDataProvider;
|
public contentProviderUrl = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToDataProvider;
|
||||||
public previewCommunityContentProviders = [];
|
public previewCommunityContentProviders = [];
|
||||||
public communitySearchUtils: SearchUtilsClass = new SearchUtilsClass();
|
|
||||||
public errorCodes: ErrorCodes;
|
public errorCodes: ErrorCodes;
|
||||||
@Input() public showLoading: boolean = true;
|
@Input() public loading: boolean = true;
|
||||||
|
@Input() public community: CommunityInfo;
|
||||||
@Input() public communityContentProviders = [];
|
@Input() public communityContentProviders = [];
|
||||||
@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;
|
||||||
@ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
|
public stickyPageHeader: boolean = false;
|
||||||
|
@ViewChild('deleteModal') deleteModal: AlertModal;
|
||||||
/** Criteria */
|
/** Criteria */
|
||||||
private fields = CriteriaUtils.fields;
|
private fields = CriteriaUtils.fields;
|
||||||
private verbs = CriteriaUtils.verbs;
|
private verbs = CriteriaUtils.verbs;
|
||||||
|
@ -51,55 +47,30 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
filterForm: FormGroup;
|
filterForm: FormGroup;
|
||||||
private searchText: RegExp = new RegExp('');
|
private searchText: RegExp = new RegExp('');
|
||||||
public keyword: string = '';
|
public keyword: string = '';
|
||||||
sortOptions: Option[] = [
|
|
||||||
{label: "Name ", value: {sort: "name", descending: false}},
|
|
||||||
{label: "Official Name ", value: {sort: "officialname", descending: false}}
|
|
||||||
];
|
|
||||||
|
|
||||||
@Output() toggleView: EventEmitter<any> = new EventEmitter();
|
@Output() toggleView: EventEmitter<any> = new EventEmitter();
|
||||||
@Input() public toggle: boolean = true;
|
@Input() public toggle: boolean = true;
|
||||||
|
|
||||||
constructor(private route: ActivatedRoute, private _router: Router,
|
constructor(private route: ActivatedRoute, private _router: Router,
|
||||||
private _fb: FormBuilder, private communityService: CommunityService,
|
private _fb: FormBuilder,
|
||||||
private _manageCommunityContentProvidersService: ManageCommunityContentProvidersService,
|
private _manageCommunityContentProvidersService: ManageCommunityContentProvidersService,
|
||||||
private _searchCommunityContentProvidersService: SearchCommunityDataprovidersService) {
|
private _searchCommunityContentProvidersService: SearchCommunityDataprovidersService) {
|
||||||
this.errorCodes = new ErrorCodes();
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.communitySearchUtils.keyword = "";
|
|
||||||
|
|
||||||
this.filterForm = this._fb.group({
|
this.filterForm = this._fb.group({
|
||||||
keyword: [''],
|
keyword: [''],
|
||||||
// sort: this._fb.control(this.sortOptions[0].value)
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.subscriptions.push(this.filterForm.get('keyword').valueChanges.subscribe(value => {
|
this.subscriptions.push(this.filterForm.get('keyword').valueChanges.subscribe(value => {
|
||||||
this.searchText = new RegExp(value, 'i');
|
this.searchText = new RegExp(value, 'i');
|
||||||
this.page = 1;
|
this.page = 1;
|
||||||
this.applyFilters();
|
this.applyFilters();
|
||||||
}));
|
}));
|
||||||
|
this.contentProviderUrl = "https://"
|
||||||
// this.subscriptions.push(this.filterForm.get('sort').valueChanges.subscribe(value => {
|
+ ((this.properties.environment == "beta" || this.properties.environment == "development") ? "beta." : "")
|
||||||
// this.page = 1;
|
+ this.community.communityId + ".openaire.eu" + this.properties.searchLinkToDataProvider;
|
||||||
// this.sort();
|
this.getCommunityContentProviders();
|
||||||
// }));
|
|
||||||
|
|
||||||
this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
|
|
||||||
if (community) {
|
|
||||||
this.portal = community.communityId;
|
|
||||||
this.name = community.shortTitle;
|
|
||||||
this.contentProviderUrl = "https://"
|
|
||||||
+ ((this.properties.environment == "beta" || this.properties.environment == "development") ? "beta." : "")
|
|
||||||
+ this.portal + ".openaire.eu" + this.properties.searchLinkToDataProvider;
|
|
||||||
|
|
||||||
this.keyword = '';
|
|
||||||
this._getCommunityContentProviders();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.subscriptions.forEach(sub => {
|
this.subscriptions.forEach(sub => {
|
||||||
if (sub instanceof Subscriber) {
|
if (sub instanceof Subscriber) {
|
||||||
|
@ -107,273 +78,117 @@ export class RemoveContentProvidersComponent implements OnInit {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCriteriaLabel(selectionCriteria: SelectionCriteria): string {
|
|
||||||
if (selectionCriteria && selectionCriteria.criteria.length > 0) {
|
|
||||||
return (selectionCriteria.criteria.length === 1) ? '1 criterion' : (selectionCriteria.criteria.length + ' criteria')
|
|
||||||
} else {
|
|
||||||
return 'no criteria';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// filterData(row: any, query: string) {
|
|
||||||
// let returnValue: boolean = false;
|
|
||||||
//
|
|
||||||
// if(query) {
|
|
||||||
// for(var i=0; i <2; i++){
|
|
||||||
// var r= this.filterQuery(row[i], query);
|
|
||||||
// if(r) {
|
|
||||||
// returnValue = true;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if(!returnValue) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return true;
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// filterQuery(data, query){
|
|
||||||
// if(data.toLowerCase().indexOf(query.toLowerCase()) > -1){
|
|
||||||
// return true;
|
|
||||||
// }else{
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
public inCommunity(result: any): any {
|
|
||||||
let found = false;
|
|
||||||
for (let contentProvider of this.communityContentProviders) {
|
|
||||||
if (contentProvider.opeaireId == result.id) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return found;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
totalPages(): number {
|
|
||||||
let totalPages: any = this.communitySearchUtils.totalResults / (this.resultsPerPage);
|
|
||||||
if (!(Number.isInteger(totalPages))) {
|
|
||||||
totalPages = (parseInt(totalPages, 10) + 1);
|
|
||||||
}
|
|
||||||
return totalPages;
|
|
||||||
}
|
|
||||||
|
|
||||||
getFiltersAsText(criteria: Criteria[]): string {
|
getFiltersAsText(criteria: Criteria[]): string {
|
||||||
let text = criteria.slice(0,3).map((criterion, index) => (index + 1) + ". " + criterion.constraint.map(constraint => {
|
let text = criteria.slice(0, 3).map((criterion, index) => (index + 1) + ". " + criterion.constraint.map(constraint => {
|
||||||
let field = this.fields.find(field => field.value === constraint.field).label;
|
let field = this.fields.find(field => field.value === constraint.field).label;
|
||||||
let matchCase = false;
|
let matchCase = false;
|
||||||
if(!constraint.verb.includes('_caseinsensitive')) {
|
if (!constraint.verb.includes('_caseinsensitive')) {
|
||||||
matchCase = true;
|
matchCase = true;
|
||||||
}
|
}
|
||||||
let verb = this.verbs.find(verb => verb.value === constraint.verb.replace("_caseinsensitive", "")).label;
|
let verb = this.verbs.find(verb => verb.value === constraint.verb.replace("_caseinsensitive", "")).label;
|
||||||
let value = '"' + constraint.value + '"' + (matchCase?" (Match case)":"");
|
let value = '"' + constraint.value + '"' + (matchCase ? " (Match case)" : "");
|
||||||
return field + " " + verb + " " + value;
|
return field + " " + verb + " " + value;
|
||||||
}).join(" <b>and</b> "));
|
}).join(" <b>and</b> "));
|
||||||
return text.join("<br>");
|
return text.join("<br>");
|
||||||
}
|
}
|
||||||
|
|
||||||
// goTo(page:number = 1){
|
public confirmedDeleteContentProvider() {
|
||||||
// this.communitySearchUtils.page=page;
|
this.subscriptions.push(this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community.communityId, this.selectedCommunityContentProvider.id).subscribe(
|
||||||
//
|
() => {
|
||||||
// var table = $('#dpTable').DataTable();
|
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
|
||||||
// table.page( page - 1 ).draw( false );
|
this.communityContentProviders.splice(index, 1);
|
||||||
//
|
this.applyFilters();
|
||||||
// var info = table.page.info();
|
this.handleSuccess('Content Provider successfully removed!')
|
||||||
// this.communitySearchUtils.totalResults = info.recordsDisplay;
|
this.communityContentProvidersChanged.emit({
|
||||||
// }
|
value: this.communityContentProviders,
|
||||||
|
});
|
||||||
public confirmedDeleteContentProvider(data: any) {
|
},
|
||||||
if (!Session.isLoggedIn()) {
|
err => {
|
||||||
this._router.navigate(['/user-info'], {
|
this.handleError('An error has been occurred. Try again later!');
|
||||||
queryParams: {
|
console.error(err);
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
}
|
||||||
"redirectUrl": this._router.url
|
));
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.subscriptions.push(this._manageCommunityContentProvidersService.removeContentProvider(this.properties, this.portal, this.selectedCommunityContentProvider.id).subscribe(
|
|
||||||
data => {
|
|
||||||
let index = this.communityContentProviders.indexOf(this.selectedCommunityContentProvider);
|
|
||||||
this.communityContentProviders.splice(index, 1);
|
|
||||||
|
|
||||||
this.applyFilters();
|
|
||||||
|
|
||||||
UIkit.notification('Content Provider successfully removed!', {
|
|
||||||
status: 'success',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
|
|
||||||
this.communityContentProvidersChanged.emit({
|
|
||||||
value: this.communityContentProviders,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.communitySearchUtils.totalResults--;
|
|
||||||
this.communitySearchUtils.page = 1;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
this.handleError('An error has been occurred. Try again later!');
|
|
||||||
console.error(err);
|
|
||||||
}
|
|
||||||
));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public removeContentProvider(communityContentProvider: any) {
|
public removeContentProvider(communityContentProvider: any) {
|
||||||
if (!Session.isLoggedIn()) {
|
this.selectedCommunityContentProvider = communityContentProvider;
|
||||||
this._router.navigate(['/user-info'], {
|
this.deleteModal.alertTitle = "Remove content provider";
|
||||||
queryParams: {
|
let title = "";
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
if (communityContentProvider.name) {
|
||||||
"redirectUrl": this._router.url
|
title = communityContentProvider.name;
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.selectedCommunityContentProvider = communityContentProvider;
|
|
||||||
this.alertModalDeleteCommunity.cancelButton = true;
|
|
||||||
this.alertModalDeleteCommunity.okButton = true;
|
|
||||||
this.alertModalDeleteCommunity.alertTitle = "Remove content provider?";
|
|
||||||
let title = "";
|
|
||||||
if (communityContentProvider.name) {
|
|
||||||
title = communityContentProvider.name;
|
|
||||||
}
|
|
||||||
if (communityContentProvider.name && communityContentProvider.acronym) {
|
|
||||||
title += " (";
|
|
||||||
}
|
|
||||||
if (communityContentProvider.acronym) {
|
|
||||||
title += communityContentProvider.acronym;
|
|
||||||
}
|
|
||||||
if (communityContentProvider.name && communityContentProvider.acronym) {
|
|
||||||
title += ")";
|
|
||||||
}
|
|
||||||
this.alertModalDeleteCommunity.message = "Content Provider";
|
|
||||||
if (title) {
|
|
||||||
this.alertModalDeleteCommunity.message += " '" + title + "' ";
|
|
||||||
}
|
|
||||||
this.alertModalDeleteCommunity.message += "will be removed from your community. Are you sure?";
|
|
||||||
this.alertModalDeleteCommunity.okButtonText = "Yes";
|
|
||||||
this.alertModalDeleteCommunity.open();
|
|
||||||
}
|
}
|
||||||
}
|
if (communityContentProvider.name && communityContentProvider.acronym) {
|
||||||
|
title += " (";
|
||||||
public _getCommunityContentProviders() {
|
|
||||||
if (!Session.isLoggedIn()) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
|
||||||
queryParams: {
|
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
|
||||||
"redirectUrl": this._router.url
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.LOADING;
|
|
||||||
this.communityContentProviders = [];
|
|
||||||
this.communitySearchUtils.totalResults = 0;
|
|
||||||
this.communitySearchUtils.page = 1;
|
|
||||||
this.communitySearchUtils.keyword = "";
|
|
||||||
|
|
||||||
this.subscriptions.push(this._searchCommunityContentProvidersService.searchDataproviders(this.properties, this.portal).subscribe(
|
|
||||||
data => {
|
|
||||||
this.communityContentProviders = data;
|
|
||||||
this.previewCommunityContentProviders = this.communityContentProviders;
|
|
||||||
// this.sort();
|
|
||||||
|
|
||||||
this.communitySearchUtils.totalResults = data.length;
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.DONE;
|
|
||||||
|
|
||||||
this.communityContentProvidersChanged.emit({
|
|
||||||
value: this.communityContentProviders,
|
|
||||||
});
|
|
||||||
|
|
||||||
this.showLoading = false;
|
|
||||||
},
|
|
||||||
err => {
|
|
||||||
console.error(err);
|
|
||||||
//TODO check erros (service not available, bad request)
|
|
||||||
|
|
||||||
if (err.status == '404') {
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.NOT_FOUND;
|
|
||||||
} else if (err.status == '500') {
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.ERROR;
|
|
||||||
} else {
|
|
||||||
this.communitySearchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.showLoading = false;
|
|
||||||
}
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
if (communityContentProvider.acronym) {
|
||||||
|
title += communityContentProvider.acronym;
|
||||||
|
}
|
||||||
|
if (communityContentProvider.name && communityContentProvider.acronym) {
|
||||||
|
title += ")";
|
||||||
|
}
|
||||||
|
this.deleteModal.message = "Content Provider";
|
||||||
|
if (title) {
|
||||||
|
this.deleteModal.message += " '" + title + "' ";
|
||||||
|
}
|
||||||
|
this.deleteModal.message += "will be removed from your community. Are you sure?";
|
||||||
|
this.deleteModal.okButtonText = "Yes";
|
||||||
|
this.deleteModal.cancelButtonText = "No";
|
||||||
|
this.deleteModal.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getCommunityContentProviders() {
|
||||||
|
this.communityContentProviders = [];
|
||||||
|
this.subscriptions.push(this._searchCommunityContentProvidersService.searchDataproviders(this.properties, this.community.communityId).subscribe(
|
||||||
|
data => {
|
||||||
|
this.communityContentProviders = data;
|
||||||
|
this.previewCommunityContentProviders = this.communityContentProviders;
|
||||||
|
this.communityContentProvidersChanged.emit({
|
||||||
|
value: this.communityContentProviders,
|
||||||
|
});
|
||||||
|
this.loading = false;
|
||||||
|
},
|
||||||
|
err => {
|
||||||
|
this.handleError('An error has been occurred. Try again later!', err)
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
public updatePage($event) {
|
public updatePage($event) {
|
||||||
this.page = $event.value;
|
this.page = $event.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get currentPage(): any[] {
|
||||||
|
return this.previewCommunityContentProviders.slice((this.page - 1)*this.resultsPerPage, this.page*this.resultsPerPage);
|
||||||
|
}
|
||||||
|
|
||||||
addNew() {
|
addNew() {
|
||||||
this.toggleView.emit(null);
|
this.toggleView.emit(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public applyFilters() {
|
public applyFilters() {
|
||||||
this.previewCommunityContentProviders = this.communityContentProviders.filter(contentProvider => {
|
this.previewCommunityContentProviders = this.communityContentProviders.filter(contentProvider => {
|
||||||
return this.filterCommunityContentProviderByKeyword(contentProvider);
|
return this.filterCommunityContentProviderByKeyword(contentProvider);
|
||||||
});
|
});
|
||||||
|
|
||||||
// check paging here!!!
|
|
||||||
if (this.previewCommunityContentProviders.slice((this.page - 1) * this.resultsPerPage, this.page * this.resultsPerPage).length == 0) {
|
|
||||||
this.page = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// this.sort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public filterCommunityContentProviderByKeyword(contentProvider): boolean {
|
public filterCommunityContentProviderByKeyword(contentProvider): boolean {
|
||||||
const textFlag = this.searchText.toString() === ''
|
return this.searchText.toString() === ''
|
||||||
|| (contentProvider.name + " " + contentProvider.officialname).match(this.searchText) != null;
|
|| (contentProvider.name + " " + contentProvider.officialname).match(this.searchText) != null;
|
||||||
return textFlag;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private sort() {
|
handleSuccess(message) {
|
||||||
let sortOption: { sort: string, descending: boolean } = this.filterForm.get('sort').value;
|
NotificationHandler.rise(message);
|
||||||
|
|
||||||
this.previewCommunityContentProviders.sort((left, right): number => {
|
|
||||||
if (sortOption.sort == "name") {
|
|
||||||
if (left.name > right.name) {
|
|
||||||
return sortOption.descending ? -1 : 1;
|
|
||||||
} else if (left.name < right.name) {
|
|
||||||
return sortOption.descending ? 1 : -1;
|
|
||||||
}
|
|
||||||
} else if (sortOption.sort == "officialname") {
|
|
||||||
if (left.officialname > right.officialname) {
|
|
||||||
return sortOption.descending ? -1 : 1;
|
|
||||||
} else if (left.officialname < right.officialname) {
|
|
||||||
return sortOption.descending ? 1 : -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public onSearchClose() {
|
handleError(message: string, error = null) {
|
||||||
this.communitySearchUtils.keyword = this.filterForm.get('keyword').value;
|
if (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
NotificationHandler.rise(message, 'danger');
|
||||||
}
|
}
|
||||||
|
|
||||||
public resetInput() {
|
|
||||||
this.communitySearchUtils.keyword = null;
|
|
||||||
this.searchInputComponent.reset()
|
|
||||||
}
|
|
||||||
|
|
||||||
handleError(message: string) {
|
|
||||||
UIkit.notification(message, {
|
|
||||||
status: 'danger',
|
|
||||||
timeout: 6000,
|
|
||||||
pos: 'bottom-right'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
goToCriteria(openaireId: string) {
|
goToCriteria(openaireId: string) {
|
||||||
this._router.navigate([openaireId], {
|
this._router.navigate([openaireId], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {Component} from '@angular/core';
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'openaire-error',
|
selector: 'openaire-error',
|
||||||
template: `
|
template: `
|
||||||
<div class="uk-margin-large-top">
|
<div class="uk-section">
|
||||||
<error></error>
|
<error></error>
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
|
|
|
@ -85,13 +85,13 @@ declare var UIkit;
|
||||||
<span class="uk-margin-small-left">Add New Affiliation</span>
|
<span class="uk-margin-small-left">Add New Affiliation</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-margin-medium uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-grid>
|
<div class="uk-margin-medium uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-height-match="target: .uk-card-body; row: false" uk-grid>
|
||||||
<div *ngFor="let affiliation of affiliations.controls; let i=index">
|
<div *ngFor="let affiliation of affiliations.controls; let i=index">
|
||||||
<div class="uk-card uk-card-default uk-margin-bottom">
|
<div class="uk-card uk-card-default uk-margin-bottom">
|
||||||
<div class="uk-card-body">
|
<div class="uk-card-body">
|
||||||
<div class="uk-flex uk-flex-middle uk-flex-column">
|
<div class="uk-flex uk-flex-middle uk-flex-column">
|
||||||
<div class="uk-width-small uk-height-max-small">
|
<div class="uk-flex uk-flex-center">
|
||||||
<img [src]="affiliation.value.logo_url | urlPrefix">
|
<img class="uk-height-xsmall uk-blend-multiply" [src]="affiliation.value.logo_url | urlPrefix">
|
||||||
</div>
|
</div>
|
||||||
<h5>{{affiliation.value.name}}</h5>
|
<h5>{{affiliation.value.name}}</h5>
|
||||||
<div class="uk-text-truncate uk-text-small">
|
<div class="uk-text-truncate uk-text-small">
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 65cbf342bc890aff15a8831711f69d9b35e6f85d
|
Subproject commit 052d94e27ce698a119755973e0b7285d2b64370b
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8818983564cb9e9232979af27fa568c18fa4eba8
|
Subproject commit 318b3cdf42922d8b04400bb010733b78fcf1fe1c
|
Loading…
Reference in New Issue