-
+
{{affiliation.name}}
diff --git a/src/app/pages/affiliations/affiliations.component.ts b/src/app/pages/affiliations/affiliations.component.ts
index 2fd937e..a6b68a2 100644
--- a/src/app/pages/affiliations/affiliations.component.ts
+++ b/src/app/pages/affiliations/affiliations.component.ts
@@ -54,7 +54,6 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
if (this.community) {
this.title.setTitle(this.community.shortTitle.toUpperCase() + ' | Organizations');
this.getAffiliations();
- this.organizationsPageStatus();
}
}));
}
@@ -80,11 +79,7 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
}
);
}
-
- public get organizationsEnabled(): boolean {
- return !this.organizationsPage || this.organizationsPage.isEnabled;
- }
-
+
editAffiliationOpen(index: number = -1) {
let affiliation: Affiliation;
this.index = index;
@@ -179,13 +174,6 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
this.handleUpdateError('An error has been occurred. Try again later!');
});
}
-
- private organizationsPageStatus() {
- this.helpContentService.getCommunityPagesByRoute(this.community.communityId, '/organizations', this.properties.adminToolsAPIURL).subscribe((page) => {
- this.organizationsPage = page;
- })
- }
-
handleUpdateError(message: string) {
NotificationHandler.rise(message, "danger");
this.loading = false;
@@ -195,14 +183,5 @@ export class AffiliationsComponent implements OnInit, OnDestroy {
NotificationHandler.rise(message);
this.loading = false;
}
-
- enableAffiliations() {
- this.helpContentService.togglePages(this.community.communityId, [this.organizationsPage._id], true, this.properties.adminToolsAPIURL).subscribe(() => {
- this.organizationsPage.isEnabled = true;
- this._clearCacheService.purgeBrowserCache("Organizations Page enabled", this.community.communityId);
- NotificationHandler.rise('Organizations Page has been
enabled successfully');
- }, error => {
- this.handleUpdateError('An error has been occurred. Try again later!');
- });
- }
+
}
diff --git a/src/app/pages/affiliations/affiliations.module.ts b/src/app/pages/affiliations/affiliations.module.ts
index 7bafd2d..d3fd03b 100644
--- a/src/app/pages/affiliations/affiliations.module.ts
+++ b/src/app/pages/affiliations/affiliations.module.ts
@@ -17,11 +17,12 @@ import {LoadingModule} from "../../openaireLibrary/utils/loading/loading.module"
import {UrlPrefixModule} from "../../openaireLibrary/utils/pipes/url-prefix.module";
import {HelpContentService} from "../../services/help-content.service";
import {PagingModule} from "../../openaireLibrary/utils/paging.module";
+import {ValidateEnabledPageModule} from "../../utils/validateEnabledPage.module";
@NgModule({
imports: [
AffiliationsRoutingModule, CommonModule, FormsModule, RouterModule,
- AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule
+ AlertModalModule, ReactiveFormsModule, InputModule, PageContentModule, IconsModule, NoLoadPaging, LoadingModule, UrlPrefixModule, PagingModule, ValidateEnabledPageModule
],
declarations: [
AffiliationsComponent
diff --git a/src/app/pages/community-info/profile/edit-community/edit-community.component.ts b/src/app/pages/community-info/profile/edit-community/edit-community.component.ts
index 89c1116..36eb7ad 100644
--- a/src/app/pages/community-info/profile/edit-community/edit-community.component.ts
+++ b/src/app/pages/community-info/profile/edit-community/edit-community.component.ts
@@ -20,11 +20,19 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
+ placeholder="Index name of the community.">
+ placeholder="Index short name of the community.">
+
+
+
Description of the community
@@ -35,7 +43,7 @@ import {ClearCacheService} from "../../../../openaireLibrary/services/clear-cach
removeButtons: 'Save,NewPage,DocProps,Preview,Print,' +
'Form,Checkbox,Radio,TextField,Textarea,Select,Button,ImageButton,HiddenField,' +
'CreateDiv,Flash,PageBreak,' +
- 'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language',
+ 'Subscript,Superscript,Anchor,Smiley,Iframe,Styles,Font,About,Language,JustifyLeft,JustifyRight,JustifyCenter,JustifyBlock,FontSize,TextColor,BGColor',
extraPlugins: 'divarea'}">
@@ -153,6 +161,8 @@ export class EditCommunityComponent {
communityId: this.fb.control(this.community.communityId),
name: this.fb.control(this.community.title, Validators.required),
shortName: this.fb.control(this.community.shortTitle, Validators.required),
+ displayName: this.fb.control(this.community.displayTitle, Validators.required),
+ displayShortName: this.fb.control(this.community.displayShortTitle, Validators.required),
description: this.fb.control(this.community.description),
status: this.fb.control(this.community.status),
claim: this.fb.control(this.community.claim),
@@ -182,6 +192,7 @@ export class EditCommunityComponent {
if (!this.isAdmin) {
setTimeout(() => {
this.communityFb.get('shortName').disable();
+ this.communityFb.get('name').disable();
}, 0);
}
}
@@ -190,9 +201,9 @@ export class EditCommunityComponent {
}
public get isAdmin() {
- return Session.isPortalAdministrator(this.user);
+ return Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user);
}
-
+
public get disabled(): boolean {
return (this.communityFb && this.communityFb.invalid) ||
(this.communityFb && this.communityFb.pristine && !this.isNew && !this.file) ||
@@ -237,8 +248,7 @@ export class EditCommunityComponent {
this.removePhoto();
this.subscriptions.push(this.communityService.updateCommunity(
this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
- this._clearCacheService.clearCache("Community saved");
- this._clearCacheService.purgeBrowserCache("Community saved", this.community.communityId);
+ this._clearCacheService.clearCacheInRoute("Community saved",this.community.communityId,"/");
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
NotificationHandler.rise(community.shortTitle + ' has been
successfully created');
callback(community);
@@ -251,8 +261,7 @@ export class EditCommunityComponent {
}));
} else {
this.subscriptions.push(this.communityService.updateCommunity(this.properties.communityAPI + this.community.communityId, this.communityFb.getRawValue()).subscribe(() => {
- this._clearCacheService.clearCache("Community updated");
- this._clearCacheService.purgeBrowserCache("Community updated", this.community.communityId);
+ this._clearCacheService.clearCacheInRoute("Community saved",this.community.communityId,"/");
this.communityService.getCommunity(this.community.communityId, true).subscribe(community => {
NotificationHandler.rise(community.shortTitle + ' has been
successfully saved');
callback(community);
diff --git a/src/app/pages/connect-admin-customization/connect-admin-customization.component.ts b/src/app/pages/connect-admin-customization/connect-admin-customization.component.ts
index df51cff..3ed1213 100644
--- a/src/app/pages/connect-admin-customization/connect-admin-customization.component.ts
+++ b/src/app/pages/connect-admin-customization/connect-admin-customization.component.ts
@@ -16,14 +16,28 @@ declare var UIkit;
-
-
Use only after connect deployment. And only if there are css updates!
- Press the following button to update the timestamp in the saved layouts and recreate the css files.
+
+
+
Use only after connect deployment. And only if there are css updates!
+ Press the following button to update the timestamp in the saved layouts and recreate the css files.
+
+
+
-
-
+
+
Purge ICM cache for all communities
-
+
+
+
+
+
Reload cache requests either per community or for all communities
+
+
+
+
+
+
@@ -45,6 +59,7 @@ export class ConnectAdminCustomizationComponent implements OnInit {
cssCreated: number = 0;
totalLayouts: number = 0;
community;
+ route;
properties = properties;
constructor( private customizationService: CustomizationService, private _clearCacheService: ClearCacheService,
@@ -133,4 +148,20 @@ export class ConnectAdminCustomizationComponent implements OnInit {
}));
}
}
+
+ forceReloadCache() {
+ if (this.community) {
+ this._clearCacheService.clearCacheInRoute("Clear cache", this.community, this.route ? this.route : "/")
+ } else {
+ this.savingChanges = true;
+ this.subscriptions.push(this.communitiesService.getCommunities(this.properties, this.properties.communityAPI + 'communities').subscribe(
+ communities => {
+ communities.forEach(community => {
+ this._clearCacheService.clearCacheInRoute("Clear cache for "+ community.communityId, community.communityId, this.route ? this.route : "/")
+ });
+ this.savingChanges = false;
+ }
+ ));
+ }
+ }
}
diff --git a/src/app/pages/content-providers/add-content-providers.component.html b/src/app/pages/content-providers/add-content-providers.component.html
index 5c064b6..a9f23a9 100644
--- a/src/app/pages/content-providers/add-content-providers.component.html
+++ b/src/app/pages/content-providers/add-content-providers.component.html
@@ -36,12 +36,21 @@
diff --git a/src/app/pages/content-providers/add-content-providers.component.ts b/src/app/pages/content-providers/add-content-providers.component.ts
index 32f8584..b4a3f11 100644
--- a/src/app/pages/content-providers/add-content-providers.component.ts
+++ b/src/app/pages/content-providers/add-content-providers.component.ts
@@ -102,8 +102,8 @@ export class AddContentProvidersComponent implements OnInit {
"
"
}
- public addContentProvider(contentProvider: SearchResult) {
- this.subscriptions.push(this.manageCommunityContentProvidersService.addContentProvider(this.properties, this.community.communityId, contentProvider).subscribe(
+ public addContentProvider(contentProvider: SearchResult, content = true, deposit =false) {
+ this.subscriptions.push(this.manageCommunityContentProvidersService.addContentProvider(this.properties, this.community.communityId, contentProvider, content, deposit).subscribe(
data => {
this.communityContentProviders.push(data);
this._clearCacheService.purgeBrowserCache(this.openAIREEntities.DATASOURCE+" added", this.community.communityId);
@@ -120,7 +120,7 @@ export class AddContentProvidersComponent implements OnInit {
public removeContentProvider(contentProvider) {
let communityContentProvider = this.getCommunityContentProvider(contentProvider);
- let contentProviderId: string = communityContentProvider['id'];
+ let contentProviderId: string = communityContentProvider['openaireId'];
this.subscriptions.push(this.manageCommunityContentProvidersService.removeContentProvider(this.properties, this.community.communityId, contentProviderId).subscribe(
data => {
let index = this.communityContentProviders.indexOf(communityContentProvider);
diff --git a/src/app/pages/content-providers/communityContentProviders.module.ts b/src/app/pages/content-providers/communityContentProviders.module.ts
index 4a0708e..2de48bb 100644
--- a/src/app/pages/content-providers/communityContentProviders.module.ts
+++ b/src/app/pages/content-providers/communityContentProviders.module.ts
@@ -28,6 +28,9 @@ import {AddContentProvidersComponent} from "./add-content-providers.component";
import {ManageCommunityContentProvidersService} from "../../services/manageContentProviders.service";
import {SearchDataprovidersService} from "../../openaireLibrary/services/searchDataproviders.service";
import {CriteriaModule} from "./criteria/criteria.module";
+import {MatSlideToggleModule} from "@angular/material/slide-toggle";
+import {CKEditorModule} from "ng2-ckeditor";
+import {ValidateEnabledPageModule} from "../../utils/validateEnabledPage.module";
@NgModule({
imports: [
@@ -48,7 +51,7 @@ import {CriteriaModule} from "./criteria/criteria.module";
path: '', component: ManageContentProvidersComponent
}
]),
- NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule
+ NoLoadPaging, LoadingModule, IconsModule, FullScreenModalModule, ResultPreviewModule, CriteriaModule, MatSlideToggleModule, CKEditorModule, ReactiveFormsModule, ValidateEnabledPageModule
],
declarations: [
ManageContentProvidersComponent,
diff --git a/src/app/pages/content-providers/criteria-utils.ts b/src/app/pages/content-providers/criteria-utils.ts
index c8eee7d..e069da3 100644
--- a/src/app/pages/content-providers/criteria-utils.ts
+++ b/src/app/pages/content-providers/criteria-utils.ts
@@ -7,7 +7,7 @@ export class CriteriaUtils {
{value: 'title', label: 'Title'},
{value: 'orcid', label: 'Author\'s ORCID'},
{value: 'contributor', label: 'Contributor'},
- {value: 'description', label: 'Description'},
+ {value: 'description', label: 'Abstract'},
{value: 'subject', label: 'Subject'},
{value: 'fos', label: 'Field of Science'},
{value: 'sdg', label: 'SDG'},
@@ -28,8 +28,8 @@ export class CriteriaUtils {
{value: 'greater_than', label: 'greater than'}
]
- public getFiltersAsText(criteria: Criteria[]): string {
- let text = criteria.slice(0, 3).map((criterion, index) => (index + 1) + ". " + criterion.constraint.map(constraint => {
+ public getFiltersAsText(criteria: Criteria[], shortVersion=true): string {
+ let text = criteria.slice(0, shortVersion?3:criteria.length).map((criterion, index) => (index + 1) + ". " + criterion.constraint.map(constraint => {
let field = this.fields.find(field => field.value === constraint.field)?.label;
let matchCase = false;
if (!constraint.verb.includes('_caseinsensitive')) {
@@ -37,7 +37,9 @@ export class CriteriaUtils {
}
let verb = [...this.verbs,...this.verbsForNumbers].find(verb => verb.value === constraint.verb.replace("_caseinsensitive", "")).label;
let value = '"' + constraint.value + '"' + (matchCase ? " (Match case)" : "");
- return field + " " + verb + " " + value;
+ let expFeature = field =='Publisher' || field == 'Publication Year'? `
experimental feature`:''
+ return field + " " + verb + " " + value + expFeature;
}).join("
and "));
return text.join("
");
}
diff --git a/src/app/pages/content-providers/criteria/criteria.component.html b/src/app/pages/content-providers/criteria/criteria.component.html
index 74469a3..21e26fd 100644
--- a/src/app/pages/content-providers/criteria/criteria.component.html
+++ b/src/app/pages/content-providers/criteria/criteria.component.html
@@ -1,4 +1,4 @@
-
+
+
experimental feature
+
experimental feature
diff --git a/src/app/pages/content-providers/manage-content-providers.component.ts b/src/app/pages/content-providers/manage-content-providers.component.ts
index f211f4f..88fab9d 100644
--- a/src/app/pages/content-providers/manage-content-providers.component.ts
+++ b/src/app/pages/content-providers/manage-content-providers.component.ts
@@ -1,4 +1,4 @@
-import {ChangeDetectorRef, Component, OnInit, ViewChild} from '@angular/core';
+import {ChangeDetectorRef, Component, OnInit, SimpleChanges, ViewChild} from '@angular/core';
import {RemoveContentProvidersComponent} from './remove-content-providers.component';
import {Title} from '@angular/platform-browser';
import {
@@ -15,6 +15,7 @@ import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFie
import {CriteriaComponent} from "./criteria/criteria.component";
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
import {ManageCommunityContentProvidersService} from "../../services/manageContentProviders.service";
+import {UntypedFormBuilder} from "@angular/forms";
@Component({
selector: 'manage-content-providers',
@@ -23,6 +24,7 @@ import {ManageCommunityContentProvidersService} from "../../services/manageConte
[communityContentProviders]="communityContentProviders"
[loading]="showLoadingInRemove" [community]="community"
(editCriteria)="openCriteria($event)"
+
(communityContentProvidersChanged)="communityContentProvidersChanged($event)">
@@ -30,10 +32,23 @@ import {ManageCommunityContentProvidersService} from "../../services/manageConte
[community]="community"
(communityContentProvidersChanged)="communityContentProvidersChanged($event)">
-
+
- {{dataProvider.officialname}}
+
+
+
+
+
+
+
+
+
+
+
+
Content filters
+
No Filters for {{dataProvider.officialname}} yet
@@ -42,6 +57,24 @@ import {ManageCommunityContentProvidersService} from "../../services/manageConte
+
+
+
+
+
Type a message or instruction for researchers about deposition in this datasource
+
+
+
`
@@ -53,6 +86,7 @@ export class ManageContentProvidersComponent implements OnInit {
@ViewChild('criteria') criteria: CriteriaComponent;
@ViewChild('addContentProvidersModal', { static: true }) addContentProvidersModal: FullScreenModalComponent;
@ViewChild('filtersModal', { static: true }) filtersModal: FullScreenModalComponent;
+ @ViewChild('depositModal', { static: true }) depositModal: FullScreenModalComponent;
private subscriptions: any[] = [];
public showLoadingInRemove: boolean = true;
public body: string = "Send from page";
@@ -60,11 +94,16 @@ export class ManageContentProvidersComponent implements OnInit {
public openaireEntities = OpenaireEntities;
public community: CommunityInfo;
public dataProvider: ContentProvider;
-
+ message = "";
+ deposit= false;
+ enabled = false;
+ depositInfoChanged =false;
+ messageForm = this.fb.control("");
constructor(private title: Title,
private cdr: ChangeDetectorRef,
private communityService: CommunityService,
- private manageCommunityContentProvidersService: ManageCommunityContentProvidersService) {
+ private manageCommunityContentProvidersService: ManageCommunityContentProvidersService,
+ private fb: UntypedFormBuilder) {
}
ngOnInit() {
@@ -96,17 +135,26 @@ export class ManageContentProvidersComponent implements OnInit {
public openCriteria(contentProvider: ContentProvider) {
this.dataProvider = contentProvider;
- this.filtersModal.title = 'Filters';
+ this.deposit = this.dataProvider.deposit;
+ this.message = this.dataProvider.message;
+ this.enabled = this.dataProvider.enabled;
+ this.messageForm = this.fb.control(this.message);
+ this.depositInfoChanged = false;
+ this.filtersModal.title = 'Edit datasource options';
this.filtersModal.okButtonText = "Save";
this.filtersModal.back = true;
this.filtersModal.okButton = true;
+
this.filtersModal.open();
this.cdr.detectChanges();
}
-
public saveCriteria() {
let callback = (selectionCriteria): void => {
this.dataProvider.selectioncriteria = selectionCriteria;
+ this.dataProvider.deposit = this.deposit;
+ this.dataProvider.message = this.message;
+ this.dataProvider.enabled = this.enabled;
+ console.log(this.dataProvider)
this.manageCommunityContentProvidersService.saveContentProvider(this.properties, this.dataProvider).subscribe(() => {
this.criteria.reset();
this.removeContentProvidersComponent.getCommunityContentProviders();
@@ -118,6 +166,7 @@ export class ManageContentProvidersComponent implements OnInit {
});
}
this.removeContentProvidersComponent.loading = true;
+ console.log()
this.criteria.save(callback);
}
@@ -128,4 +177,17 @@ export class ManageContentProvidersComponent implements OnInit {
this.removeContentProvidersComponent.applyFilters();
}
}
+
+
+ depositReset(){
+ this.message = this.dataProvider.message;
+ this.messageForm.setValue(this.message);
+ this.deposit = this.dataProvider.deposit;
+ this.enabled = this.dataProvider.enabled;
+ }
+
+ messageChanged(){
+ this.message = this.messageForm.value;
+ this.depositInfoChanged = true;
+ }
}
diff --git a/src/app/pages/content-providers/remove-content-providers.component.html b/src/app/pages/content-providers/remove-content-providers.component.html
index 6156177..04dc383 100644
--- a/src/app/pages/content-providers/remove-content-providers.component.html
+++ b/src/app/pages/content-providers/remove-content-providers.component.html
@@ -22,6 +22,8 @@
+
+
No
{{openAIREEntities.DATASOURCES}}
@@ -54,7 +56,13 @@
[no title available]
-
0" class="uk-margin-small-bottom uk-text-small">
+
Content source
+
Suggested for deposit
+
+
0" class="uk-margin-small-bottom uk-margin-small-top uk-text-small">
Filters
3" class="uk-margin-small-top">
@@ -64,18 +72,24 @@