[master]: Merge from develop
This commit is contained in:
commit
146db12ad2
|
|
@ -139,18 +139,18 @@
|
|||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "connect-admin:build"
|
||||
"buildTarget": "connect-admin:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "connect-admin:build:production"
|
||||
"buildTarget": "connect-admin:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "connect-admin:build"
|
||||
"buildTarget": "connect-admin:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
|
|
|
|||
41
package.json
41
package.json
|
|
@ -3,7 +3,7 @@
|
|||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=5000",
|
||||
"start": "ng serve --host 0.0.0.0 --disable-host-check --port=65021",
|
||||
"build": "ng build",
|
||||
"build-dev": "ng build --configuration=development",
|
||||
"build-beta": "ng build --configuration=beta",
|
||||
|
|
@ -11,26 +11,26 @@
|
|||
"webpack-bundle-analyzer": "ng build --stats-json && webpack-bundle-analyzer dist/monitor-dashboard/browser/stats.json --host 0.0.0.0",
|
||||
"test": "ng test",
|
||||
"e2e": "ng e2e",
|
||||
"after-build-clean": "rm -rf dist/connect-admin/assets/common-assets/.git dist/connect-admin/assets/openaire-theme/.git .angular"
|
||||
"after-build-clean": "rm -rf dist/connect-admin/assets/common-assets/.git dist/connect-admin/assets/openaire-theme/.git .angular"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "^16.1.8",
|
||||
"@angular/cdk": "^16.1.7",
|
||||
"@angular/common": "^16.1.8",
|
||||
"@angular/compiler": "^16.1.8",
|
||||
"@angular/core": "^16.1.8",
|
||||
"@angular/forms": "^16.1.8",
|
||||
"@angular/localize": "^16.1.8",
|
||||
"@angular/material": "^16.1.7",
|
||||
"@angular/platform-browser": "^16.1.8",
|
||||
"@angular/platform-browser-dynamic": "^16.1.8",
|
||||
"@angular/router": "^16.1.8",
|
||||
"@angular/animations": "^18.1.1",
|
||||
"@angular/cdk": "^18.1.1",
|
||||
"@angular/common": "^18.1.1",
|
||||
"@angular/compiler": "^18.1.1",
|
||||
"@angular/core": "^18.1.1",
|
||||
"@angular/forms": "^18.1.1",
|
||||
"@angular/localize": "^18.1.1",
|
||||
"@angular/material": "^18.1.1",
|
||||
"@angular/platform-browser": "^18.1.1",
|
||||
"@angular/platform-browser-dynamic": "^18.1.1",
|
||||
"@angular/router": "^18.1.1",
|
||||
"clipboard": "^1.5.16",
|
||||
"core-js": "^2.5.4",
|
||||
"express": "^4.15.2",
|
||||
"jquery": "^3.4.1",
|
||||
"ng-recaptcha": "^12.0.2",
|
||||
"ng-recaptcha-2": "^14.0.0",
|
||||
"ng2-ckeditor": "1.3.7",
|
||||
"ngx-color-picker": "^14.0.0",
|
||||
"rxjs": "^6.5.1",
|
||||
|
|
@ -38,13 +38,13 @@
|
|||
"ts-md5": "^1.2.0",
|
||||
"tslib": "^2.0.0",
|
||||
"uikit": "3.16.24",
|
||||
"zone.js": "~0.13.1"
|
||||
"zone.js": "~0.14.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^16.1.7",
|
||||
"@angular/cli": "^16.1.7",
|
||||
"@angular/compiler-cli": "^16.1.8",
|
||||
"@angular/language-service": "^16.1.8",
|
||||
"@angular-devkit/build-angular": "^18.1.1",
|
||||
"@angular/cli": "^18.1.1",
|
||||
"@angular/compiler-cli": "^18.1.1",
|
||||
"@angular/language-service": "^18.1.1",
|
||||
"@types/ckeditor": "^4.9.10",
|
||||
"@types/express": "^4.17.0",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
|
|
@ -58,7 +58,8 @@
|
|||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.6.0",
|
||||
"protractor": "~7.0.0",
|
||||
"replace-in-file": "^8.2.0",
|
||||
"ts-node": "~7.0.0",
|
||||
"typescript": "~4.9.5"
|
||||
"typescript": "~5.5.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {BrowserModule} from '@angular/platform-browser';
|
||||
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
|
||||
import {HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi} from '@angular/common/http';
|
||||
import {AppComponent} from './app.component';
|
||||
import {AppRoutingModule} from './app.routing';
|
||||
import {ReactiveFormsModule} from '@angular/forms';
|
||||
|
|
@ -23,21 +23,17 @@ import {AdminLoginGuard} from "./openaireLibrary/login/adminLoginGuard.guard";
|
|||
import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
AppRoutingModule,
|
||||
BrowserModule,
|
||||
HttpClientModule,
|
||||
ReactiveFormsModule,
|
||||
BottomModule, NavigationBarModule,
|
||||
ErrorModule,
|
||||
SharedModule,
|
||||
BrowserAnimationsModule, LoadingModule, SideBarModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent,
|
||||
AdminErrorPageComponent
|
||||
],
|
||||
providers: [
|
||||
bootstrap: [AppComponent], imports: [AppRoutingModule,
|
||||
BrowserModule,
|
||||
ReactiveFormsModule,
|
||||
BottomModule, NavigationBarModule,
|
||||
ErrorModule,
|
||||
SharedModule,
|
||||
BrowserAnimationsModule, LoadingModule, SideBarModule], providers: [
|
||||
SubscribeService,
|
||||
ConnectAdminLoginGuard, AdminLoginGuard, LoginGuard,
|
||||
IsCommunity, ConnectRIGuard, TitleCasePipe,
|
||||
|
|
@ -47,10 +43,9 @@ import {LoginGuard} from "./openaireLibrary/login/loginGuard.guard";
|
|||
multi: true
|
||||
},
|
||||
[{provide: HTTP_INTERCEPTORS, useClass: TimeoutInterceptor, multi: true}],
|
||||
[{provide: DEFAULT_TIMEOUT, useValue: 30000}]
|
||||
],
|
||||
bootstrap: [AppComponent]
|
||||
[{provide: DEFAULT_TIMEOUT, useValue: 30000}],
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
]
|
||||
})
|
||||
|
||||
export class AppModule {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 39a357e011623d70f4c1d18031e0f52b9bb55e61
|
||||
Subproject commit 56dc5354acd0c484ac23ad7df92a03bd6871b592
|
||||
|
|
@ -32,7 +32,7 @@ import {RouterModule} from '@angular/router';
|
|||
{
|
||||
path: 'plugins',
|
||||
loadChildren: () => import('../../openaireLibrary/dashboard/plugins/plugins.module').then(m => m.PluginsModule),
|
||||
pathMatch: 'full', data: {hasInternalSidebar: false, hasHeader: false}
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: 'plugins/edit',
|
||||
|
|
|
|||
|
|
@ -12,91 +12,102 @@ import {CriteriaUtils} from "../content-providers/criteria-utils";
|
|||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||
import {ActivatedRoute, Router} from "@angular/router";
|
||||
import {Title} from "@angular/platform-browser";
|
||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
@Component({
|
||||
selector: 'advanced-criteria',
|
||||
template: `
|
||||
<div page-content>
|
||||
<div inner>
|
||||
<div class="uk-section-xsmall uk-margin-top" uk-grid>
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<ng-container *ngIf="!loading">
|
||||
<ng-container *ngIf="!this.communityService.selectedSubCommunity && previewSubCommunitiesCriteria.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill" uk-margin uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span *ngIf="selectionCriteria?.criteria?.length > 0"
|
||||
>({{ selectionCriteria?.criteria?.length }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="previewSubCommunitiesCriteria.length > 0"
|
||||
>({{ previewSubCommunitiesCriteria.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div
|
||||
[class.uk-switcher]="!this.communityService.selectedSubCommunity && previewSubCommunitiesCriteria.length > 0">
|
||||
<div class="uk-text-center uk-padding">
|
||||
<div *ngIf="selectionCriteria" actions>
|
||||
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center">
|
||||
<button *ngIf="selectionCriteria.criteria.length === 0" (click)="openCriteria()"
|
||||
class="uk-button uk-button-default uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Add Criteria</span>
|
||||
</button>
|
||||
<button *ngIf="selectionCriteria.criteria.length > 0" (click)="openCriteria()"
|
||||
class="uk-button uk-button-default uk-flex uk-flex-middle">
|
||||
<icon name="edit" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Edit Criteria</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="selectionCriteria?.criteria?.length > 0" class="uk-margin-small-bottom">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Criteria</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(selectionCriteria.criteria,false)"></div>
|
||||
</div>
|
||||
<div *ngIf="selectionCriteria?.criteria?.length === 0" class="">
|
||||
<h5 class="uk-margin-small-bottom">No criteria yet</h5>
|
||||
<i class="uk-display-block">
|
||||
Add multiple constraints in AND to define a criterion: results that satisfy at least one of the
|
||||
criteria will be included in your community.
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity"
|
||||
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 subcommunity of previewSubCommunitiesCriteria" class="uk-padding-xsmall">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(subcommunity.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ communityService.getCommunityLabel(subcommunity.subCommunityId) }}</a>
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Criteria</div>
|
||||
<div
|
||||
[innerHTML]="criteriaUtils.getFiltersAsText(subcommunity.selectionCriteria.criteria,false)"></div>
|
||||
<div page-content>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community
|
||||
(subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right" uk-grid>
|
||||
<div *ngIf="selectionCriteria">
|
||||
<button *ngIf="selectionCriteria.criteria.length === 0" (click)="openCriteria()"
|
||||
class="uk-button uk-button-default uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Add Criteria</span>
|
||||
</button>
|
||||
<button *ngIf="selectionCriteria.criteria.length > 0" (click)="openCriteria()"
|
||||
class="uk-button uk-button-default uk-flex uk-flex-middle">
|
||||
<icon name="edit" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Edit Criteria</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<div inner>
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<ng-container *ngIf="!loading">
|
||||
<ng-container *ngIf="!this.communityService.selectedSubCommunity && previewSubCommunitiesCriteria.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-top" uk-margin uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span
|
||||
*ngIf="selectionCriteria?.criteria?.length > 0"
|
||||
>({{ selectionCriteria?.criteria?.length }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="previewSubCommunitiesCriteria.length > 0"
|
||||
>({{ previewSubCommunitiesCriteria.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this.communityService.selectedSubCommunity && previewSubCommunitiesCriteria.length > 0">
|
||||
<div class="uk-text-center uk-padding">
|
||||
<div *ngIf="selectionCriteria?.criteria?.length > 0" class="uk-margin-small-bottom">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Criteria</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(selectionCriteria.criteria,false)"></div>
|
||||
</div>
|
||||
<div *ngIf="selectionCriteria?.criteria?.length === 0" class="">
|
||||
<h5 class="uk-margin-small-bottom">No criteria yet</h5>
|
||||
<i class="uk-display-block">
|
||||
Add multiple constraints in AND to define a criterion: results that satisfy at least
|
||||
one of the
|
||||
criteria will be included in your community.
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity"
|
||||
class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-medium-top uk-margin-bottom"
|
||||
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||
<div *ngFor="let subcommunity of previewSubCommunitiesCriteria">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(subcommunity.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ communityService.getCommunityLabel(subcommunity.subCommunityId) }}</a>
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Criteria</div>
|
||||
<div
|
||||
[innerHTML]="criteriaUtils.getFiltersAsText(subcommunity.selectionCriteria.criteria,false)"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<fs-modal #filtersModal (okEmitter)="saveCriteria()" (cancelEmitter)="criteria.reset()"
|
||||
[okButtonDisabled]="!criteria || criteria.disabled">
|
||||
<div *ngIf="selectionCriteria" class="uk-container uk-container-large">
|
||||
<criteria #criteria [height]="filtersModal.bodyHeight" [entityType]="'criterion'"
|
||||
[entityTypePlural]="'criteria'" [selectionCriteria]="selectionCriteria">
|
||||
<div no-criteria>
|
||||
<h5 class="uk-margin-small-bottom">No Criteria yet</h5>
|
||||
<i class="uk-display-block">
|
||||
Add multiple constraints in AND to define a criterion: results that satisfy at least one of the criteria
|
||||
will be included in your community.
|
||||
</i>
|
||||
</div>
|
||||
</criteria>
|
||||
</div>
|
||||
<div *ngIf="selectionCriteria" class="uk-container uk-container-large">
|
||||
<criteria #criteria [height]="filtersModal.bodyHeight" [entityType]="'criterion'"
|
||||
[entityTypePlural]="'criteria'" [selectionCriteria]="selectionCriteria">
|
||||
<div no-criteria>
|
||||
<h5 class="uk-margin-small-bottom">No Criteria yet</h5>
|
||||
<i class="uk-display-block">
|
||||
Add multiple constraints in AND to define a criterion: results that satisfy at least one
|
||||
of the criteria
|
||||
will be included in your community.
|
||||
</i>
|
||||
</div>
|
||||
</criteria>
|
||||
</div>
|
||||
</fs-modal>
|
||||
`
|
||||
})
|
||||
|
|
@ -192,4 +203,6 @@ export class AdvancedCriteriaComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
this.subCommunityChanged();
|
||||
}
|
||||
|
||||
protected readonly openAIREEntities = OpenaireEntities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,12 @@ import {CriteriaModule} from "../content-providers/criteria/criteria.module";
|
|||
import {IconsModule} from "../../openaireLibrary/utils/icons/icons.module";
|
||||
import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module";
|
||||
import {SelectSubCommunityModule} from "../content-config/subcommunity-selection/subcommunity-selection.module";
|
||||
import {SearchInputModule} from "../../openaireLibrary/sharedComponents/search-input/search-input.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, RouterModule.forChild([
|
||||
{path: '', component: AdvancedCriteriaComponent,}
|
||||
]), PageContentModule, FullScreenModalModule, CriteriaModule, IconsModule, LoadingModule, SelectSubCommunityModule],
|
||||
]), PageContentModule, FullScreenModalModule, CriteriaModule, IconsModule, LoadingModule, SelectSubCommunityModule, SearchInputModule],
|
||||
declarations: [AdvancedCriteriaComponent],
|
||||
exports: [AdvancedCriteriaComponent]
|
||||
})
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class AdvancedCriteriaService {
|
|||
public saveAdvancedCriteria(communityId, selectionCriteria: SelectionCriteria, subCommunityId = null): Observable<void> {
|
||||
return this.httpClient.post(properties.communityAPI + communityId + (subCommunityId?'/subcommunities':'') + '/advancedConstraint' + (subCommunityId?'?subCommunityId='+subCommunityId:''), selectionCriteria).pipe(map(community => {
|
||||
if(!subCommunityId){
|
||||
this.communityService.updateAdvancedCriteria(this.communityService.parseCommunity(community).selectionCriteria);
|
||||
this.communityService.updateAdvancedCriteria(CommunityInfo.parse(community).selectionCriteria);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ export class AdvancedCriteriaService {
|
|||
return [];
|
||||
}
|
||||
for (let subcommunity of subcommunities) {
|
||||
let parsedSubcommunity = this.communityService.parseCommunity(subcommunity);
|
||||
let parsedSubcommunity = CommunityInfo.parse(subcommunity);
|
||||
if(subCommunityId && parsedSubcommunity.subCommunityId == subCommunityId){
|
||||
return parsedSubcommunity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
|
|||
<div class="uk-grid uk-grid-column-large uk-flex-middle" uk-grid>
|
||||
<div class="uk-width-auto@l uk-width-1-1 uk-flex uk-flex-center">
|
||||
<button class="uk-button uk-button-primary uk-flex uk-flex-middle uk-flex-wrap"
|
||||
(click)="file.click()">
|
||||
(click)="file.click()" [attr.uk-tooltip]="'Please upload a JPG or PNG image with maximum resolution 256x256 pixels.'">
|
||||
<icon name="cloud_upload" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Upload a file</span>
|
||||
</button>
|
||||
|
|
@ -116,9 +116,9 @@ export class EditCommunityComponent {
|
|||
public communityFb: UntypedFormGroup;
|
||||
public statuses: Option[] = [
|
||||
// {label: 'Visible', value: 'all'},
|
||||
{label: 'Visible', value: 'PUBLIC'},
|
||||
{label: 'Visible', value: 'public'},
|
||||
// {label: 'Visible to managers', value: 'manager'},
|
||||
{label: 'Visible to managers', value: 'RESTRICTED'},
|
||||
{label: 'Visible to managers', value: 'restricted'},
|
||||
{label: 'Hidden', value: 'hidden'}
|
||||
]
|
||||
public claimOptions: Option[] = [
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ declare var UIkit;
|
|||
</div>
|
||||
<div inner>
|
||||
<div>
|
||||
<div class="uk-alert uk-alert-warning uk-margin-top ">
|
||||
<div class="uk-alert uk-alert-warning uk-margin-top">
|
||||
<div class="uk-text-large">Use only after connect deployment. And only if there are css updates!</div>
|
||||
Press the following button to update the timestamp in the saved layouts and recreate the css files.
|
||||
</div>
|
||||
|
|
@ -26,8 +26,6 @@ declare var UIkit;
|
|||
</div>
|
||||
<div class="uk-margin-medium-top">
|
||||
<div>Purge ICM cache for all communities</div>
|
||||
|
||||
|
||||
<button (click)="purgeBrowserCache()" class="uk-button uk-button-danger uk-margin-top"
|
||||
[class.uk-disabled]="savingChanges || !properties.deleteBrowserCacheUrl"> Purge Browser Cache</button>
|
||||
<hr>
|
||||
|
|
@ -83,7 +81,7 @@ export class ConnectAdminCustomizationComponent implements OnInit {
|
|||
this.savingChanges = true;
|
||||
let connectCssIsSaved = false;
|
||||
let defaultCssIsSaved = false;
|
||||
this.subscriptions.push(this.customizationService.getLayouts(properties, ).subscribe(async layouts => {
|
||||
this.subscriptions.push(this.customizationService.getLayouts(properties).subscribe(async layouts => {
|
||||
|
||||
this.totalLayouts = layouts ? layouts.length : 0;
|
||||
for(let layout of layouts){
|
||||
|
|
|
|||
|
|
@ -7,16 +7,14 @@ import {ActivatedRoute, Router} from "@angular/router";
|
|||
selector: 'select-sub-community',
|
||||
template: `
|
||||
<ng-container *ngIf=" subCommunities">
|
||||
|
||||
<div
|
||||
[class]="(!this.communityService.selectedSubCommunityId()?'':'uk-background-primary dark') + ' uk-padding-small uk-card-default uk-card uk-width-large'">
|
||||
<div [class]="(!this.communityService.selectedSubCommunityId()?'':'uk-background-primary dark') + ' uk-padding-small uk-card-default uk-card uk-width-large'">
|
||||
<div [class.uk-light]="this.communityService.selectedSubCommunityId()">Configuration for
|
||||
<span >{{this.communityService.selectedSubCommunityId() ? ' subcommunity: ' :' community'}}</span>
|
||||
<!-- <b class="uk-text-large">{{this.communityService.selectedSubCommunityId() ?-->
|
||||
<!-- (this.communityService.selectedSubCommunity?this.communityService.selectedSubCommunity['category'] + ' | '+ this.communityService.selectedSubCommunity['label']:this.communityService.selectedSubCommunity?.label) : ' all content'}}</b>-->
|
||||
</div>
|
||||
|
||||
<div *ngIf="!readonly" input type="select" [value]="this.communityService.selectedSubCommunityId()" [options]="subCommunities"
|
||||
<div input type="select" [value]="this.communityService.selectedSubCommunityId()" [disabled]="readonly" [options]="subCommunities"
|
||||
(valueChange)="subCommunityChanged($event)"></div>
|
||||
|
||||
</div>
|
||||
|
|
@ -31,7 +29,7 @@ export class SelectSubCommunityComponent {
|
|||
subCommunities = null
|
||||
control
|
||||
|
||||
constructor(private communityService: CommunityService, private route: ActivatedRoute, private router: Router) {
|
||||
constructor(protected communityService: CommunityService, private route: ActivatedRoute, private router: Router) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
@ -69,4 +67,4 @@ export class SelectSubCommunityComponent {
|
|||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,81 +1,97 @@
|
|||
<div class="uk-flex uk-flex-center">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-section uk-flex uk-flex-center uk-flex uk-flex-middle">
|
||||
<div class="uk-width-auto uk-margin-right">
|
||||
<a uk-icon="icon: info; ratio: 1.3"></a>
|
||||
<div *ngIf="community" class="uk-dropdown uk-padding-small uk-width-medium" uk-dropdown="mode: hover"
|
||||
[innerHTML]="infoMessage">
|
||||
</div>
|
||||
</div>
|
||||
<div search-input class="uk-width-xlarge@l uk-width-large" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"></div>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative">
|
||||
<div *ngIf="openaireSearchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<div *ngIf="openaireSearchUtils.totalResults == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom">
|
||||
<div class="uk-text-bold">No <span class="uk-text-lowercase">{{openAIREEntities.DATASOURCES}}</span> found</div>
|
||||
<div class="uk-margin-small-top" [innerHTML]="infoMessage"></div>
|
||||
</div>
|
||||
<ng-container *ngIf="openaireSearchUtils.totalResults > 0">
|
||||
<no-load-paging [type]="openaireContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage" (pageChange)="goTo($event.value)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
<div class="uk-grid uk-child-width-1-1 uk-margin-top uk-margin-bottom" uk-grid>
|
||||
<div *ngFor="let result of openaireContentProviders">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)"
|
||||
[externalUrl]="contentProviderUrl">
|
||||
</result-preview>
|
||||
</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 *ngIf="!getCommunityContentProvider(result)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
Add
|
||||
</span>
|
||||
</a>
|
||||
<div uk-dropdown="mode:click">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li class="uk-nav-header uk-margin-left">Add</li>
|
||||
<li><a (click)="addContentProvider(result,true, false)"> as content source</a></li>
|
||||
<li ><a (click)="addContentProvider(result,false, true)">as suggestion for deposit</a></li>
|
||||
<li ><a (click)="addContentProvider(result,true, true)"> both</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getCommunityContentProvider(result)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeContentProvider(result)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<no-load-paging [type]="openaireContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right@m uk-flex-center" uk-grid>
|
||||
<div class="uk-width-auto uk-margin-right">
|
||||
<a uk-icon="icon: info; ratio: 1.3"></a>
|
||||
<div *ngIf="community" class="uk-dropdown uk-padding-small uk-width-medium"
|
||||
uk-dropdown="mode: hover"
|
||||
[innerHTML]="infoMessage">
|
||||
</div>
|
||||
</div>
|
||||
<div search-input class="uk-width-xlarge@xl uk-width-large" [searchControl]="filterForm.get('keyword')"
|
||||
searchInputClass="outer"
|
||||
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative">
|
||||
<div *ngIf="openaireSearchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<div *ngIf="openaireSearchUtils.totalResults == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom">
|
||||
<div class="uk-text-bold">No <span class="uk-text-lowercase">{{ openAIREEntities.DATASOURCES }}</span>
|
||||
found
|
||||
</div>
|
||||
<div class="uk-margin-small-top" [innerHTML]="infoMessage"></div>
|
||||
</div>
|
||||
<ng-container *ngIf="openaireSearchUtils.totalResults > 0">
|
||||
<no-load-paging
|
||||
[type]="openaireContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage" (pageChange)="goTo($event.value)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</no-load-paging>
|
||||
<div class="uk-grid uk-child-width-1-1 uk-margin-top uk-margin-bottom" uk-grid>
|
||||
<div *ngFor="let result of openaireContentProviders">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)"
|
||||
[externalUrl]="contentProviderUrl">
|
||||
</result-preview>
|
||||
</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 *ngIf="!getCommunityContentProvider(result)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
Add
|
||||
</span>
|
||||
</a>
|
||||
<div uk-dropdown="mode:click">
|
||||
<ul class="uk-nav uk-dropdown-nav">
|
||||
<li class="uk-nav-header uk-margin-left">Add</li>
|
||||
<li><a (click)="addContentProvider(result,true, false)"> as content
|
||||
source</a></li>
|
||||
<li><a (click)="addContentProvider(result,false, true)">as
|
||||
suggestion
|
||||
for deposit</a></li>
|
||||
<li><a (click)="addContentProvider(result,true, true)"> both</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="getCommunityContentProvider(result)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeContentProvider(result)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<no-load-paging
|
||||
[type]="openaireContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage"
|
||||
(pageChange)="goTo($event.value)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -39,22 +39,22 @@ import {SelectSubCommunityModule} from "../content-config/subcommunity-selection
|
|||
AddContentProvidersComponent
|
||||
],
|
||||
exports: [ManageContentProvidersComponent], imports: [CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
PagingModule, SearchPagingModule,
|
||||
ErrorMessagesModule,
|
||||
AlertModalModule,
|
||||
SearchDataprovidersServiceModule,
|
||||
PageContentModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '', component: ManageContentProvidersComponent
|
||||
}
|
||||
]),
|
||||
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule, CKEditorModule, ReactiveFormsModule, ValidateEnabledPageModule, SelectSubCommunityModule], providers: [
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
PagingModule, SearchPagingModule,
|
||||
ErrorMessagesModule,
|
||||
AlertModalModule,
|
||||
SearchDataprovidersServiceModule,
|
||||
PageContentModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '', component: ManageContentProvidersComponent
|
||||
}
|
||||
]),
|
||||
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule, CKEditorModule, ReactiveFormsModule, ValidateEnabledPageModule, SelectSubCommunityModule], providers: [
|
||||
ManageCommunityContentProvidersService,
|
||||
SearchDataprovidersService,
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
|
|
|
|||
|
|
@ -1,226 +1,246 @@
|
|||
<div page-content>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"
|
||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
||||
[attr.uk-tooltip]="'<div><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '<span></span></div><div>The research results collected from the <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '</span> specified here will be automatically linked to your community dashboard.</div></div>'"
|
||||
[disabled]="loading" [class.uk-disabled]="loading">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New {{openAIREEntities.DATASOURCE}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="!loading">
|
||||
<validate-page-enabled pageRoute="/search/find/dataproviders"></validate-page-enabled>
|
||||
<validate-page-enabled pageRoute="/participate/deposit/suggested"></validate-page-enabled>
|
||||
<ng-container *ngIf="!this.communityService.selectedSubCommunity && subCommunitiesContentProviders.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill" uk-margin uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span *ngIf="communityContentProviders.length > 0"
|
||||
>({{communityContentProviders.length}})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="subCommunitiesContentProviders.length > 0"
|
||||
>({{subCommunitiesContentProviders.length}})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this.communityService.selectedSubCommunity && subCommunitiesContentProviders.length > 0">
|
||||
|
||||
<div>
|
||||
<div *ngIf="previewCommunityContentProviders.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No <span class="uk-text-lowercase">{{openAIREEntities.DATASOURCES}} </span>
|
||||
<span *ngIf="communityContentProviders.length == 0; else: notFound">for {{community.shortTitle}}
|
||||
<span
|
||||
*ngIf="communityService.selectedSubCommunityId() && this.communityService.selectedSubCommunity">{{' | ' + this.communityService.selectedSubCommunity['category'] + '| ' + this.communityService.selectedSubCommunity?.label}}</span></span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="previewCommunityContentProviders.length > 0">
|
||||
<no-load-paging
|
||||
[type]="previewCommunityContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
(pageChange)="updatePage($event)"
|
||||
[page]="page" [pageSize]="resultsPerPage"
|
||||
[totalResults]="previewCommunityContentProviders.length">
|
||||
</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"
|
||||
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||
<div *ngFor="let item of currentPage; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="item.openaireId"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="contentProviderUrl+item.openaireId">
|
||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="!item.openaireId">
|
||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<div *ngIf="item.enabled"
|
||||
class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">Content source
|
||||
</div>
|
||||
<div *ngIf="item.deposit" class="uk-label uk-label-success uk-padding-xsmall">Suggested for
|
||||
deposit
|
||||
</div>
|
||||
<div *ngIf="item.deposit && item.message" class=" uk-text-small uk-margin-top">
|
||||
<div class="uk-text-muted uk-text-xsmall">Deposit info:</div>
|
||||
<div [innerHTML]="item.message"></div>
|
||||
</div>
|
||||
<div *ngIf="item.selectioncriteria?.criteria?.length > 0"
|
||||
class="uk-margin-small-bottom uk-margin-small-top uk-text-small">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Filters</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
||||
<div *ngIf="item.selectioncriteria.criteria.length > 3" class="uk-margin-small-top">
|
||||
<a class="uk-link view-more-less-link" (click)="openCriteria(item)">View
|
||||
all {{item.selectioncriteria.criteria.length}} filters</a>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right" uk-grid>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')"
|
||||
searchInputClass="outer"
|
||||
[placeholder]="'Search ' + openAIREEntities.DATASOURCES" [disabled]="loading"
|
||||
class="uk-width-large@l uk-width-expand@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="addNew()"
|
||||
[attr.uk-tooltip]="'<div><div class=\'uk-margin-bottom uk-text-bold\'> Search and add more <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '<span></span></div><div>The research results collected from the <span class=\'uk-text-lowercase\'>' + openAIREEntities.DATASOURCES + '</span> specified here will be automatically linked to your community dashboard.</div></div>'"
|
||||
[disabled]="loading" [class.uk-disabled]="loading">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add</span>
|
||||
</button>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="!loading">
|
||||
<validate-page-enabled pageRoute="/search/find/dataproviders"></validate-page-enabled>
|
||||
<validate-page-enabled pageRoute="/participate/deposit/suggested"></validate-page-enabled>
|
||||
<ng-container
|
||||
*ngIf="!this.communityService.selectedSubCommunity && subCommunitiesContentProviders.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-top" uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span
|
||||
*ngIf="communityContentProviders.length > 0"
|
||||
>({{ communityContentProviders.length }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="subCommunitiesContentProviders.length > 0"
|
||||
>({{ subCommunitiesContentProviders.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this.communityService.selectedSubCommunity && subCommunitiesContentProviders.length > 0">
|
||||
<div>
|
||||
<div *ngIf="previewCommunityContentProviders.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No <span class="uk-text-lowercase">{{ openAIREEntities.DATASOURCES }} </span>
|
||||
<span *ngIf="communityContentProviders.length == 0; else: notFound">for {{ community.shortTitle }}
|
||||
<span
|
||||
*ngIf="communityService.selectedSubCommunityId() && this.communityService.selectedSubCommunity">{{ ' | ' + this.communityService.selectedSubCommunity['category'] + '| ' + this.communityService.selectedSubCommunity?.label }}</span></span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="openCriteria(item)" class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="edit" [flex]="true"></icon>
|
||||
<!--<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"
|
||||
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
|
||||
</span>
|
||||
<span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"
|
||||
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
|
||||
</span>-->
|
||||
<span class="uk-margin-small-left"
|
||||
uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
||||
<div *ngIf="previewCommunityContentProviders.length > 0">
|
||||
<no-load-paging
|
||||
[type]="previewCommunityContentProviders.length === 1?openAIREEntities.DATASOURCE:openAIREEntities.DATASOURCES"
|
||||
(pageChange)="updatePage($event)"
|
||||
[page]="page" [pageSize]="resultsPerPage"
|
||||
[totalResults]="previewCommunityContentProviders.length">
|
||||
</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"
|
||||
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||
<div *ngFor="let item of currentPage; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="item.openaireId"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="contentProviderUrl+item.openaireId">
|
||||
<span *ngIf="item.officialname">{{ item.officialname }}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{ item.name }}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="!item.openaireId">
|
||||
<span *ngIf="item.officialname">{{ item.officialname }}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{ item.name }}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<div *ngIf="item.enabled"
|
||||
class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">
|
||||
Content source
|
||||
</div>
|
||||
<div *ngIf="item.deposit"
|
||||
class="uk-label uk-label-success uk-padding-xsmall">Suggested for
|
||||
deposit
|
||||
</div>
|
||||
<div *ngIf="item.deposit && item.message"
|
||||
class=" uk-text-small uk-margin-top">
|
||||
<div class="uk-text-muted uk-text-xsmall">Deposit info:</div>
|
||||
<div [innerHTML]="item.message"></div>
|
||||
</div>
|
||||
<div *ngIf="item.selectioncriteria?.criteria?.length > 0"
|
||||
class="uk-margin-small-bottom uk-margin-small-top uk-text-small">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Filters</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
||||
<div *ngIf="item.selectioncriteria.criteria.length > 3"
|
||||
class="uk-margin-small-top">
|
||||
<a class="uk-link view-more-less-link" (click)="openCriteria(item)">View
|
||||
all {{ item.selectioncriteria.criteria.length }} filters</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>
|
||||
<div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="openCriteria(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="edit" [flex]="true"></icon>
|
||||
<!--<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"
|
||||
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
|
||||
</span>
|
||||
<span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"
|
||||
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
|
||||
</span>-->
|
||||
<span class="uk-margin-small-left"
|
||||
uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">
|
||||
Edit Options
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeContentProvider(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</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>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeContentProvider(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</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>
|
||||
<!-- in all content config : show subcommunities in preview mode-->
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity" 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 item of previewSubCommunityContentProviders; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="item.openaireId"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="contentProviderUrl+item.openaireId">
|
||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="!item.openaireId">
|
||||
<span *ngIf="item.officialname">{{item.officialname}}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{item.name}}</span>
|
||||
<!-- in all content config : show subcommunities in preview mode-->
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity"
|
||||
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 item of previewSubCommunityContentProviders; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="item.openaireId"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="contentProviderUrl+item.openaireId">
|
||||
<span *ngIf="item.officialname">{{ item.officialname }}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{ item.name }}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="!item.openaireId">
|
||||
<span *ngIf="item.officialname">{{ item.officialname }}</span>
|
||||
<span *ngIf="!item.officialname && item.name">{{ item.name }}</span>
|
||||
<span *ngIf="!item.officialname && !item.name">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<!-- [routerLink]="'./'" [relativeTo]="this._router" [queryParams] = "{subCommunity: item.communityId}" [queryParamsHandling]="''"-->
|
||||
<a (click)="navigateToSub(item.communityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{communityService.getCommunityLabel(item.communityId)}}</a>
|
||||
<div *ngIf="item.enabled" class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">
|
||||
Content source
|
||||
</h6>
|
||||
<!-- [routerLink]="'./'" [relativeTo]="this._router" [queryParams] = "{subCommunity: item.communityId}" [queryParamsHandling]="''"-->
|
||||
<a (click)="navigateToSub(item.communityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ communityService.getCommunityLabel(item.communityId) }}</a>
|
||||
<div *ngIf="item.enabled"
|
||||
class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">
|
||||
Content source
|
||||
</div>
|
||||
<div *ngIf="item.deposit" class="uk-label uk-label-success uk-padding-xsmall">
|
||||
Suggested for deposit
|
||||
</div>
|
||||
<div *ngIf="item.deposit && item.message" class=" uk-text-small uk-margin-top">
|
||||
<div class="uk-text-muted uk-text-xsmall">Deposit info:</div>
|
||||
<div [innerHTML]="item.message"></div>
|
||||
</div>
|
||||
<div *ngIf="item.selectioncriteria?.criteria?.length > 0"
|
||||
class="uk-margin-small-bottom uk-margin-small-top uk-text-small">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Filters</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
||||
<div *ngIf="item.selectioncriteria.criteria.length > 3"
|
||||
class="uk-margin-small-top">
|
||||
<a class="uk-link view-more-less-link" (click)="openCriteria(item)">View
|
||||
all {{ item.selectioncriteria.criteria.length }} filters</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>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="openCriteria(item)" class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="edit" [flex]="true"></icon>-->
|
||||
<!-- <!–<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>–>-->
|
||||
<!-- <span class="uk-margin-small-left"-->
|
||||
<!-- uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">-->
|
||||
<!-- Edit Options-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="removeContentProvider(item)"-->
|
||||
<!-- class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="remove" [flex]="true"></icon>-->
|
||||
<!-- <span class="uk-margin-small-left">Remove</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="item.deposit" class="uk-label uk-label-success uk-padding-xsmall">Suggested for deposit
|
||||
</div>
|
||||
<div *ngIf="item.deposit && item.message" class=" uk-text-small uk-margin-top">
|
||||
<div class="uk-text-muted uk-text-xsmall">Deposit info:</div>
|
||||
<div [innerHTML]="item.message"></div>
|
||||
</div>
|
||||
<div *ngIf="item.selectioncriteria?.criteria?.length > 0"
|
||||
class="uk-margin-small-bottom uk-margin-small-top uk-text-small">
|
||||
<div class="uk-text-meta uk-margin-small-bottom">Filters</div>
|
||||
<div [innerHTML]="criteriaUtils.getFiltersAsText(item.selectioncriteria.criteria)"></div>
|
||||
<div *ngIf="item.selectioncriteria.criteria.length > 3" class="uk-margin-small-top">
|
||||
<a class="uk-link view-more-less-link" (click)="openCriteria(item)">View
|
||||
all {{item.selectioncriteria.criteria.length}} filters</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>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="openCriteria(item)" class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="edit" [flex]="true"></icon>-->
|
||||
<!-- <!–<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>–>-->
|
||||
<!-- <span class="uk-margin-small-left"-->
|
||||
<!-- uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">-->
|
||||
<!-- Edit Options-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="removeContentProvider(item)"-->
|
||||
<!-- class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="remove" [flex]="true"></icon>-->
|
||||
<!-- <span class="uk-margin-small-left">Remove</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<modal-alert #deleteModal [overflowBody]="false" (alertOutput)="confirmedDeleteContentProvider()"
|
||||
classTitle="uk-background-primary uk-light"></modal-alert>
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export class RemoveContentProvidersComponent implements OnInit {
|
|||
|
||||
constructor(private route: ActivatedRoute, private _router: Router,
|
||||
private _fb: UntypedFormBuilder,
|
||||
private communityService: CommunityService,
|
||||
protected communityService: CommunityService,
|
||||
private _manageCommunityContentProvidersService: ManageCommunityContentProvidersService,
|
||||
private _searchCommunityContentProvidersService: SearchCommunityDataprovidersService,
|
||||
private _clearCacheService: ClearCacheService) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ declare var UIkit;
|
|||
selector: 'background-upload',
|
||||
template: `
|
||||
<input #file id="photo" type="file" class="uk-hidden" (change)="fileChangeEvent($event)"/>
|
||||
<div *ngIf="!background.imageFile"
|
||||
<div *ngIf="!background.imageFile" [attr.uk-tooltip]="'Please upload a JPG or PNG image under ' + maxsize / (1000 * 1024) + 'MB.'"
|
||||
class=" upload uk-text-center uk-height-small uk-flex uk-flex-middle uk-flex-center uk-text-uppercase">
|
||||
<span uk-icon="icon: cloud-upload"></span>
|
||||
<div uk-form-custom>
|
||||
|
|
@ -55,7 +55,7 @@ export class BackgroundUploadComponent implements OnInit {
|
|||
@Input() light:boolean; //fonts mode
|
||||
public file: File;
|
||||
// public photo: string | ArrayBuffer;
|
||||
private maxsize: number = 2000 * 1024;
|
||||
public maxsize: number = 2 * 1000 * 1024;
|
||||
properties;
|
||||
private subscriptions: any[] = [];
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ export class BackgroundUploadComponent implements OnInit {
|
|||
});
|
||||
this.removePhoto();
|
||||
} else if (this.file.size > this.maxsize) {
|
||||
UIkit.notification('File exceeds size\'s limit (' + this.maxsize / 1024 + 'KB)! ', {
|
||||
UIkit.notification('File exceeds size\'s limit (' + this.maxsize / (1000 * 1024) + 'MB)! ', {
|
||||
status: 'danger',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
|
|
@ -136,7 +136,7 @@ export class BackgroundUploadComponent implements OnInit {
|
|||
|
||||
}, error => {
|
||||
if (error.error.message) {
|
||||
UIkit.notification('The maximum size of an image is 1MB, please check if your file exceeds this limit.', {
|
||||
UIkit.notification('The maximum size of an image is ' + this.maxsize / (1000 * 1024) + 'MB, please check if your file exceeds this limit.', {
|
||||
status: 'danger',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
|
|
|
|||
|
|
@ -1,155 +1,183 @@
|
|||
<ng-template #selected_filters_pills>
|
||||
<h1>
|
||||
<div class="uk-slider filters-slider" uk-slider="finite: true">
|
||||
<div [class.uk-invisible]="list.children.length === 0" class="uk-position-relative">
|
||||
<div class="uk-slider-container">
|
||||
<ul #list class="uk-slider-items uk-grid uk-grid-small uk-margin-small-right uk-flex-nowrap">
|
||||
<li *ngIf="selectedFunder">
|
||||
<h1>
|
||||
<div class="uk-slider filters-slider" uk-slider="finite: true">
|
||||
<div [class.uk-invisible]="list.children.length === 0" class="uk-position-relative">
|
||||
<div class="uk-slider-container">
|
||||
<ul #list class="uk-slider-items uk-grid uk-grid-small uk-margin-small-right uk-flex-nowrap">
|
||||
<li *ngIf="selectedFunder">
|
||||
<span class="uk-label uk-label-primary uk-flex uk-flex-middle">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
{{selectedFunder.name}}
|
||||
{{ selectedFunder.name }}
|
||||
</span>
|
||||
<button class="uk-close uk-icon" [class.uk-disabled]="disabled" [disabled]="disabled" (click)="removeFilter(null, funders)">
|
||||
<button class="uk-close uk-icon" [class.uk-disabled]="disabled" [disabled]="disabled"
|
||||
(click)="removeFilter(null, funders)">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a class="uk-position-center-left uk-blur-background" uk-slider-item="previous"><span
|
||||
uk-icon="chevron-left"></span></a>
|
||||
<a class="uk-position-center-right uk-blur-background" uk-slider-item="next"><span
|
||||
uk-icon="chevron-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="uk-position-center-left uk-blur-background" uk-slider-item="previous"><span uk-icon="chevron-left"></span></a>
|
||||
<a class="uk-position-center-right uk-blur-background" uk-slider-item="next"><span uk-icon="chevron-right"></span></a>
|
||||
</div>
|
||||
</div>
|
||||
</h1>
|
||||
</h1>
|
||||
</ng-template>
|
||||
<ng-template #filters_column>
|
||||
<!-- [class.filterLoading]="disabled"-->
|
||||
<div >
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<h4 class="uk-margin-right uk-margin-remove-bottom">Filters</h4>
|
||||
<a *ngIf="selectedFunderId" (click)="clearFilters()"
|
||||
class="uk-text-small" [class.uk-disabled]="disabled" [class.uk-link-muted]="disabled">
|
||||
Clear All
|
||||
</a>
|
||||
<!-- [class.filterLoading]="disabled"-->
|
||||
<div>
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<h4 class="uk-margin-right uk-margin-remove-bottom">Filters</h4>
|
||||
<a *ngIf="selectedFunderId" (click)="clearFilters()"
|
||||
class="uk-text-small" [class.uk-disabled]="disabled" [class.uk-link-muted]="disabled">
|
||||
Clear All
|
||||
</a>
|
||||
</div>
|
||||
<!-- <div *ngIf="openaireSearchUtils.refineStatus == errorCodes.LOADING"-->
|
||||
<!-- class="uk-margin-top" role="alert">-->
|
||||
<!-- <loading></loading>-->
|
||||
<!-- </div>-->
|
||||
<div *ngIf="openaireSearchUtils.refineStatus != errorCodes.LOADING && openaireSearchUtils.refineStatus != errorCodes.DONE && openaireProjects.length > 0"
|
||||
class="uk-margin-top uk-text-meta">
|
||||
<span *ngIf="openaireSearchUtils.refineStatus == errorCodes.NONE">No filters available</span>
|
||||
<span *ngIf="openaireSearchUtils.refineStatus != errorCodes.NONE" class="uk-text-warning">Filters temporarily unavailable. Please try again later.</span>
|
||||
</div>
|
||||
<ul class="uk-list uk-list-xlarge">
|
||||
<li *ngIf="funders && funders.values && funders.values.length > 0">
|
||||
<search-filter [showMoreInline]="true"
|
||||
[filter]="funders" [showResultCount]="true"
|
||||
[actionRoute]="false" (onFilterChange)="funderChanged(funders)"
|
||||
[isDisabled]="disabled">
|
||||
</search-filter>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- <div *ngIf="openaireSearchUtils.refineStatus == errorCodes.LOADING"-->
|
||||
<!-- class="uk-margin-top" role="alert">-->
|
||||
<!-- <loading></loading>-->
|
||||
<!-- </div>-->
|
||||
<div *ngIf="openaireSearchUtils.refineStatus != errorCodes.LOADING && openaireSearchUtils.refineStatus != errorCodes.DONE && openaireProjects.length > 0"
|
||||
class="uk-margin-top uk-text-meta">
|
||||
<span *ngIf="openaireSearchUtils.refineStatus == errorCodes.NONE">No filters available</span>
|
||||
<span *ngIf="openaireSearchUtils.refineStatus != errorCodes.NONE" class="uk-text-warning">Filters temporarily unavailable. Please try again later.</span>
|
||||
</div>
|
||||
<ul class="uk-list uk-list-xlarge">
|
||||
<li *ngIf="funders && funders.values && funders.values.length > 0">
|
||||
<search-filter [showMoreInline]="true"
|
||||
[filter]="funders" [showResultCount]="true"
|
||||
[actionRoute]="false" (onFilterChange)="funderChanged(funders)"
|
||||
[isDisabled]="disabled">
|
||||
</search-filter>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ng-template>
|
||||
<div class="uk-flex uk-flex-center">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-section uk-flex uk-flex-center uk-flex uk-flex-middle">
|
||||
<div class="uk-width-auto uk-margin-right">
|
||||
<a uk-icon="icon: info; ratio: 1.3"></a>
|
||||
<div *ngIf="community" class="uk-dropdown uk-padding-small uk-width-medium" uk-dropdown="mode: hover"
|
||||
[innerHTML]="infoMessage">
|
||||
</div>
|
||||
</div>
|
||||
<div search-input class="uk-width-xlarge@l uk-width-large" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||
[placeholder]="'Search '+openaireEntities.PROJECTS" [disabled]="loading"></div>
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-small uk-position-relative">
|
||||
<div class="uk-grid" uk-grid>
|
||||
<div *ngIf="openaireSearchUtils.status != errorCodes.NONE" class="uk-width-1-4@m search-filters uk-visible@m">
|
||||
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-with-1-1@s">
|
||||
<div *ngIf="selectedFunderId && openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<ng-container *ngTemplateOutlet="selected_filters_pills;"></ng-container>
|
||||
</div>
|
||||
<div>
|
||||
<div *ngIf="openaireSearchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div *ngIf="communityService.selectedSubCommunityId()" class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
<div *ngIf="openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<div *ngIf="openaireSearchUtils.totalResults == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom">
|
||||
<div class="uk-text-bold">No {{openaireEntities.PROJECTS | lowercase}} found</div>
|
||||
<div class="uk-margin-small-top" [innerHTML]="infoMessage"></div>
|
||||
</div>
|
||||
<ng-container *ngIf="openaireSearchUtils.totalResults > 0">
|
||||
<div>
|
||||
<label>
|
||||
<input id="checkAll" type="checkbox" (click)="selectAll()" class="uk-checkbox" title="Select all"
|
||||
[ngModel]="selectedIndexes.length == openaireProjects.length"/>
|
||||
</label>
|
||||
<button *ngIf="selectedIndexes.length > 0" class="uk-button uk-button-link uk-margin-xsmall-left" [class.uk-disabled]="selectedIndexes.length == 0"
|
||||
[disabled]="selectedIndexes.length == 0" (click)="addAll()" >
|
||||
Add ({{selectedIndexes.length}})
|
||||
</button>
|
||||
<hr class="uk-margin-remove-top">
|
||||
</div>
|
||||
<no-load-paging [type]="openaireEntities.PROJECTS"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage" (pageChange)="goTo($event.value, false)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
<div class="uk-grid uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom" uk-grid>
|
||||
<div *ngFor="let result of openaireProjects; let i = index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true" [result]="getResultPreview(result)"
|
||||
[externalUrl]="projectUrl" [hasLink]="false">
|
||||
</result-preview>
|
||||
</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 class="uk-flex uk-flex-middle">
|
||||
<input [id]="result.id" class="uk-checkbox" type="checkbox" title="Select"
|
||||
value="{{selectedIndexes.indexOf(i) != -1}}" [ngModel]="selectedIndexes.indexOf(i)!=-1" (click)="toggleSelected(i)">
|
||||
</div>
|
||||
<div *ngIf="!result['isPart']">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="addProject(result)" class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
Add
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="result['isPart']">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeProject(result)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-center" [class.uk-flex-right@l]="communityService.selectedSubCommunityId()" uk-grid>
|
||||
<div class="uk-width-auto uk-margin-right">
|
||||
<a uk-icon="icon: info; ratio: 1.3"></a>
|
||||
<div *ngIf="community" class="uk-dropdown uk-padding-small uk-width-medium"
|
||||
uk-dropdown="mode: hover" [innerHTML]="infoMessage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div search-input class="uk-width-xlarge@xl uk-width-large" [searchControl]="filterForm.get('keyword')"
|
||||
searchInputClass="outer"
|
||||
[placeholder]="'Search '+openaireEntities.PROJECTS" [disabled]="loading"></div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<no-load-paging [type]="openaireEntities.PROJECTS"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage" (pageChange)="goTo($event.value, false)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative">
|
||||
<div class="uk-grid" uk-grid>
|
||||
<div *ngIf="openaireSearchUtils.status != errorCodes.NONE"
|
||||
class="uk-width-1-4@m search-filters uk-visible@m">
|
||||
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-with-1-1@s">
|
||||
<div *ngIf="selectedFunderId && openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<ng-container *ngTemplateOutlet="selected_filters_pills;"></ng-container>
|
||||
</div>
|
||||
<div>
|
||||
<div *ngIf="openaireSearchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="openaireSearchUtils.status !== errorCodes.LOADING">
|
||||
<div *ngIf="openaireSearchUtils.totalResults == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom">
|
||||
<div class="uk-text-bold">No {{ openaireEntities.PROJECTS | lowercase }} found</div>
|
||||
<div class="uk-margin-small-top" [innerHTML]="infoMessage"></div>
|
||||
</div>
|
||||
<ng-container *ngIf="openaireSearchUtils.totalResults > 0">
|
||||
<no-load-paging [type]="openaireEntities.PROJECTS | lowercase"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage"
|
||||
(pageChange)="goTo($event.value, false)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
<div class="uk-width-auto">
|
||||
<a class="uk-link-reset">
|
||||
<icon name="more_vert" [flex]="true" [ratio]="1.2"></icon>
|
||||
</a>
|
||||
<div #element class="uk-dropdown uk-padding-small" uk-dropdown="mode: click">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<label>
|
||||
<input id="checkAll" type="checkbox" (click)="selectAll()"
|
||||
class="uk-checkbox"
|
||||
title="Select all"
|
||||
[ngModel]="selectedIndexes.length == openaireProjects.length"/>
|
||||
</label>
|
||||
<button class="uk-button uk-button-link uk-text-nowrap uk-margin-xsmall-left"
|
||||
[class.uk-disabled]="selectedIndexes.length == 0"
|
||||
[disabled]="selectedIndexes.length == 0"
|
||||
(click)="addAll()">
|
||||
Add ({{ selectedIndexes.length }})
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</no-load-paging>
|
||||
<div class="uk-grid uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom" uk-grid>
|
||||
<div *ngFor="let result of openaireProjects; let i = index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<result-preview [properties]="properties" [showOrganizations]="true"
|
||||
[showSubjects]="true"
|
||||
[result]="getResultPreview(result)"
|
||||
[externalUrl]="projectUrl" [hasLink]="false">
|
||||
</result-preview>
|
||||
</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 class="uk-flex uk-flex-middle">
|
||||
<input [id]="result.id" class="uk-checkbox" type="checkbox"
|
||||
title="Select"
|
||||
value="{{selectedIndexes.indexOf(i) != -1}}"
|
||||
[ngModel]="selectedIndexes.indexOf(i)!=-1"
|
||||
(click)="toggleSelected(i, element)">
|
||||
</div>
|
||||
<div *ngIf="!result['isPart']">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="addProject(result)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">
|
||||
Add
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="result['isPart']">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeProject(result)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<no-load-paging [type]="openaireEntities.PROJECTS"
|
||||
[page]="openaireSearchUtils.page" [pageSize]="resultsPerPage"
|
||||
(pageChange)="goTo($event.value, false)"
|
||||
[totalResults]="openaireSearchUtils.totalResults">
|
||||
</no-load-paging>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -54,13 +54,13 @@ export class AddProjectsComponent implements OnInit {
|
|||
funders: Filter = null;
|
||||
@ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
|
||||
|
||||
private projectUrl: string = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToProject;
|
||||
public projectUrl: string = "https://" + ((properties.environment == "beta" || properties.environment == "development") ? "beta." : "") + "explore.openaire.eu" + properties.searchLinkToProject;
|
||||
public body: string = "Send from page";
|
||||
|
||||
openaireEntities = OpenaireEntities;
|
||||
|
||||
constructor(private route: ActivatedRoute, private _router: Router, private _searchProjectsService: SearchProjectsService,
|
||||
private communityService: CommunityService,
|
||||
protected communityService: CommunityService,
|
||||
private _manageCommunityProjectsService: ManageCommunityProjectsService,
|
||||
private _clearCacheService: ClearCacheService, private _searchCommunityProjectsService: SearchCommunityProjectsService,
|
||||
private _fb: UntypedFormBuilder) {
|
||||
|
|
@ -86,10 +86,10 @@ export class AddProjectsComponent implements OnInit {
|
|||
});
|
||||
|
||||
this.subscriptions.push(this.filterForm.get('keyword').valueChanges
|
||||
.pipe(debounceTime(1000), distinctUntilChanged(), skip(1))
|
||||
.subscribe(value => {
|
||||
this.keywordChanged(value);
|
||||
}));
|
||||
.pipe(debounceTime(1000), distinctUntilChanged(), skip(1))
|
||||
.subscribe(value => {
|
||||
this.keywordChanged(value);
|
||||
}));
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
|
|
@ -114,97 +114,97 @@ export class AddProjectsComponent implements OnInit {
|
|||
|
||||
get infoMessage(): string {
|
||||
return "<div>" +
|
||||
"If you cannot find a funder that is relevant for your "+OpenaireEntities.COMMUNITY.toLowerCase()+", please contact us " +
|
||||
"(<a href=\"mailto:" + properties.feedbackmailForMissingEntities +
|
||||
"?Subject=[OpenAIRE Connect - "+ this.community.shortTitle + "] report missing Funder" + "&body=" + this.body + "\" " +
|
||||
"target=\"_top\">"+properties.feedbackmailForMissingEntities+"</a>) " +
|
||||
"and we will try to get the funder on board!" +
|
||||
"</div>";
|
||||
"If you cannot find a funder that is relevant for your " + OpenaireEntities.COMMUNITY.toLowerCase() + ", please contact us " +
|
||||
"(<a href=\"mailto:" + properties.feedbackmailForMissingEntities +
|
||||
"?Subject=[OpenAIRE Connect - " + this.community.shortTitle + "] report missing Funder" + "&body=" + this.body + "\" " +
|
||||
"target=\"_top\">" + properties.feedbackmailForMissingEntities + "</a>) " +
|
||||
"and we will try to get the funder on board!" +
|
||||
"</div>";
|
||||
}
|
||||
|
||||
public addProject(project: SearchResult) {
|
||||
this.subscriptions.push(this._manageCommunityProjectsService.addProject(this.properties, this.community.communityId, project, this.communityService.selectedSubCommunityId()).subscribe(
|
||||
data => {
|
||||
// this.communityProjects.push(data);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT+" added", this.community.communityId);
|
||||
data => {
|
||||
// this.communityProjects.push(data);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT + " added", this.community.communityId);
|
||||
|
||||
UIkit.notification(this.openaireEntities.PROJECT+' successfully added!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
project["isPart"] = true;
|
||||
this.communityProjectsChanged.emit({
|
||||
value: project,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err.status);
|
||||
}
|
||||
UIkit.notification(this.openaireEntities.PROJECT + ' successfully added!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
project["isPart"] = true;
|
||||
this.communityProjectsChanged.emit({
|
||||
value: project,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err.status);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
public removeProject(project: any) {
|
||||
// let communityProject = this.getCommunityProject(project);
|
||||
this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, project['id'], this.communityService.selectedSubCommunityId()).subscribe(
|
||||
data => {
|
||||
// let index = this.communityProjects.indexOf(communityProject);
|
||||
// this.communityProjects.splice(index, 1);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT+" removed", this.community.communityId);
|
||||
UIkit.notification(this.openaireEntities.PROJECT+' successfully removed!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
project["isPart"] = false;
|
||||
this.communityProjectsChanged.emit({
|
||||
value: project,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err);
|
||||
}
|
||||
this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, project['id'], this.communityService.selectedSubCommunityId()).subscribe(
|
||||
data => {
|
||||
// let index = this.communityProjects.indexOf(communityProject);
|
||||
// this.communityProjects.splice(index, 1);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT + " removed", this.community.communityId);
|
||||
UIkit.notification(this.openaireEntities.PROJECT + ' successfully removed!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
project["isPart"] = false;
|
||||
this.communityProjectsChanged.emit({
|
||||
value: project,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err);
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
public getCommunityProject(project: any) {
|
||||
this.subscriptions.push(this._searchCommunityProjectsService.searchProjectsWithPaging(this.properties, this.community.communityId, 1, this.resultsPerPage, project.id, null).subscribe(
|
||||
data => {
|
||||
if(data.totalElements > 0){
|
||||
project["isPart"] = true;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.error(err);
|
||||
//TODO check erros (service not available, bad request)
|
||||
data => {
|
||||
if (data.totalElements > 0) {
|
||||
project["isPart"] = true;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.error(err);
|
||||
//TODO check erros (service not available, bad request)
|
||||
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
getFunders() {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.LOADING;
|
||||
this.subscriptions.push(this._searchProjectsService.getFunders(this.queryParameters, this.properties).subscribe(
|
||||
data => {
|
||||
this.funders = data[1][0];
|
||||
this.funders.values.map((value) => {
|
||||
if(value.id == this.selectedFunderId) {
|
||||
value.selected = true;
|
||||
this.funders.countSelectedValues++;
|
||||
data => {
|
||||
this.funders = data[1][0];
|
||||
this.funders.values.map((value) => {
|
||||
if (value.id == this.selectedFunderId) {
|
||||
value.selected = true;
|
||||
this.funders.countSelectedValues++;
|
||||
}
|
||||
})
|
||||
if (this.funders.values && this.funders.values.length == 0) {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.NONE;
|
||||
} else {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.DONE;
|
||||
}
|
||||
})
|
||||
if(this.funders.values && this.funders.values.length == 0) {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.NONE;
|
||||
} else {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.DONE;
|
||||
},
|
||||
err => {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.ERROR;
|
||||
console.error("Server error fetching funders: ", err)
|
||||
}
|
||||
},
|
||||
err => {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.ERROR;
|
||||
console.error("Server error fetching funders: ", err)
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
|
|
@ -223,28 +223,28 @@ export class AddProjectsComponent implements OnInit {
|
|||
this.subResults.unsubscribe();
|
||||
}
|
||||
this.subResults = this._searchProjectsService.searchProjects(parameters, null, page, size, [], this.properties).subscribe(
|
||||
data => {
|
||||
this.openaireSearchUtils.totalResults = data[0];
|
||||
this.openaireProjects = data[1];
|
||||
for(let project of this.openaireProjects){
|
||||
this.getCommunityProject(project);
|
||||
data => {
|
||||
this.openaireSearchUtils.totalResults = data[0];
|
||||
this.openaireProjects = data[1];
|
||||
for (let project of this.openaireProjects) {
|
||||
this.getCommunityProject(project);
|
||||
}
|
||||
this.openaireSearchUtils.status = this.errorCodes.DONE;
|
||||
if (this.openaireSearchUtils.totalResults == 0) {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NONE;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.error(err);
|
||||
//TODO check erros (service not available, bad request)
|
||||
if (err.status == '404') {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NOT_FOUND;
|
||||
} else if (err.status == '500') {
|
||||
this.openaireSearchUtils.status = this.errorCodes.ERROR;
|
||||
} else {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
this.openaireSearchUtils.status = this.errorCodes.DONE;
|
||||
if (this.openaireSearchUtils.totalResults == 0) {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NONE;
|
||||
}
|
||||
},
|
||||
err => {
|
||||
console.error(err);
|
||||
//TODO check erros (service not available, bad request)
|
||||
if (err.status == '404') {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NOT_FOUND;
|
||||
} else if (err.status == '500') {
|
||||
this.openaireSearchUtils.status = this.errorCodes.ERROR;
|
||||
} else {
|
||||
this.openaireSearchUtils.status = this.errorCodes.NOT_AVAILABLE;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -286,7 +286,7 @@ export class AddProjectsComponent implements OnInit {
|
|||
this.openaireSearchUtils.page = page;
|
||||
this.openaireSearchUtils.status = this.errorCodes.LOADING;
|
||||
this.selectedIndexes = [];
|
||||
if(refineQuery) {
|
||||
if (refineQuery) {
|
||||
this.openaireSearchUtils.refineStatus = this.errorCodes.LOADING;
|
||||
this.getFunders();
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ export class AddProjectsComponent implements OnInit {
|
|||
|
||||
getSelectedValues(filter): any {
|
||||
var selected = [];
|
||||
if(filter.values.length == 0 && this.selectedFunderId) {
|
||||
if (filter.values.length == 0 && this.selectedFunderId) {
|
||||
return [this.selectedFunder];
|
||||
} else {
|
||||
this.selectedFunderId = "";
|
||||
|
|
@ -343,7 +343,7 @@ export class AddProjectsComponent implements OnInit {
|
|||
this.selectedFunderId = "";
|
||||
this.selectedFunder = null;
|
||||
|
||||
if(value) {
|
||||
if (value) {
|
||||
filter.countSelectedValues--;
|
||||
if (value.selected == true) {
|
||||
value.selected = false;
|
||||
|
|
@ -355,46 +355,54 @@ export class AddProjectsComponent implements OnInit {
|
|||
this.buildQueryParameters();
|
||||
this.goTo(1);
|
||||
}
|
||||
public toggleSelected(index){
|
||||
if (this.selectedIndexes.indexOf(index) != -1){
|
||||
|
||||
public toggleSelected(index, element) {
|
||||
if (this.selectedIndexes.indexOf(index) != -1) {
|
||||
this.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);
|
||||
}else{
|
||||
} else {
|
||||
this.selectedIndexes.push(index);
|
||||
}
|
||||
if (this.selectedIndexes.length > 0) {
|
||||
UIkit.dropdown(element).show();
|
||||
} else {
|
||||
UIkit.dropdown(element).hide(false);
|
||||
}
|
||||
}
|
||||
public addAll(){
|
||||
|
||||
public addAll() {
|
||||
let projectList = [];
|
||||
for(let index of this.selectedIndexes){
|
||||
projectList.push(this.openaireProjects[index]);
|
||||
for (let index of this.selectedIndexes) {
|
||||
projectList.push(this.openaireProjects[index]);
|
||||
}
|
||||
this.subscriptions.push(this._manageCommunityProjectsService.addProjectList(this.properties, this.community.communityId, projectList, this.communityService.selectedSubCommunityId()).subscribe(
|
||||
data => {
|
||||
// this.communityProjects.push(data);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT+" added", this.community.communityId);
|
||||
UIkit.notification(this.openaireEntities.PROJECT+' successfully added!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
for(let index of this.selectedIndexes){
|
||||
this.openaireProjects[index]["isPart"] = true;
|
||||
data => {
|
||||
// this.communityProjects.push(data);
|
||||
this._clearCacheService.purgeBrowserCache(this.openaireEntities.PROJECT + " added", this.community.communityId);
|
||||
UIkit.notification(this.openaireEntities.PROJECT + ' successfully added!', {
|
||||
status: 'success',
|
||||
timeout: 6000,
|
||||
pos: 'bottom-right'
|
||||
});
|
||||
for (let index of this.selectedIndexes) {
|
||||
this.openaireProjects[index]["isPart"] = true;
|
||||
|
||||
}
|
||||
this.selectedIndexes = [];
|
||||
this.communityProjectsChanged.emit({
|
||||
list: projectList,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err.status);
|
||||
}
|
||||
this.selectedIndexes = [];
|
||||
this.communityProjectsChanged.emit({
|
||||
list: projectList,
|
||||
});
|
||||
},
|
||||
err => {
|
||||
this.handleError('An error has been occurred. Try again later!');
|
||||
console.error(err.status);
|
||||
}
|
||||
));
|
||||
}
|
||||
public selectAll(){
|
||||
if(this.selectedIndexes.length < this.openaireProjects.length) {
|
||||
|
||||
public selectAll() {
|
||||
if (this.selectedIndexes.length < this.openaireProjects.length) {
|
||||
this.selectedIndexes = Array.from(Array(this.openaireProjects.length).keys());
|
||||
}else{
|
||||
} else {
|
||||
this.selectedIndexes = [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {NgModule} from '@angular/core';
|
||||
import {HttpClientModule} from '@angular/common/http';
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {ManageProjectsComponent} from './manage-projects.component';
|
||||
|
|
@ -27,38 +27,32 @@ import {SearchFilterModule} from "../../openaireLibrary/searchPages/searchUtils/
|
|||
import {ValidateEnabledPageModule} from "../../utils/validateEnabledPage.module";
|
||||
import {SelectSubCommunityModule} from "../content-config/subcommunity-selection/subcommunity-selection.module";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
PagingModule, SearchPagingModule,
|
||||
ErrorMessagesModule,
|
||||
AlertModalModule,
|
||||
SearchProjectsServiceModule,
|
||||
PageContentModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '', component: ManageProjectsComponent
|
||||
}
|
||||
]),
|
||||
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, DropdownFilterModule, SearchFilterModule, ValidateEnabledPageModule, SelectSubCommunityModule
|
||||
],
|
||||
declarations: [
|
||||
ManageProjectsComponent,
|
||||
RemoveProjectsComponent,
|
||||
AddProjectsComponent
|
||||
],
|
||||
providers: [
|
||||
ManageCommunityProjectsService,
|
||||
SearchProjectsService
|
||||
],
|
||||
exports: [ManageProjectsComponent]
|
||||
})
|
||||
@NgModule({ declarations: [
|
||||
ManageProjectsComponent,
|
||||
RemoveProjectsComponent,
|
||||
AddProjectsComponent
|
||||
],
|
||||
exports: [ManageProjectsComponent], imports: [CommonModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
RouterModule,
|
||||
PagingModule, SearchPagingModule,
|
||||
ErrorMessagesModule,
|
||||
AlertModalModule,
|
||||
SearchProjectsServiceModule,
|
||||
PageContentModule,
|
||||
InputModule,
|
||||
SearchInputModule,
|
||||
RouterModule.forChild([
|
||||
{
|
||||
path: '', component: ManageProjectsComponent
|
||||
}
|
||||
]),
|
||||
NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, DropdownFilterModule, SearchFilterModule, ValidateEnabledPageModule, SelectSubCommunityModule], providers: [
|
||||
ManageCommunityProjectsService,
|
||||
SearchProjectsService,
|
||||
provideHttpClient(withInterceptorsFromDi())
|
||||
] })
|
||||
export class CommunityProjectsModule {
|
||||
constructor() {}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,277 +1,302 @@
|
|||
<div page-content>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
<div class="uk-width-expand@m uk-width-1-1 uk-grid uk-flex-middle uk-flex-right@m uk-flex-center uk-margin-remove-left" uk-grid>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')" searchInputClass="outer"
|
||||
placeholder="Search project" [disabled]="loading"
|
||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
(click)="addNew()"
|
||||
[attr.uk-tooltip]="('cls: uk-active; ') +
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right" uk-grid>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm.get('keyword')"
|
||||
searchInputClass="outer"
|
||||
placeholder="Search project" [disabled]="loading"
|
||||
class="uk-width-large@l uk-width-expand@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
(click)="addNew()"
|
||||
[attr.uk-tooltip]="('cls: uk-active; ') +
|
||||
'title: <div class=\'uk-margin-bottom uk-text-bold\'> Search and add more '+openaireEntiites.PROJECTS+'</div>' +
|
||||
'<div>The research results linked to the <span class=\'uk-text-lowercase\'>'+openaireEntiites.PROJECTS +
|
||||
'</span> specified here will be automatically linked to your <span class=\'uk-text-lowercase\'>'+openaireEntiites.COMMUNITY+'</span> dashboard.</div>'"
|
||||
[disabled]="loading" [class.uk-disabled]="loading">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">New {{openaireEntiites.PROJECT}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
|
||||
<div *ngIf="communitySearchUtils.totalResults > 0">
|
||||
<label>
|
||||
<input id="checkAll" type="checkbox" (click)="selectAll()" class="uk-checkbox" title="Select all"
|
||||
[ngModel]="selectedIndexes.length == previewCommunityProjects.length"/>
|
||||
</label>
|
||||
<button *ngIf="selectedIndexes.length > 0" class="uk-button uk-button-link uk-margin-xsmall-left" [class.uk-disabled]="selectedIndexes.length == 0"
|
||||
[disabled]="selectedIndexes.length == 0" (click)="promtToRemoveProjects()" >
|
||||
Remove ({{selectedIndexes.length}})
|
||||
</button>
|
||||
<hr class="uk-margin-remove-top">
|
||||
</div>
|
||||
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
|
||||
<div *ngIf="allFunderOptions.length > 0">
|
||||
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
|
||||
name="Filter by Funder" [count]="filterForm.get('funder').value?1:null">
|
||||
<h6 class="uk-margin-remove-bottom" title="Filter by Funder">Funder</h6>
|
||||
<ul class="uk-list uk-margin-remove-bottom">
|
||||
|
||||
<li *ngFor="let option of previewFunderOptions">
|
||||
<a class="uk-link-text" >
|
||||
<label (click)="select(option, $event, dropdownFilter)" class="uk-flex uk-flex-middle">
|
||||
<input class="uk-checkbox"
|
||||
type="checkbox" [checked]="isSelected(option.value.id)">
|
||||
<span class="uk-margin-small-left">{{option.label}}</span>
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dropdown-filter>
|
||||
</div>
|
||||
<div>
|
||||
<div input inputClass="flat x-small" placeholder="Sort by"
|
||||
[disabled]="previewCommunityProjects.length == 0"
|
||||
[formInput]="filterForm.get('sort')"
|
||||
type="select" [options]="sortOptions"
|
||||
class="uk-width-small">
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-small uk-position-relative uk-padding-remove-top" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<validate-page-enabled pageRoute="/search/find/projects"></validate-page-enabled>
|
||||
<ng-container *ngIf="!this.communityService.selectedSubCommunity && previewSubCommunityProjects.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill" uk-margin uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span *ngIf="this.communitySearchUtils.totalResults > 0"
|
||||
>({{communitySearchUtils.totalResults}})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="previewSubCommunityProjects.length > 0"
|
||||
>({{previewSubCommunityProjects.length}})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this.communityService.selectedSubCommunity && previewSubCommunityProjects.length > 0">
|
||||
|
||||
<div *ngIf="!loading">
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<div *ngIf="previewCommunityProjects.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No {{openaireEntiites.PROJECTS | lowercase}}
|
||||
<span *ngIf="communitySearchUtils.totalResults == 0; else: notFound">for {{community.shortTitle}}</span>
|
||||
<span
|
||||
*ngIf="communityService.selectedSubCommunityId() && this.communityService.selectedSubCommunity">{{' | ' + this.communityService.selectedSubCommunity['category'] + '| ' + this.communityService.selectedSubCommunity?.label}}</span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<div class="">
|
||||
<results-and-pages [type]="openaireEntiites.PROJECTS | lowercase" [page]="communitySearchUtils.page" [pageSize]="resultsPerPage"
|
||||
[totalResults]="communitySearchUtils.totalResults"></results-and-pages>
|
||||
</div>
|
||||
|
||||
<div class="uk-width-expand@l uk-width-1-1 uk-flex uk-flex-right@m uk-flex-center uk-margin-xsmall-bottom">
|
||||
<paging-no-load *ngIf="communitySearchUtils.totalResults> 0" [currentPage]="communitySearchUtils.page"
|
||||
(pageChange)="updatePage($event)" [size]="resultsPerPage"
|
||||
[totalResults]="communitySearchUtils.totalResults" customClasses="uk-flex-right">
|
||||
</paging-no-load>
|
||||
</div>
|
||||
<div *ngIf="previewCommunityProjects.length > 0"
|
||||
class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-bottom" uk-grid uk-height-match="target: .uk-card-body">
|
||||
<div *ngFor="let item of previewCommunityProjects; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="(item.openaireId || (item.grantId && item.funder)) && (!item['availableSince'] || !lastDBLoadDate || item['availableSince']<lastDBLoadDate)"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)">
|
||||
<span *ngIf="item.name">{{item.name}}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="(!item.openaireId && !(item.grantId && item.funder) || (item['availableSince'] && lastDBLoadDate && item['availableSince'] >= lastDBLoadDate))">
|
||||
<span *ngIf="item.name">{{item.name}}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<div class="uk-grid uk-child-width-1-2@l uk-text-small">
|
||||
<div *ngIf="item.grantId">
|
||||
<span class="uk-text-meta">Grant ID: </span>
|
||||
<span>{{item.grantId}}</span>
|
||||
</div>
|
||||
<div *ngIf="item.funder">
|
||||
<span class="uk-text-meta">Funder: </span>
|
||||
<span>{{item.funder}}</span>
|
||||
</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 class="uk-flex uk-flex-middle">
|
||||
<input [id]="item.id" class="uk-checkbox" type="checkbox" title="Select"
|
||||
value="{{selectedIndexes.indexOf(i) != -1}}" [ngModel]="selectedIndexes.indexOf(i)!=-1" (click)="toggleSelected(i)">
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||
(click)="removeProject(item)">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Remove</span>
|
||||
</button>
|
||||
[disabled]="loading" [class.uk-disabled]="loading">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Add</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<paging-no-load [currentPage]="page"
|
||||
[totalResults]="communitySearchUtils.totalResults" [size]="resultsPerPage"
|
||||
(pageChange)="updatePage($event)" customClasses="uk-flex-right@m uk-flex-center">
|
||||
</paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div class="uk-grid uk-flex-middle uk-margin-medium-top" uk-grid>
|
||||
<div *ngIf="allFunderOptions.length > 0">
|
||||
<dropdown-filter #dropdownFilter dropdownClass="uk-width-medium uk-padding-small"
|
||||
name="Filter by Funder" [count]="filterForm.get('funder').value?1:null">
|
||||
<h6 class="uk-margin-remove-bottom" title="Filter by Funder">Funder</h6>
|
||||
<ul class="uk-list uk-margin-remove-bottom">
|
||||
|
||||
<li *ngFor="let option of previewFunderOptions">
|
||||
<a class="uk-link-text">
|
||||
<label (click)="select(option, $event, dropdownFilter)" class="uk-flex uk-flex-middle">
|
||||
<input class="uk-checkbox"
|
||||
type="checkbox" [checked]="isSelected(option.value.id)">
|
||||
<span class="uk-margin-small-left">{{ option.label }}</span>
|
||||
</label>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dropdown-filter>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- in all content config : show subcommunities in preview mode-->
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity">
|
||||
<div class="">
|
||||
<results-and-pages [type]="openaireEntiites.PROJECTS | lowercase" [page]="1" [pageSize]="resultsPerPage"
|
||||
[totalResults]="previewSubCommunityProjects.length"></results-and-pages>
|
||||
</div>
|
||||
<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 item of previewSubCommunityProjects; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="(item.openaireId || (item.grantId && item.funder)) && (!item['availableSince'] || !lastDBLoadDate || item['availableSince']<lastDBLoadDate)"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)">
|
||||
<span *ngIf="item.name">{{item.name}}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="(!item.openaireId && !(item.grantId && item.funder) || (item['availableSince'] && lastDBLoadDate && item['availableSince'] >= lastDBLoadDate))">
|
||||
<span *ngIf="item.name">{{item.name}}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span *ngIf="item.acronym">{{item.acronym}}</span><span *ngIf="item.name && item.acronym">)</span>
|
||||
<div>
|
||||
<div input inputClass="flat x-small" placeholder="Sort by"
|
||||
[disabled]="previewCommunityProjects.length == 0"
|
||||
[formInput]="filterForm.get('sort')"
|
||||
type="select" [options]="sortOptions"
|
||||
class="uk-width-small">
|
||||
</div>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
|
||||
</div>
|
||||
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<validate-page-enabled pageRoute="/search/find/projects"></validate-page-enabled>
|
||||
<ng-container *ngIf="!this.communityService.selectedSubCommunity && previewSubCommunityProjects.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-top" uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span
|
||||
*ngIf="this.communitySearchUtils.totalResults > 0"
|
||||
>({{ communitySearchUtils.totalResults }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="previewSubCommunityProjects.length > 0"
|
||||
>({{ previewSubCommunityProjects.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this.communityService.selectedSubCommunity && previewSubCommunityProjects.length > 0">
|
||||
<div *ngIf="!loading">
|
||||
<div class="uk-margin-medium-bottom">
|
||||
<div *ngIf="previewCommunityProjects.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No {{ openaireEntiites.PROJECTS | lowercase }}
|
||||
<span *ngIf="communitySearchUtils.totalResults == 0; else: notFound">for {{ community.shortTitle }}</span>
|
||||
<span
|
||||
*ngIf="communityService.selectedSubCommunityId() && this.communityService.selectedSubCommunity">{{ ' | ' + this.communityService.selectedSubCommunity['category'] + '| ' + this.communityService.selectedSubCommunity?.label }}</span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="communitySearchUtils.totalResults > 0">
|
||||
<no-load-paging [type]="openaireEntities.PROJECTS | lowercase"
|
||||
[page]="communitySearchUtils.page" [pageSize]="resultsPerPage"
|
||||
(pageChange)="updatePage($event)"
|
||||
[totalResults]="communitySearchUtils.totalResults">
|
||||
<div class="uk-width-auto">
|
||||
<a class="uk-link-reset">
|
||||
<icon name="more_vert" [flex]="true" [ratio]="1.2"></icon>
|
||||
</a>
|
||||
<div #element class="uk-dropdown uk-padding-small" uk-dropdown="mode: click">
|
||||
<div class="uk-flex uk-flex-middle">
|
||||
<label>
|
||||
<input id="checkAll" type="checkbox" (click)="selectAll()"
|
||||
class="uk-checkbox"
|
||||
title="Select all"
|
||||
[ngModel]="selectedIndexes.length == previewCommunityProjects.length"/>
|
||||
</label>
|
||||
<button class="uk-button uk-button-link uk-text-nowrap uk-margin-xsmall-left"
|
||||
[class.uk-disabled]="selectedIndexes.length == 0"
|
||||
[disabled]="selectedIndexes.length == 0"
|
||||
(click)="promtToRemoveProjects()">
|
||||
Remove ({{ selectedIndexes.length }})
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</no-load-paging>
|
||||
<div *ngIf="previewCommunityProjects.length > 0"
|
||||
class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-top uk-margin-bottom"
|
||||
uk-grid uk-height-match="target: .uk-card-body">
|
||||
<div *ngFor="let item of previewCommunityProjects; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="(item.openaireId || (item.grantId && item.funder)) && (!item['availableSince'] || !lastDBLoadDate || item['availableSince']<lastDBLoadDate)"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)">
|
||||
<span *ngIf="item.name">{{ item.name }}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span
|
||||
*ngIf="item.acronym">{{ item.acronym }}</span><span
|
||||
*ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="(!item.openaireId && !(item.grantId && item.funder) || (item['availableSince'] && lastDBLoadDate && item['availableSince'] >= lastDBLoadDate))">
|
||||
<span *ngIf="item.name">{{ item.name }}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span
|
||||
*ngIf="item.acronym">{{ item.acronym }}</span><span
|
||||
*ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<div class="uk-grid uk-child-width-1-2@l uk-text-small">
|
||||
<div *ngIf="item.grantId">
|
||||
<span class="uk-text-meta">Grant ID: </span>
|
||||
<span>{{ item.grantId }}</span>
|
||||
</div>
|
||||
<div *ngIf="item.funder">
|
||||
<span class="uk-text-meta">Funder: </span>
|
||||
<span>{{ item.funder }}</span>
|
||||
</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 class="uk-flex uk-flex-middle">
|
||||
<input [id]="item.id" class="uk-checkbox" type="checkbox" title="Select"
|
||||
value="{{selectedIndexes.indexOf(i) != -1}}"
|
||||
[ngModel]="selectedIndexes.indexOf(i)!=-1"
|
||||
(click)="toggleSelected(i, element)">
|
||||
</div>
|
||||
<div>
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||
(click)="removeProject(item)">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Remove</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-margin-small-top">
|
||||
<paging-no-load [currentPage]="page"
|
||||
[totalResults]="communitySearchUtils.totalResults" [size]="resultsPerPage"
|
||||
(pageChange)="updatePage($event)"
|
||||
customClasses="uk-flex-right@m uk-flex-center">
|
||||
</paging-no-load>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
<!-- in all content config : show subcommunities in preview mode-->
|
||||
<div *ngIf="!this.communityService.selectedSubCommunity">
|
||||
<div class="">
|
||||
<results-and-pages [type]="openaireEntiites.PROJECTS | lowercase" [page]="1"
|
||||
[pageSize]="resultsPerPage"
|
||||
[totalResults]="previewSubCommunityProjects.length"></results-and-pages>
|
||||
</div>
|
||||
<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 item of previewSubCommunityProjects; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<h6 class="uk-margin-bottom">
|
||||
<a *ngIf="(item.openaireId || (item.grantId && item.funder)) && (!item['availableSince'] || !lastDBLoadDate || item['availableSince']<lastDBLoadDate)"
|
||||
target="_blank" class="custom-external uk-link-text"
|
||||
[href]="projectUrl+'?' + ((item.openaireId) ? 'projectId='+item.openaireId : 'grantId='+item.grantId+'&funder='+item.funder)">
|
||||
<span *ngIf="item.name">{{ item.name }}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span
|
||||
*ngIf="item.acronym">{{ item.acronym }}</span><span
|
||||
*ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</a>
|
||||
<span *ngIf="(!item.openaireId && !(item.grantId && item.funder) || (item['availableSince'] && lastDBLoadDate && item['availableSince'] >= lastDBLoadDate))">
|
||||
<span *ngIf="item.name">{{ item.name }}</span>
|
||||
<span *ngIf="item.name && item.acronym"> (</span><span
|
||||
*ngIf="item.acronym">{{ item.acronym }}</span><span
|
||||
*ngIf="item.name && item.acronym">)</span>
|
||||
<span *ngIf="!item.name && !item.acronym">[no title available]</span>
|
||||
</span>
|
||||
</h6>
|
||||
<a (click)="navigateToSub(item.communityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{communityService.getCommunityLabel(item.communityId)}}</a>
|
||||
</h6>
|
||||
<a (click)="navigateToSub(item.communityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ communityService.getCommunityLabel(item.communityId) }}</a>
|
||||
|
||||
<div class="uk-grid uk-child-width-1-2@l uk-text-small">
|
||||
<div *ngIf="item.grantId">
|
||||
<span class="uk-text-meta">Grant ID: </span>
|
||||
<span>{{item.grantId}}</span>
|
||||
</div>
|
||||
<div *ngIf="item.funder">
|
||||
<span class="uk-text-meta">Funder: </span>
|
||||
<span>{{item.funder}}</span>
|
||||
</div>
|
||||
<div class="uk-grid uk-child-width-1-2@l uk-text-small">
|
||||
<div *ngIf="item.grantId">
|
||||
<span class="uk-text-meta">Grant ID: </span>
|
||||
<span>{{ item.grantId }}</span>
|
||||
</div>
|
||||
<div *ngIf="item.funder">
|
||||
<span class="uk-text-meta">Funder: </span>
|
||||
<span>{{ item.funder }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="uk-card-body">-->
|
||||
<!-- <h6 class="uk-margin-bottom">-->
|
||||
<!-- <a *ngIf="item.openaireId"-->
|
||||
<!-- target="_blank" class="custom-external uk-link-text"-->
|
||||
<!-- [href]="contentProviderUrl+item.openaireId">-->
|
||||
<!-- <span *ngIf="item.officialname">{{item.officialname}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && item.name">{{item.name}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && !item.name">[no title available]</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span *ngIf="!item.openaireId">-->
|
||||
<!-- <span *ngIf="item.officialname">{{item.officialname}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && item.name">{{item.name}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && !item.name">[no title available]</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </h6>-->
|
||||
<!-- <!– [routerLink]="'./'" [relativeTo]="this._router" [queryParams] = "{subCommunity: item.communityId}" [queryParamsHandling]="''"–>-->
|
||||
<!-- <a (click)="navigateToSub(item.communityId)"-->
|
||||
<!-- class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">-->
|
||||
<!-- {{communityService.getCommunityLabel(item.communityId)}}</a>-->
|
||||
<!-- <div *ngIf="item.enabled" class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">-->
|
||||
<!-- Content source-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="item.deposit" class="uk-label uk-label-success uk-padding-xsmall">Suggested for deposit-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="item.deposit && item.message" class=" uk-text-small uk-margin-top">-->
|
||||
<!-- <div class="uk-text-muted uk-text-xsmall">Deposit info:</div>-->
|
||||
<!-- <div [innerHTML]="item.message"></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>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="openCriteria(item)" class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="edit" [flex]="true"></icon>-->
|
||||
<!-- <!–<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>–>-->
|
||||
<!-- <span class="uk-margin-small-left"-->
|
||||
<!-- uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">-->
|
||||
<!-- Edit Options-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="removeContentProvider(item)"-->
|
||||
<!-- class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="remove" [flex]="true"></icon>-->
|
||||
<!-- <span class="uk-margin-small-left">Remove</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="uk-card-body">-->
|
||||
<!-- <h6 class="uk-margin-bottom">-->
|
||||
<!-- <a *ngIf="item.openaireId"-->
|
||||
<!-- target="_blank" class="custom-external uk-link-text"-->
|
||||
<!-- [href]="contentProviderUrl+item.openaireId">-->
|
||||
<!-- <span *ngIf="item.officialname">{{item.officialname}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && item.name">{{item.name}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && !item.name">[no title available]</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- <span *ngIf="!item.openaireId">-->
|
||||
<!-- <span *ngIf="item.officialname">{{item.officialname}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && item.name">{{item.name}}</span>-->
|
||||
<!-- <span *ngIf="!item.officialname && !item.name">[no title available]</span>-->
|
||||
<!-- </span>-->
|
||||
<!-- </h6>-->
|
||||
<!-- <!– [routerLink]="'./'" [relativeTo]="this._router" [queryParams] = "{subCommunity: item.communityId}" [queryParamsHandling]="''"–>-->
|
||||
<!-- <a (click)="navigateToSub(item.communityId)"-->
|
||||
<!-- class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">-->
|
||||
<!-- {{communityService.getCommunityLabel(item.communityId)}}</a>-->
|
||||
<!-- <div *ngIf="item.enabled" class="uk-label uk-text-primary uk-margin-small-right uk-padding-xsmall ">-->
|
||||
<!-- Content source-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="item.deposit" class="uk-label uk-label-success uk-padding-xsmall">Suggested for deposit-->
|
||||
<!-- </div>-->
|
||||
<!-- <div *ngIf="item.deposit && item.message" class=" uk-text-small uk-margin-top">-->
|
||||
<!-- <div class="uk-text-muted uk-text-xsmall">Deposit info:</div>-->
|
||||
<!-- <div [innerHTML]="item.message"></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>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="openCriteria(item)" class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="edit" [flex]="true"></icon>-->
|
||||
<!-- <!–<span *ngIf="item.selectioncriteria?.criteria?.length > 0" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>-->
|
||||
<!-- <span *ngIf="!(item.selectioncriteria?.criteria?.length > 0)" class="uk-margin-small-left"-->
|
||||
<!-- 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-->
|
||||
<!-- </span>–>-->
|
||||
<!-- <span class="uk-margin-small-left"-->
|
||||
<!-- uk-tooltip="<div>Select datasource as content source and/or suggest for deposit. Add filters to limit research results.<br>Results which satisfy any of the selected filters will be included in your community.</div>">-->
|
||||
<!-- Edit Options-->
|
||||
<!-- </span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <div class="uk-padding-small uk-padding-remove-horizontal">-->
|
||||
<!-- <a (click)="removeContentProvider(item)"-->
|
||||
<!-- class="uk-button uk-button-link uk-flex uk-flex-middle">-->
|
||||
<!-- <icon name="remove" [flex]="true"></icon>-->
|
||||
<!-- <span class="uk-margin-small-left">Remove</span>-->
|
||||
<!-- </a>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteProject($event)"
|
||||
[overflowBody]="false"></modal-alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteProject($event)" [overflowBody]="false"></modal-alert>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -312,12 +312,17 @@ export class RemoveProjectsComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
|
||||
public toggleSelected(index) {
|
||||
public toggleSelected(index, element) {
|
||||
if (this.selectedIndexes.indexOf(index) != -1) {
|
||||
this.selectedIndexes.splice(this.selectedIndexes.indexOf(index), 1);
|
||||
} else {
|
||||
this.selectedIndexes.push(index);
|
||||
}
|
||||
if(this.selectedIndexes.length > 0) {
|
||||
UIkit.dropdown(element).show();
|
||||
} else {
|
||||
UIkit.dropdown(element).hide(false);
|
||||
}
|
||||
}
|
||||
|
||||
public removeAll() {
|
||||
|
|
@ -357,4 +362,6 @@ export class RemoveProjectsComponent implements OnInit {
|
|||
});
|
||||
this.subCommunityChanged();
|
||||
}
|
||||
|
||||
protected readonly openAIREEntities = OpenaireEntities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,392 +1,421 @@
|
|||
<div page-content>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||
<div [disabled]="loading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
|
||||
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right" uk-grid>
|
||||
<div [disabled]="loading" search-input
|
||||
class="uk-width-large@l uk-width-expand@m uk-width-1-1"
|
||||
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects"
|
||||
searchInputClass="outer">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div class="uk-section-xsmall uk-margin-top" uk-grid>
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<validate-page-enabled pageRoute="/subjects"></validate-page-enabled>
|
||||
<div *ngIf="!loading">
|
||||
<div >
|
||||
<ul uk-tab class="uk-tab uk-margin-bottom uk-flex uk-flex-center uk-flex-left@m">
|
||||
<li *ngIf="displayedAllSubjects?.length"
|
||||
(click)="groupSubjects(displayedAllSubjects, 'all')">
|
||||
<a>All ({{ displayedAllSubjects.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('subjects')">
|
||||
<a>Free Text ({{ displayedSubjects.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('sdg')">
|
||||
<a>SDGs ({{ displayedSdg.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('fos')">
|
||||
<a>Fields of Science ({{ displayedFos.length }})</a>
|
||||
</li>
|
||||
<li *ngIf="previewSubCommunities?.length > 0">
|
||||
<a>Set for subcommunities <span>({{ previewSubCommunities.length }})</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="uk-switcher">
|
||||
<li *ngIf="displayedAllSubjects?.length">
|
||||
<div inner>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<div *ngIf="loading" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<validate-page-enabled pageRoute="/subjects"></validate-page-enabled>
|
||||
<div *ngIf="!loading">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedAllSubjects; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexAll == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'All' -->
|
||||
<div *ngIf="indexAll == 0 && groupedAllSubjects.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedAllSubjects.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
|
||||
<ul uk-tab class="uk-tab uk-margin-bottom uk-flex uk-flex-center uk-flex-left@m">
|
||||
<li *ngIf="displayedAllSubjects?.length"
|
||||
(click)="groupSubjects(displayedAllSubjects, 'all')">
|
||||
<a>All ({{ displayedAllSubjects.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('subjects')">
|
||||
<a>Free Text ({{ displayedSubjects.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('sdg')">
|
||||
<a>SDGs ({{ displayedSdg.length }})</a>
|
||||
</li>
|
||||
<li (click)="groupSubjects('fos')">
|
||||
<a>Fields of Science ({{ displayedFos.length }})</a>
|
||||
</li>
|
||||
<li *ngIf="previewSubCommunities?.length > 0">
|
||||
<a>Set for subcommunities <span>({{ previewSubCommunities.length }})</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="uk-switcher">
|
||||
<li *ngIf="displayedAllSubjects?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedAllSubjects; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexAll == i ? 'uk-active':''"
|
||||
(click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'All' -->
|
||||
<div *ngIf="indexAll == 0 && groupedAllSubjects.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedAllSubjects.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexAll != 0 || groupedAllSubjects.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedAllSubjects[indexAll].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedAllSubjects[indexAll].data" class="uk-margin-small-bottom">
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexAll != 0 || groupedAllSubjects.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedAllSubjects[indexAll].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedAllSubjects[indexAll].data"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedAllSubjects?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('subjects')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit Subjects</span>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedSubjects?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedSubjects; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexSubjects == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'All' -->
|
||||
<div *ngIf="indexSubjects == 0 && groupedSubjects.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedSubjects.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
|
||||
<ng-container *ngIf="displayedAllSubjects?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('subjects')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit</span>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedSubjects?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedSubjects; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexSubjects == i ? 'uk-active':''"
|
||||
(click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'All' -->
|
||||
<div *ngIf="indexSubjects == 0 && groupedSubjects.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedSubjects.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexSubjects != 0 || groupedSubjects.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedSubjects[indexSubjects]?.group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedSubjects[indexSubjects]?.data"
|
||||
class="uk-margin-small-bottom">
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)"
|
||||
class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexSubjects != 0 || groupedSubjects.length == 1"
|
||||
class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedSubjects[indexSubjects]?.group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedSubjects[indexSubjects]?.data"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="displayedSubjects?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('sdg')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="displayedSubjects?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('sdg')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit Subjects</span>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedSdg?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedSdg; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexSdg == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'sdg' -->
|
||||
<div *ngIf="indexSdg == 0 && groupedSdg.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedSdg.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
|
||||
<ng-container *ngIf="displayedSdg?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedSdg; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexSdg == i ? 'uk-active':''"
|
||||
(click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'sdg' -->
|
||||
<div *ngIf="indexSdg == 0 && groupedSdg.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedSdg.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexSdg != 0 || groupedSdg.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedSdg[indexSdg].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedSdg[indexSdg].data" class="uk-margin-small-bottom">
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)"
|
||||
class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexSdg != 0 || groupedSdg.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedSdg[indexSdg].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedSdg[indexSdg].data"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="displayedSdg?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('fos')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit Subjects</span>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedFos?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedFos; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexFos == i ? 'uk-active':''" (click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'Fos' -->
|
||||
<div *ngIf="indexFos == 0 && groupedFos.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedFos.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)" class="uk-margin-small-bottom">
|
||||
<ng-container *ngIf="displayedSdg?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li>
|
||||
<div class="uk-flex uk-flex-right uk-margin-small-bottom">
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle uk-button-small"
|
||||
[disabled]="loading" [class.uk-disabled]="loading"
|
||||
(click)="edit('fos')"
|
||||
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
|
||||
<span>Add/Edit</span>
|
||||
</button>
|
||||
</div>
|
||||
<ng-container *ngIf="displayedFos?.length">
|
||||
<div>
|
||||
<ul class="uk-nav uk-nav-default uk-flex uk-flex-wrap">
|
||||
<li *ngFor="let item of groupedFos; let i = index;" class="uk-margin-right"
|
||||
[class.uk-margin-left]="i != 0"
|
||||
[class]="indexFos == i ? 'uk-active':''"
|
||||
(click)="changeDisplayedSubjects(i, item)">
|
||||
<a class="uk-padding-remove">{{ item.group }}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- View for 'Fos' -->
|
||||
<div *ngIf="indexFos == 0 && groupedFos.length > 1"
|
||||
class="uk-margin-large-top uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let item of groupedFos.slice(1); let i = index;">
|
||||
<div>
|
||||
<h6>{{ item.group }}</h6>
|
||||
<div *ngFor="let subItem of item.data.slice(0, subjectsLimit)"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)" class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexFos != 0 || groupedFos.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedFos[indexFos].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedFos[indexFos].data" class="uk-margin-small-bottom">
|
||||
</div>
|
||||
<div *ngIf="item.data.length > subjectsLimit">
|
||||
<a (click)="changeDisplayedSubjects(i+1, item)"
|
||||
class="view-more-less-link">
|
||||
View all
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- View for a single group -->
|
||||
<div *ngIf="indexFos != 0 || groupedFos.length == 1" class="uk-margin-large-top">
|
||||
<div>
|
||||
<div>
|
||||
<h6>{{ groupedFos[indexFos].group }}</h6>
|
||||
<ng-container *ngIf="subjectsColumns?.length == 0; else elseBlock">
|
||||
<div *ngFor="let subItem of groupedFos[indexFos].data"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group" class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-template #elseBlock>
|
||||
<div class="uk-grid uk-child-width-1-4@m" uk-grid>
|
||||
<div *ngFor="let group of subjectsColumns">
|
||||
<div *ngFor="let subItem of group"
|
||||
class="uk-margin-small-bottom">
|
||||
<span
|
||||
[attr.uk-tooltip]="subItem.length > maxCharacters ? 'cls: uk-active' : 'cls: uk-invisible'"
|
||||
[title]="subItem">
|
||||
{{ subItem.length > maxCharacters ? subItem.substring(0, maxCharacters) + '...' : subItem }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="displayedFos?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="previewSubCommunities?.length > 0"
|
||||
class=" uk-padding-small uk-grid uk-grid-large uk-child-width-1-1 uk-margin-top uk-margin-bottom"
|
||||
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||
<div *ngFor="let subcommunity of previewSubCommunities" class="uk-padding-xsmall">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(subcommunity.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ _communityService.getCommunityLabel(subcommunity.subCommunityId) }}</a>
|
||||
<div>
|
||||
<div *ngIf="subcommunity.subjects?.length > 0"><span
|
||||
class="uk-text-bold">Free text ({{ subcommunity.subjects.length }}
|
||||
): </span>
|
||||
<span *ngFor="let subject of subcommunity.subjects.slice(0,7); let isLast=last; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.subjects.length - 1 ? '' : '...') : ',' }} </span></span>
|
||||
</div>
|
||||
<div *ngIf="subcommunity.sdg?.length > 0"><span
|
||||
class="uk-text-bold">SDGs ({{ subcommunity.sdg.length }}): </span>
|
||||
<span *ngFor="let subject of subcommunity.sdg.slice(0,7); let isLast=last; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.sdg.length - 1 ? '' : '...') : ',' }} </span></span>
|
||||
</div>
|
||||
<div *ngIf="subcommunity.fos?.length > 0"><span
|
||||
class="uk-text-bold">Fields of Science ({{ subcommunity.fos.length }}
|
||||
): </span>
|
||||
<span *ngFor="let subject of subcommunity.fos.slice(0,7); let isLast=last ; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.fos.length - 1 ? '' : '...') : ',' }} </span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="displayedFos?.length === 0">
|
||||
<div class="uk-position-relative uk-height-medium">
|
||||
<h6 class="uk-position-center uk-margin-remove">There are no subjects yet</h6>
|
||||
</div>
|
||||
</ng-container>
|
||||
</li>
|
||||
<li *ngIf="previewSubCommunities?.length > 0"
|
||||
class=" uk-padding-small uk-grid uk-grid-large uk-child-width-1-1 uk-margin-top uk-margin-bottom"
|
||||
uk-height-match="target: .uk-card-body; row: false;" uk-grid>
|
||||
<div *ngFor="let subcommunity of previewSubCommunities" class="uk-padding-xsmall">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(subcommunity.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ _communityService.getCommunityLabel(subcommunity.subCommunityId) }}</a>
|
||||
<div>
|
||||
<div *ngIf="subcommunity.subjects?.length > 0"><span
|
||||
class="uk-text-bold">Free text ({{ subcommunity.subjects.length }}): </span>
|
||||
<span *ngFor="let subject of subcommunity.subjects.slice(0,7); let isLast=last; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.subjects.length -1?'':'...') : ',' }} </span></span></div>
|
||||
<div *ngIf="subcommunity.sdg?.length > 0"><span
|
||||
class="uk-text-bold">SDGs ({{ subcommunity.sdg.length }}): </span>
|
||||
<span *ngFor="let subject of subcommunity.sdg.slice(0,7); let isLast=last; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.sdg.length -1?'':'...') : ',' }} </span></span></div>
|
||||
<div *ngIf="subcommunity.fos?.length > 0"><span
|
||||
class="uk-text-bold">Fields of Science ({{ subcommunity.fos.length }}): </span>
|
||||
<span *ngFor="let subject of subcommunity.fos.slice(0,7); let isLast=last ; let i=index">{{ subject }}
|
||||
<span>{{ isLast ? (i == subcommunity.fos.length -1?'':'...') : ',' }} </span></span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<fs-modal #fsModal classBody="uk-container-large" (okEmitter)="saveSubjects()"
|
||||
[okButtonDisabled]="!hasChanges && !sdgSelection.hasChanges && !fosSelection.hasChanges">
|
||||
<div>
|
||||
<div *ngIf="subjectsForm && editingType == 'subjects'">
|
||||
<div #addSubjectsInput input [type]="'chips'" [formInput]="subjectsForm" [inputClass]="'flat small'"
|
||||
[extendEnter]="onEnter"
|
||||
[separators]="[',', 'enter']" [visibleChips]="3" class="uk-width-1-1 uk-width-xlarge@m"
|
||||
[placeholder]="{static: true, label: 'Type subjects as free text keywords'}">
|
||||
<div tools class="uk-flex uk-flex-right">
|
||||
<button (click)="addSubjectsIntoList()"
|
||||
class="uk-button uk-button-link uk-margin-xsmall-left uk-margin-right">add
|
||||
</button>
|
||||
</div>
|
||||
<div note class="uk-text-xsmall">Separate subjects with commas</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top">
|
||||
<div>
|
||||
<div *ngIf="subjectsForm && editingType == 'subjects'">
|
||||
<div #addSubjectsInput input [type]="'chips'" [formInput]="subjectsForm" [inputClass]="'flat small'"
|
||||
[extendEnter]="onEnter"
|
||||
[separators]="[',', 'enter']" [visibleChips]="3" class="uk-width-1-1 uk-width-xlarge@m"
|
||||
[placeholder]="{static: true, label: 'Type subjects as free text keywords'}">
|
||||
<div tools class="uk-flex uk-flex-right">
|
||||
<button (click)="addSubjectsIntoList()"
|
||||
class="uk-button uk-button-link uk-margin-xsmall-left uk-margin-right">add
|
||||
</button>
|
||||
</div>
|
||||
<div note class="uk-text-xsmall">Separate subjects with commas</div>
|
||||
</div>
|
||||
<div class="uk-margin-large-top">
|
||||
<span *ngFor="let subject of displayedSubjects; let i = index;"
|
||||
class="uk-label uk-label-primary uk-flex-inline uk-flex-middle uk-margin-right uk-margin-bottom">
|
||||
<span class="uk-margin-small-right uk-text-truncate">{{ subject }}</span>
|
||||
|
|
@ -394,19 +423,19 @@
|
|||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div [style]=" editingType != 'sdg'?'display:none':''">
|
||||
<sdg-selection #sdgSelection [subjects]="displayedSdg" [isFeedback]="false"></sdg-selection>
|
||||
</div>
|
||||
<div [style]=" editingType != 'fos'?'display:none':''">
|
||||
<div class="uk-margin-large-top">
|
||||
</div>
|
||||
</div>
|
||||
<div [style]=" editingType != 'sdg'?'display:none':''">
|
||||
<sdg-selection #sdgSelection [subjects]="displayedSdg" [isFeedback]="false"></sdg-selection>
|
||||
</div>
|
||||
<div [style]=" editingType != 'fos'?'display:none':''">
|
||||
<div class="uk-margin-large-top">
|
||||
<span *ngFor="let subject of displayedFos; let i = index;"
|
||||
class="uk-label uk-label-primary uk-flex-inline uk-flex-middle uk-margin-right uk-margin-bottom">
|
||||
<span class="uk-margin-small-right uk-text-truncate">{{ subject }}</span>
|
||||
</span>
|
||||
</div>
|
||||
<fos-selection #fosSelection [subjects]="displayedFos" [inModal]="true"></fos-selection>
|
||||
</div>
|
||||
<fos-selection #fosSelection [subjects]="displayedFos" [inModal]="true"></fos-selection>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fs-modal>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import {ClearCacheService} from "../../../openaireLibrary/services/clear-cache.s
|
|||
import {SdgSelectionComponent} from '../../../openaireLibrary/sdg/sdg-selection/sdg-selection.component';
|
||||
import {FosSelectionComponent} from '../../../openaireLibrary/fos/fos-selection/fos-selection.component';
|
||||
import {InputComponent} from "../../../openaireLibrary/sharedComponents/input/input.component";
|
||||
import {OpenaireEntities} from "../../../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
declare var UIkit: any;
|
||||
|
||||
|
|
@ -435,4 +436,6 @@ export class SubjectsEditFormComponent implements OnInit {
|
|||
});
|
||||
this.subCommunityChanged();
|
||||
}
|
||||
|
||||
protected readonly openAIREEntities = OpenaireEntities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@ import {HttpClient} from "@angular/common/http";
|
|||
import {map} from "rxjs/operators";
|
||||
import {properties} from "../../../environments/environment";
|
||||
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
|
||||
@Injectable()
|
||||
export class SubjectsService {
|
||||
|
||||
constructor(private http: HttpClient, private communityService: CommunityService) {
|
||||
constructor(private http: HttpClient) {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +30,7 @@ export class SubjectsService {
|
|||
return [];
|
||||
}
|
||||
for (let subcommunity of subcommunities) {
|
||||
let parsedSubcommunity = this.communityService.parseCommunity(subcommunity);
|
||||
let parsedSubcommunity = CommunityInfo.parse(subcommunity);
|
||||
if(subCommunityId && parsedSubcommunity.subCommunityId == subCommunityId){
|
||||
return parsedSubcommunity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ declare var UIkit;
|
|||
They will be stored safely in our system for as long as OpenAIRE exists. Since you press the "save" button,
|
||||
you give us the consent to make them public in your Community Gateway to let users know who is
|
||||
configuring the platform. You always have the right to exercise your rights and ask for access,
|
||||
rectification, erasure and restriction of your data. Please contact <a href="mailto:rcd@openaire.eu">rcd@openaire.eu</a>
|
||||
rectification, erasure and restriction of your data. Please contact <a href="mailto:rcd@openaire.eu">rcd@openaire.eu</a>
|
||||
if you have any inquiries.
|
||||
</div>
|
||||
</modal-alert>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
<div class="uk-flex uk-flex-center">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-section uk-flex uk-flex-center uk-flex uk-flex-middle">
|
||||
<div search-input class="uk-width-xlarge@l uk-width-large" [searchControl]="filterForm" searchInputClass="outer"
|
||||
placeholder="Search Zenodo Communities" [disabled]="zenodoCommunitySearchUtils.status == errorCodes.LOADING"></div>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community [readonly]="true"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right@l uk-flex-center" uk-grid>
|
||||
<div search-input class="uk-width-xlarge@l uk-width-large" [searchControl]="filterForm" searchInputClass="outer"
|
||||
placeholder="Search Zenodo Communities" [disabled]="zenodoCommunitySearchUtils.status == errorCodes.LOADING"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative">
|
||||
<div *ngIf="zenodoCommunitySearchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {CommunityInfo} from "../../openaireLibrary/connect/community/communityIn
|
|||
import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
|
||||
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
|
||||
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
|
||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
declare var UIkit;
|
||||
|
||||
|
|
@ -229,4 +230,6 @@ export class AddZenodoCommunitiesComponent implements OnInit {
|
|||
pos: 'bottom-right'
|
||||
});
|
||||
}
|
||||
|
||||
protected readonly openaireEntities = OpenaireEntities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,143 +1,151 @@
|
|||
<div page-content *ngIf="community && searchUtils">
|
||||
|
||||
|
||||
<div inner>
|
||||
<div actions>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-section-xsmall uk-margin-top" uk-grid>
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer"
|
||||
placeholder="Search Zenodo Community" [disabled]="searchUtils.status === errorCodes.LOADING"
|
||||
class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle" (click)="openAddZenodoCommunites()"
|
||||
uk-tooltip="title:<div class='uk-text-bold'> Search and add more Zenodo Communities</div><div>The research results of a Zenodo community specified here will be automatically linked to your community dashboard.</div>"
|
||||
[disabled]="searchUtils.status === errorCodes.LOADING"
|
||||
[class.uk-disabled]="searchUtils.status === errorCodes.LOADING">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">New Zenodo Community</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<validate-page-enabled pageRoute="/participate/deposit/zenodo"></validate-page-enabled>
|
||||
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="searchUtils.status !== errorCodes.LOADING">
|
||||
<ng-container
|
||||
*ngIf="!this._communityService.selectedSubCommunity && previewZCommunitiesForSubCommunities.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill" uk-margin uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span *ngIf="previewCommunities.length > 0"
|
||||
>({{ previewCommunities.length }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span *ngIf="previewZCommunitiesForSubCommunities.length > 0"
|
||||
>({{ previewZCommunitiesForSubCommunities.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div
|
||||
[class.uk-switcher]="!this._communityService.selectedSubCommunity && previewZCommunitiesForSubCommunities.length > 0">
|
||||
<div>
|
||||
<div *ngIf="previewCommunities.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No zenodo communities
|
||||
<span *ngIf="selectedCommunities.length == 0; else: notFound">for {{ community.shortTitle }}</span>
|
||||
<span
|
||||
*ngIf="_communityService.selectedSubCommunityId() && this._communityService.selectedSubCommunity">{{' | ' + this._communityService.selectedSubCommunity['category'] + '| ' + this._communityService.selectedSubCommunity?.label}}</span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="previewCommunities.length > 0">
|
||||
<no-load-paging [type]="'Zenodo communities'"
|
||||
(pageChange)="updatePage($event)"
|
||||
[page]="page" [pageSize]="size"
|
||||
[totalResults]="previewCommunities.length">
|
||||
</no-load-paging>
|
||||
<!-- <ul class="uk-margin-medium-top uk-margin-bottom uk-list uk-list-xlarge">-->
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom" uk-grid>
|
||||
<div
|
||||
*ngFor="let item of previewCommunities.slice((this.page - 1)*this.size, this.page*this.size); let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<preview-zenodo-community [item]="item"
|
||||
[master]="masterCommunity && item.id==masterCommunity.id"></preview-zenodo-community>
|
||||
</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 *ngIf="item.id!==masterZenodoCommunityId">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||
(click)="removeCommunity(item)">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Remove</span>
|
||||
<div class="uk-section-xsmall uk-margin-top">
|
||||
<div class="uk-flex uk-flex-middle uk-grid" uk-grid>
|
||||
<div class="uk-width-1-2@m uk-width-1-1">
|
||||
<select-sub-community (subCommunityChangedEmitter)="subCommunityChanged()"></select-sub-community>
|
||||
</div>
|
||||
<div class="uk-width-expand@m uk-width-1-1">
|
||||
<div class="uk-grid uk-flex-middle uk-flex-right" uk-grid>
|
||||
<div search-input [expandable]="true" [searchControl]="filterForm" searchInputClass="outer"
|
||||
placeholder="Search Zenodo Community"
|
||||
[disabled]="searchUtils.status === errorCodes.LOADING"
|
||||
class="uk-width-large@l uk-width-expand@m uk-width-1-1"></div>
|
||||
<div>
|
||||
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
|
||||
(click)="openAddZenodoCommunites()"
|
||||
uk-tooltip="title:<div class='uk-text-bold'> Search and add more Zenodo Communities</div><div>The research results of a Zenodo community specified here will be automatically linked to your community dashboard.</div>"
|
||||
[disabled]="searchUtils.status === errorCodes.LOADING"
|
||||
[class.uk-disabled]="searchUtils.status === errorCodes.LOADING">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left uk-text-bold uk-text-uppercase">Add</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div inner>
|
||||
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
|
||||
<validate-page-enabled pageRoute="/participate/deposit/zenodo"></validate-page-enabled>
|
||||
<div *ngIf="searchUtils.status == errorCodes.LOADING" class="uk-position-center">
|
||||
<loading></loading>
|
||||
</div>
|
||||
<div *ngIf="searchUtils.status !== errorCodes.LOADING">
|
||||
<ng-container
|
||||
*ngIf="!this._communityService.selectedSubCommunity && previewZCommunitiesForSubCommunities.length > 0">
|
||||
<ul class="uk-subnav uk-subnav-pill uk-margin-top" uk-switcher>
|
||||
<li class="uk-active"><a href="#">Set for community <span *ngIf="previewCommunities.length > 0"
|
||||
>({{ previewCommunities.length }})</span> </a></li>
|
||||
<li><a href="#">Set for subcommunities <span
|
||||
*ngIf="previewZCommunitiesForSubCommunities.length > 0"
|
||||
>({{ previewZCommunitiesForSubCommunities.length }})</span></a></li>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<div [class.uk-switcher]="!this._communityService.selectedSubCommunity && previewZCommunitiesForSubCommunities.length > 0">
|
||||
<div>
|
||||
<div *ngIf="previewCommunities.length == 0"
|
||||
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
|
||||
<div>No zenodo communities
|
||||
<span *ngIf="selectedCommunities.length == 0; else: notFound">for {{ community.shortTitle }}</span>
|
||||
<span
|
||||
*ngIf="_communityService.selectedSubCommunityId() && this._communityService.selectedSubCommunity">{{ ' | ' + this._communityService.selectedSubCommunity['category'] + '| ' + this._communityService.selectedSubCommunity?.label }}</span>
|
||||
<ng-template #notFound>found</ng-template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(item.id==masterZenodoCommunityId)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeFromMasterCommunity(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove as Main</span>
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="previewCommunities.length > 0">
|
||||
<no-load-paging [type]="'Zenodo communities'"
|
||||
(pageChange)="updatePage($event)"
|
||||
[page]="page" [pageSize]="size"
|
||||
[totalResults]="previewCommunities.length">
|
||||
</no-load-paging>
|
||||
<!-- <ul class="uk-margin-medium-top uk-margin-bottom uk-list uk-list-xlarge">-->
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom"
|
||||
uk-grid>
|
||||
<div
|
||||
*ngFor="let item of previewCommunities.slice((this.page - 1)*this.size, this.page*this.size); let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<preview-zenodo-community [item]="item"
|
||||
[master]="masterCommunity && item.id==masterCommunity.id"></preview-zenodo-community>
|
||||
</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 *ngIf="item.id!==masterZenodoCommunityId">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<button class="uk-button uk-button-link uk-flex uk-flex-middle"
|
||||
(click)="removeCommunity(item)">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-xsmall-left">Remove</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div *ngIf="(item.id==masterZenodoCommunityId)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="removeFromMasterCommunity(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="remove" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Remove as Main</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(!masterZenodoCommunityId)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="addAsMasterCommunity(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Add as Main</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </ul>-->
|
||||
<div class="uk-margin-small-top">
|
||||
<paging-no-load [currentPage]="page"
|
||||
[totalResults]="previewCommunities.length" [size]="size"
|
||||
(pageChange)="updatePage($event)"
|
||||
customClasses="uk-flex-right@m uk-flex-center">
|
||||
</paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="previewZCommunitiesForSubCommunities.length > 0">
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom"
|
||||
uk-grid>
|
||||
<div
|
||||
*ngFor="let item of previewZCommunitiesForSubCommunities; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(item.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ _communityService.getCommunityLabel(item.subCommunityId) }}</a>
|
||||
<preview-zenodo-community [item]="item"
|
||||
[master]="false"></preview-zenodo-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(!masterZenodoCommunityId)">
|
||||
<div class="uk-padding-small uk-padding-remove-horizontal">
|
||||
<a (click)="addAsMasterCommunity(item)"
|
||||
class="uk-button uk-button-link uk-flex uk-flex-middle">
|
||||
<icon name="add" [flex]="true"></icon>
|
||||
<span class="uk-margin-small-left">Add as Main</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- </ul>-->
|
||||
<div class="uk-margin-small-top">
|
||||
<paging-no-load [currentPage]="page"
|
||||
[totalResults]="previewCommunities.length" [size]="size"
|
||||
(pageChange)="updatePage($event)" customClasses="uk-flex-right@m uk-flex-center">
|
||||
</paging-no-load>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="previewZCommunitiesForSubCommunities.length > 0">
|
||||
<div class="uk-grid uk-grid-large uk-child-width-1-1 uk-margin-medium-top uk-margin-bottom" uk-grid>
|
||||
<div
|
||||
*ngFor="let item of previewZCommunitiesForSubCommunities; let i=index">
|
||||
<div class="uk-card uk-card-default">
|
||||
<div class="uk-card-body">
|
||||
<a (click)="navigateToSub(item.subCommunityId)"
|
||||
class="uk-margin-small-right uk-margin-small-bottom uk-button uk-button-primary uk-button-small">
|
||||
{{ _communityService.getCommunityLabel(item.subCommunityId) }}</a>
|
||||
<preview-zenodo-community [item]="item"
|
||||
[master]="false"></preview-zenodo-community>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<modal-alert #AlertModalDeleteCommunity (alertOutput)="confirmedDeleteCommunity($event)"
|
||||
[overflowBody]="false"></modal-alert>
|
||||
|
||||
<fs-modal #fsModal>
|
||||
<add-zenodo-communities *ngIf="community" [masterCommunity]=masterCommunity
|
||||
[selectedCommunities]=selectedCommunities
|
||||
[community]="community"
|
||||
(zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></add-zenodo-communities>
|
||||
<add-zenodo-communities *ngIf="community" [masterCommunity]=masterCommunity
|
||||
[selectedCommunities]=selectedCommunities
|
||||
[community]="community"
|
||||
(zenodoCommunitiesChanged)="zenodoCommunitiesChanged($event)"></add-zenodo-communities>
|
||||
</fs-modal>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class
|
|||
import {SearchInputComponent} from "../../openaireLibrary/sharedComponents/search-input/search-input.component";
|
||||
import {UntypedFormBuilder, UntypedFormControl} from "@angular/forms";
|
||||
import {ManageZenodoCommunitiesService} from "../../services/manageZenodoCommunities.service";
|
||||
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
|
||||
|
||||
@Component({
|
||||
selector: 'zenodo-communities',
|
||||
|
|
@ -352,4 +353,6 @@ export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
this.subCommunityChanged();
|
||||
}
|
||||
|
||||
protected readonly openAIREEntities = OpenaireEntities;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export class ManageCommunityProjectsService {
|
|||
|
||||
let headers = new HttpHeaders({'Content-Type': 'application/json', 'accept': 'application/json'});
|
||||
|
||||
let url = properties.communityAPI+pid+(subCommunity?'/subcommunities':'') +"/projects?projectId="+id + (subCommunity?'?subCommunityId=' + subCommunity:'') ;
|
||||
let url = properties.communityAPI+pid+(subCommunity?'/subcommunities':'') +"/projects?projectId="+id + (subCommunity?'&subCommunityId=' + subCommunity:'') ;
|
||||
//return this.http.delete(url, options)
|
||||
return this.http.request('delete', url, { headers: headers})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,16 +1,13 @@
|
|||
import {Injectable} from '@angular/core';
|
||||
import {HttpClient, HttpHeaders} from '@angular/common/http';
|
||||
import{EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
|
||||
import {properties} from "../../environments/environment";
|
||||
import {map} from "rxjs/operators";
|
||||
import {SelectionCriteria} from "../openaireLibrary/utils/entities/contentProvider";
|
||||
import {Observable} from "rxjs";
|
||||
import {CommunityInfo} from "../openaireLibrary/connect/community/communityInfo";
|
||||
import {CommunityService} from "../openaireLibrary/connect/community/community.service";
|
||||
|
||||
@Injectable()
|
||||
export class ManageZenodoCommunitiesService {
|
||||
constructor(private http: HttpClient, private communityService: CommunityService ) {}
|
||||
constructor(private http: HttpClient) {}
|
||||
removeZenodoCommunity(properties:EnvProperties, pid: string,zenodoid: string, main:boolean = false, subCommunityId = null) {
|
||||
|
||||
const options = {
|
||||
|
|
@ -46,7 +43,7 @@ export class ManageZenodoCommunitiesService {
|
|||
return [];
|
||||
}
|
||||
for (let subcommunity of subcommunities) {
|
||||
let parsedSubcommunity = this.communityService.parseCommunity(subcommunity);
|
||||
let parsedSubcommunity = CommunityInfo.parse(subcommunity);
|
||||
if(subCommunityId && parsedSubcommunity.subCommunityId == subCommunityId){
|
||||
return parsedSubcommunity;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 9068a26ea3a1c83bbd11bf2e3ed058156f229cc8
|
||||
Subproject commit c1a7e58801dd22326d0cfd709776b15654505e4f
|
||||
|
|
@ -4,20 +4,17 @@
|
|||
// The list of which env maps to which file can be found in `.angular-cli.json`.
|
||||
|
||||
import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-properties';
|
||||
import {common, commonDev, commonProd} from "../app/openaireLibrary/utils/properties/environments/environment";
|
||||
import {common, commonDev} from "../app/openaireLibrary/utils/properties/environments/environment";
|
||||
|
||||
let props: EnvProperties = {
|
||||
|
||||
isDashboard: true,
|
||||
enablePiwikTrack: false,
|
||||
useCache: false,
|
||||
connectPortalUrl: 'http://scoobydoo.di.uoa.gr:4200',
|
||||
connectPortalUrl: 'http://duffy.di.uoa.gr:65120',
|
||||
domain:'https://beta.admin.connect.openaire.eu',
|
||||
adminToolsAPIURL: 'http://scoobydoo.di.uoa.gr:8880/uoa-admin-tools/',
|
||||
utilsService: "http://scoobydoo.di.uoa.gr:8000",
|
||||
|
||||
monitorStatsFrameUrl:"https://stats.madgik.di.uoa.gr/stats-api/",
|
||||
// disableFrameLoad : true
|
||||
utilsService: "http://duffy.di.uoa.gr:65011",
|
||||
monitorStatsFrameUrl:"https://stats.madgik.di.uoa.gr/stats-api/"
|
||||
};
|
||||
|
||||
export let properties: EnvProperties = {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<base href="/">
|
||||
<title>Administration Dashboard | OpenAIRE-Connect</title>
|
||||
|
|
@ -23,10 +23,13 @@
|
|||
<meta name="robots" content="noindex">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<script src="https://cdn.ckeditor.com/4.5.11/full-all/ckeditor.js"></script>
|
||||
<script>
|
||||
CKEDITOR.config.versionCheck = false;
|
||||
</script>
|
||||
<script src="https://unpkg.com/smoothscroll-polyfill@0.4.3/dist/smoothscroll.min.js"></script>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Reference in New Issue