+
+
-
-
{{updateErrorMessage}}
-
{{errorMessage}}
-
{{successfulSaveMessage}}
-
{{successfulResetMessage}}
-
-
-
Notification settings are related to your personal account.
-
+
diff --git a/src/app/pages/usernotifications/manage-user-notifications.component.ts b/src/app/pages/usernotifications/manage-user-notifications.component.ts
index 9ccb4be..6e42463 100644
--- a/src/app/pages/usernotifications/manage-user-notifications.component.ts
+++ b/src/app/pages/usernotifications/manage-user-notifications.component.ts
@@ -1,21 +1,20 @@
-import {Component, OnInit, Input, ViewChild, ElementRef} from '@angular/core';
-import {FormGroup, FormBuilder} from '@angular/forms';
+import {Component, ElementRef, Input, OnInit} from '@angular/core';
+import {FormBuilder, FormGroup} from '@angular/forms';
import {ActivatedRoute, Router} from '@angular/router';
-
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
-
import {Session, User} from '../../openaireLibrary/login/utils/helper.class';
-
import {ManageUserNotificationsService} from './manage-user-notifications.service';
-
import {UserNotificationsRights} from './userNotificationsRights';
-
-import {MailPrefsComponent} from '../../openaireLibrary/connect/userEmailPreferences/mailPrefs.component';
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class';
import {UserManagementService} from '../../openaireLibrary/services/user-management.service';
import {Title} from '@angular/platform-browser';
+import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
+import {properties} from '../../../environments/environment';
+import { Subscriber} from 'rxjs';
+import {MailPrefsService} from '../../openaireLibrary/connect/userEmailPreferences/mailPrefs.service';
+declare var UIkit;
@Component({
selector: 'manage-user-notifications',
templateUrl: './manage-user-notifications.component.html',
@@ -27,86 +26,102 @@ export class ManageUserNotificationsComponent implements OnInit {
myForm: FormGroup;
public properties: EnvProperties = null;
- public communityId = null;
- public userNotifications = null;
- public initialUserNotifications = null;
+ public communityId;
+ public userNotifications:UserNotificationsRights = null;
+ public initialUserNotifications:UserNotificationsRights = null;
+ public notifications = null;
+ public initialNotifications = [];
public userEmail = null;
public showLoading = true;
- public errorMessage = '';
- public updateErrorMessage = '';
-
- public successfulSaveMessage = '';
- public successfulResetMessage = '';
-
public hasChanged = false;
public user: User;
+ private subscriptions = [];
- @ViewChild(MailPrefsComponent) mailPrefs: MailPrefsComponent;
-
+ frequencyOptions = [{label:"Daily", value: 24}, {label:"Every two days", value: 48}, {label:"Weekly", value: 168}]
constructor(private route: ActivatedRoute, private _router: Router, public _fb: FormBuilder,
private title: Title,
private _manageUserNotificationsService: ManageUserNotificationsService,
- private element: ElementRef, private userManagementService: UserManagementService) {
+ private element: ElementRef, private userManagementService: UserManagementService, private communityService: CommunityService, private _mailPrefsService: MailPrefsService,) {
}
ngOnInit() {
- this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
- this.properties = data.envSpecific;
- this.route.queryParams.subscribe(
- communityId => {
- HelperFunctions.scroll();
- this.communityId = communityId['communityId'];
- if (this.communityId != null && this.communityId !== '') {
- this.title.setTitle('Administration Dashboard | User Notifications');
- this.showLoading = true;
- this.updateErrorMessage = '';
- this.errorMessage = '';
- this.successfulSaveMessage = '';
- this.userManagementService.getUserInfo().subscribe(user => {
- this.user = user;
- if (this.user) {
- this.userEmail = this.user.email;
- this._manageUserNotificationsService.getUserNotifications(this.properties, this.communityId, this.userEmail).subscribe(
- userNotifications => {
- this.initialUserNotifications = userNotifications;
- if (this.initialUserNotifications['notifyForNewManagers'] == null ||
- this.initialUserNotifications['notifyForNewSubscribers'] == null) {
- this.initialUserNotifications = this.initiateUserNotifications();
- }
- this.userNotifications = JSON.parse(JSON.stringify(this.initialUserNotifications));
-
- // TODO remove after final testing
- this.showLoading = false;
- },
- error => {
- if (error.status === 404) {
- this.initialUserNotifications = this.initiateUserNotifications();
- this.userNotifications = JSON.parse(JSON.stringify(this.initialUserNotifications));
- } else {
- this.handleError('System error retrieving user notifications', error);
- }
- this.showLoading = false;
- }
- );
+ this.properties = properties;
+ HelperFunctions.scroll();
+ this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
+ if(community) {
+ this.communityId =community.communityId;
+ this.title.setTitle( this.communityId.toUpperCase() + ' | User Notifications');
+ this.showLoading = true;
+ this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
+ this.user = user;
+ if (this.user) {
+ this.userEmail = this.user.email;
+ this.subscriptions.push(this._manageUserNotificationsService.getUserNotifications(this.properties, this.communityId).subscribe(
+ userNotifications => {
+ this.initialUserNotifications = userNotifications;
+ if (this.initialUserNotifications['notifyForNewManagers'] == null ||
+ this.initialUserNotifications['notifyForNewSubscribers'] == null) {
+ if(Session.isManager("community",this.communityId, this.user)) {
+ this.initialUserNotifications = new UserNotificationsRights(true, true, "");
+ }else{
+ this.initialUserNotifications = new UserNotificationsRights(false, false, "");
+ }
}
- });
- }
+
+ this.userNotifications = JSON.parse(JSON.stringify(this.initialUserNotifications));
+ this.getClaimsNotifications();
+ },
+ error => {
+ if (error.status === 404) {
+ if(Session.isManager("community",this.communityId, this.user)) {
+ this.initialUserNotifications = new UserNotificationsRights(true, true, "");
+ }else{
+ this.initialUserNotifications = new UserNotificationsRights(false, false, "");
+ }
+ this.userNotifications = JSON.parse(JSON.stringify(this.initialUserNotifications));
+ } else {
+ this.handleError('System error retrieving user notifications', error);
+ }
+ this.getClaimsNotifications();
+ }
+ ));
}
- );
+ }));
+ }
+ }));
+ }
+ getClaimsNotifications(){
+ this.subscriptions.push(this._mailPrefsService.getUserEmailPreferencesForCommunity(this.communityId, this.properties.claimsAPIURL).subscribe(
+ data => {
+ this.initialNotifications = data.data;
+ this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
+ this.showLoading = false;
+ },
+ err => {
+ if(err.status === 404) {
+ if(Session.isManager("community",this.communityId, this.user)) {
+ this.initialNotifications = [{notify: true, frequency:24, openaireId: this.communityId}];
+ }else{
+ this.initialNotifications = [{notify: false, frequency:24, openaireId: this.communityId}];
+ }
+ this.notifications = JSON.parse(JSON.stringify( this.initialNotifications ));
+ }else{
+ this.handleError("Error getting user email preferences for community with id: "+this.communityId, err);
+ }
+ this.showLoading = false;
+ }
+ ));
+ }
+ ngOnDestroy() {
+ this.subscriptions.forEach(value => {
+ if (value instanceof Subscriber) {
+ value.unsubscribe();
+ }
});
}
- public initiateUserNotifications(): UserNotificationsRights {
- const notificationRights: UserNotificationsRights = new UserNotificationsRights();
-
- notificationRights['notifyForNewManagers'] = true;
- notificationRights['notifyForNewSubscribers'] = true;
- notificationRights['managerEmail'] = this.userEmail;
-
- return notificationRights;
- }
public updateUserNotifications() {
if (!Session.isLoggedIn()) {
@@ -114,18 +129,28 @@ export class ManageUserNotificationsComponent implements OnInit {
{queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}});
} else {
if (this.communityId != null && this.communityId !== '') {
- this.mailPrefs.saveNotification(0);
+ // this.mailPrefs.saveNotification(0);
- this.successfulSaveMessage = '';
+ // this.successfulSaveMessage = '';
this.showLoading = true;
const userNotifications = this.parseUpdatedUserNotifications();
- this._manageUserNotificationsService.updateUserNotifications(this.properties, this.communityId, userNotifications).subscribe(
+ this.subscriptions.push(this._manageUserNotificationsService.updateUserNotifications(this.properties, this.communityId, userNotifications).subscribe(
userNotifications => {
this.initialUserNotifications = JSON.parse(JSON.stringify(this.userNotifications));
this.handleSuccessfulSave('Notification settings saved!');
},
error => this.handleUpdateError('System error updating user notifications', error)
- );
+ ));
+ this.subscriptions.push(this._mailPrefsService.saveUserEmailPreferences(this.notifications[0], this.properties.claimsAPIURL).subscribe(
+ data => {
+ this.initialNotifications[0] = JSON.parse(JSON.stringify( this.notifications[0] ));
+ this.handleSuccessfulSave('Claims notification settings saved!');
+ },
+ err => {
+ //console.log(err);
+ this.handleError("Error saving user email preferences: "+JSON.stringify(this.notifications[0]), err);
+ }
+ ));
}
this.resetChange();
}
@@ -139,11 +164,12 @@ export class ManageUserNotificationsComponent implements OnInit {
if (this.userNotifications.managerEmail) {
userNotifications['managerEmail'] = this.userNotifications.managerEmail;
- } else {
- if (this.user) {
- userNotifications['managerEmail'] = this.user.email;
- }
}
+ // else {
+ // if (this.user) {
+ // userNotifications['managerEmail'] = this.user.email;
+ // }
+ // }
return userNotifications;
}
@@ -153,9 +179,11 @@ export class ManageUserNotificationsComponent implements OnInit {
queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
});
} else {
- this.mailPrefs.restoreNotification(0);
+ // this.mailPrefs.restoreNotification(0);
+ this.notifications[0] = JSON.parse(JSON.stringify( this.initialNotifications[0] ));
+
if (this.userNotifications && this.initialUserNotifications) {
- this.successfulSaveMessage = '';
+ // this.successfulSaveMessage = '';
this.showLoading = true;
this.userNotifications = JSON.parse(JSON.stringify(this.initialUserNotifications));
this.showLoading = false;
@@ -188,45 +216,50 @@ export class ManageUserNotificationsComponent implements OnInit {
private change() {
this.hasChanged = true;
- this.successfulSaveMessage = '';
- this.successfulResetMessage = '';
+ // this.successfulSaveMessage = '';
+ // this.successfulResetMessage = '';
}
private resetChange() {
this.hasChanged = false;
}
- public mailPrefsChanged(): boolean {
- if (!Session.isLoggedIn()) {
- this._router.navigate(['/user-info'], {
- queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
- });
- } else {
- return this.mailPrefs.prefsChanged['0'];
- }
- }
-
handleUpdateError(message: string, error) {
- this.updateErrorMessage = message;
+ // this.updateErrorMessage = message;
console.log('Server responded: ' + error);
this.showLoading = false;
}
handleError(message: string, error) {
- this.errorMessage = message;
+ // this.errorMessage = message;
console.log('Server responded: ' + error);
-
+ UIkit.notification(message, {
+ status: 'danger',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
this.showLoading = false;
}
handleSuccessfulSave(message) {
this.showLoading = false;
- this.successfulSaveMessage = message;
+ // this.successfulSaveMessage = message;
+ UIkit.notification(message, {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
}
- handleSuccessfulReset(message) {
- this.showLoading = false;
- this.successfulResetMessage = message;
+ changeNotify(notification: any, checked: boolean, index: number) {
+ notification.notify = checked;
+ this.change();
}
+
+ changeFrequency() {
+ this.change();
+ }
+
+
}
diff --git a/src/app/pages/usernotifications/manage-user-notifications.module.ts b/src/app/pages/usernotifications/manage-user-notifications.module.ts
index 293b471..a0f9ece 100644
--- a/src/app/pages/usernotifications/manage-user-notifications.module.ts
+++ b/src/app/pages/usernotifications/manage-user-notifications.module.ts
@@ -7,18 +7,21 @@ import {ManageUserNotificationsComponent} from './manage-user-notifications.comp
import {ManageUserNotificationsService} from './manage-user-notifications.service';
import {MailPrefsModule} from '../../openaireLibrary/connect/userEmailPreferences/mailsPrefs.module';
import {ManageUserNotificationsRoutingModule} from './manage-user-notifications-routing.module';
-import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard';
-import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
+import {UsersTabsModule} from '../users/users-tabs.module';
+import {PageContentModule} from '../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module';
+import {MatSelectModule, MatSlideToggleModule} from '@angular/material';
+import {LoadingModule} from '../../openaireLibrary/utils/loading/loading.module';
+import {SharedModule} from '../../openaireLibrary/shared/shared.module';
@NgModule({
imports: [
- ManageUserNotificationsRoutingModule, RouterModule, CommonModule, FormsModule, MailPrefsModule
+ ManageUserNotificationsRoutingModule, RouterModule, CommonModule, FormsModule, MailPrefsModule, UsersTabsModule, PageContentModule, MatSlideToggleModule, LoadingModule, SharedModule, MatSelectModule
],
declarations: [
ManageUserNotificationsComponent
],
providers: [
- ManageUserNotificationsService, IsCommunity, ConnectAdminLoginGuard
+ ManageUserNotificationsService
],
exports: [
ManageUserNotificationsComponent
diff --git a/src/app/pages/usernotifications/manage-user-notifications.service.ts b/src/app/pages/usernotifications/manage-user-notifications.service.ts
index c604c6d..127e863 100644
--- a/src/app/pages/usernotifications/manage-user-notifications.service.ts
+++ b/src/app/pages/usernotifications/manage-user-notifications.service.ts
@@ -12,10 +12,9 @@ export class ManageUserNotificationsService {
constructor(private http: HttpClient) {
}
- getUserNotifications(properties: EnvProperties, pid: string, email: string) {
+ getUserNotifications(properties: EnvProperties, pid: string) {
let url: string = properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+ pid + '/notifications';
- return this.http.get(url)//.map(res =>
res.json())
- .pipe(map(res => this.parseUserNotifications(res, email)));
+ return this.http.get(url, CustomOptions.registryOptions());
}
updateUserNotifications(properties: EnvProperties, pid: string, userNotificationsRights: any) {
@@ -23,7 +22,7 @@ export class ManageUserNotificationsService {
//let options = new RequestOptions({headers: headers});
let body = JSON.stringify(userNotificationsRights);
let url: string = properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/notifications';
- return this.http.post(url, body, CustomOptions.getAuthOptionsWithBody());
+ return this.http.post(url, body, CustomOptions.registryOptions());
//.do(request => console.log("Insert Response:"+request.status));
}
diff --git a/src/app/pages/usernotifications/userNotificationsRights.ts b/src/app/pages/usernotifications/userNotificationsRights.ts
index 15328b0..8f84a64 100644
--- a/src/app/pages/usernotifications/userNotificationsRights.ts
+++ b/src/app/pages/usernotifications/userNotificationsRights.ts
@@ -2,4 +2,9 @@ export class UserNotificationsRights {
notifyForNewManagers: boolean;
notifyForNewSubscribers: boolean;
managerEmail: string;
+ constructor (notifyForNewManagers: boolean = true, notifyForNewSubscribers: boolean = true, managerEmail: string = null ){
+ this.notifyForNewManagers = notifyForNewManagers;
+ this.notifyForNewSubscribers = notifyForNewSubscribers;
+ this.managerEmail = managerEmail;
+ }
}
diff --git a/src/app/pages/users/personal-info/personal-info.component.css b/src/app/pages/users/personal-info/personal-info.component.css
new file mode 100644
index 0000000..d97c500
--- /dev/null
+++ b/src/app/pages/users/personal-info/personal-info.component.css
@@ -0,0 +1,30 @@
+form {
+ font-family: "Roboto", sans-serif;
+}
+
+form .connected {
+ color: rgba(var(--text-color-rgb), 0.5);
+}
+
+form .image {
+ position: relative;
+ width: 120px;
+ height: 120px;
+}
+
+form .image icon {
+ position: absolute;
+ top: 100%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+}
+
+form .image img {
+ box-shadow: 0 3px 6px #00000029;
+ border-radius: 50%;
+ margin-bottom: 10px;
+ width: 120px;
+ height: 120px;
+ object-fit: cover;
+}
+
diff --git a/src/app/pages/users/personal-info/personal-info.component.ts b/src/app/pages/users/personal-info/personal-info.component.ts
new file mode 100644
index 0000000..ca32351
--- /dev/null
+++ b/src/app/pages/users/personal-info/personal-info.component.ts
@@ -0,0 +1,479 @@
+import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
+import {ActivatedRoute} from '@angular/router';
+import {Title} from '@angular/platform-browser';
+import {AlertModal} from "../../../openaireLibrary/utils/modal/alert";
+import {CuratorService} from "../../../openaireLibrary/connect/curators/curator.service";
+import {UtilitiesService} from "../../../openaireLibrary/services/utilities.service";
+import {UserManagementService} from "../../../openaireLibrary/services/user-management.service";
+import {FormArray, FormBuilder, FormGroup, Validators} from "@angular/forms";
+import {Subscriber} from "rxjs";
+import {EnvProperties} from "../../../openaireLibrary/utils/properties/env-properties";
+import {properties} from "../../../../environments/environment";
+import {User} from "../../../openaireLibrary/login/utils/helper.class";
+import {Affiliation, Curator} from "../../../openaireLibrary/utils/entities/CuratorInfo";
+import {HelpContentService} from "../../../services/help-content.service";
+import {Page} from "../../../domain/page";
+import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
+import {StringUtils} from "../../../openaireLibrary/utils/string-utils.class";
+
+declare var UIkit;
+
+@Component({
+ selector: 'personal-info',
+ template: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{user.firstname + ' ' + user.lastname}}
+
+
+
+
+
+
+
My Affiliations
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Your personal info will be visible in the Curators page of your Community Gateway.
+ Read
privacy policy statement .
+
+
+
+
+
+
+
+
+
+
+
+
+ Your personal data and photo are processed by OpenAIRE in conformity with personal data protection legal
+ framework.
+ 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
rcd-helpdesk@openaire.eu
+ if you have any inquiries.
+
+
+
+
+
+
+
+
+
+
+
+ Your personal information has been successfully saved.
+ This information will be visible in Curators page of Research Community Dashboard, which is disabled .
+ Do you want to enable it now?
+
+
+ `,
+ styleUrls: ['personal-info.component.css']
+})
+export class PersonalInfoComponent implements OnInit, OnDestroy {
+ /** Curator information */
+ public loading = false;
+ public user: User;
+ public curator: Curator;
+ public curatorFb: FormGroup;
+ public properties: EnvProperties = properties;
+ public curatorsPage: Page;
+ public newCurator = false;
+ public communityId: string;
+ /** Photo */
+ public photo: any = null;
+ private photoChanged: boolean = false;
+ public file: File = null;
+ private maxsize: number = 200 * 1024;
+ private deletePhoto = false;
+ private subs: any[] = [];
+ /** Affiliations */
+ public affiliationFb: FormGroup;
+ public index: number = -1;
+ @ViewChild('fileInput') fileInput: ElementRef;
+ @ViewChild('privacyStatement') privacyStatement: AlertModal;
+ @ViewChild('affiliationModal') affiliationModal: AlertModal;
+ @ViewChild('removeAffiliationModal') removeAffiliationModal: AlertModal;
+ @ViewChild('enableCuratorsModal') enableCuratorsModal: AlertModal;
+
+ constructor(private route: ActivatedRoute,
+ private title: Title,
+ private fb: FormBuilder,
+ private curatorService: CuratorService,
+ private utilitiesService: UtilitiesService,
+ private helpContentService: HelpContentService,
+ private communityService: CommunityService,
+ private userManagementService: UserManagementService) {
+ }
+
+
+ ngOnInit() {
+ this.subs.push(this.communityService.getCommunityAsObservable().subscribe(community => {
+ this.communityId = community.communityId;
+ this.subs.push(this.userManagementService.getUserInfo().subscribe(user => {
+ this.user = user;
+ if (this.user) {
+ this.title.setTitle(community.communityId.toUpperCase() + " | Personal Info");
+ this.loading = true;
+ this.subs.push(this.curatorService.getCurator(properties).subscribe(curator => {
+ this.initCurator(curator);
+ this.reset();
+ this.loading = false;
+ }, error => {
+ if (error.status === 404) {
+ this.initCurator(null);
+ this.reset();
+ } else {
+ console.error(error);
+ }
+ this.loading = false;
+ }));
+ }
+ }));
+ }));
+ }
+
+ ngOnDestroy() {
+ this.subs.forEach(subscription => {
+ if (subscription instanceof Subscriber) {
+ subscription.unsubscribe();
+ }
+ })
+ }
+
+ hide(element: any) {
+ UIkit.dropdown(element).hide();
+ }
+
+ initCurator(curator: Curator) {
+ if (curator) {
+ this.curator = curator;
+ this.curator.email = this.user.email;
+ } else {
+ this.newCurator = true;
+ this.curator = new Curator();
+ this.curator._id = this.user.id;
+ this.curator.email = this.user.email;
+ this.curator.name = this.user.fullname;
+ this.curator.affiliations = [];
+ this.curator.bio = '';
+ this.curator.photo = null;
+ }
+ this.curatorsPageStatus();
+ }
+
+ reset() {
+ this.photoChanged = false;
+ this.file = null;
+ if (this.fileInput) {
+ this.fileInput.nativeElement.value = null;
+ }
+ let affiliations: FormArray = this.fb.array([]);
+ this.curator.affiliations.forEach(affiliation => {
+ affiliations.push(this.fb.group({
+ id: this.fb.control(affiliation.id),
+ name: this.fb.control(affiliation.name, Validators.required),
+ logo_url: this.fb.control(affiliation.logo_url, [Validators.required, StringUtils.urlValidator()]),
+ website_url: this.fb.control(affiliation.website_url, [Validators.required, StringUtils.urlValidator()]),
+ }));
+ });
+ this.curatorFb = this.fb.group({
+ _id: this.fb.control(this.curator._id),
+ name: this.fb.control(this.curator.name, Validators.required),
+ bio: this.fb.control(this.curator.bio),
+ email: this.fb.control(this.curator.email),
+ photo: this.fb.control(this.curator.photo),
+ affiliations: affiliations
+ });
+ if (this.curator.photo) {
+ this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
+ } else {
+ this.photo = 'assets/common-assets/curator-default.png';
+ }
+ }
+
+ get affiliations(): FormArray {
+ return this.curatorFb.get('affiliations') as FormArray;
+ }
+
+ saveCurator() {
+ this.curatorService.updateCurator(this.properties, this.curatorFb.value).subscribe((curator) => {
+ if (curator) {
+ UIkit.notification('Your data has been saved successfully ', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ this.newCurator = false;
+ this.deletePhoto = false;
+ this.initCurator(curator);
+ this.reset();
+ if(!this.curatorsEnabled) {
+ this.curatorsEnabledOpen();
+ }
+ this.loading = false;
+ }
+ },
+ error => {
+ this.handleUpdateError('An error has occurred. Try again later!');
+ this.reset();
+ });
+ }
+
+
+ updateCurator() {
+ if (this.curatorFb.valid) {
+ this.loading = true;
+ if (this.file) {
+ this.utilitiesService.uploadPhoto(this.properties.utilsService + '/upload/' + this.curator._id, this.file).subscribe((res) => {
+ if (this.curator.photo) {
+ this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
+ }
+ this.curatorFb.get('photo').setValue(res.filename);
+ this.saveCurator();
+ }, error => {
+ this.handleUpdateError('An error has occurred during photo uploading.');
+ }
+ );
+ } else {
+ if (this.deletePhoto && this.curator.photo) {
+ this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
+ this.curatorFb.get('photo').setValue(null);
+ }
+ this.saveCurator();
+ }
+ }
+ }
+
+ private curatorsPageStatus() {
+ this.helpContentService.getCommunityPagesByRoute(this.communityId, '/curators', this.properties.adminToolsAPIURL).subscribe((page) => {
+ this.curatorsPage = page;
+ });
+ }
+
+ public get curatorsEnabled(): boolean {
+ return !this.curatorsPage || this.curatorsPage.isEnabled;
+ }
+
+ fileChangeEvent(event) {
+ this.loading = true;
+ if (event.target.files && event.target.files[0]) {
+ this.file = event.target.files[0];
+ if (this.file.type !== 'image/png' && this.file.type !== 'image/jpeg') {
+ this.handleUpdateError('You must choose a file with type: image/png or image/jpeg!');
+ this.file = null;
+ } else if (this.file.size > this.maxsize) {
+ this.handleUpdateError('File exceeds size\'s limit! Maximum size 200KB.');
+ this.file = null;
+ } else {
+ const reader = new FileReader();
+ reader.readAsDataURL(this.file);
+ reader.onload = () => {
+ this.photo = reader.result;
+ this.photoChanged = true;
+ this.loading = false;
+ };
+ }
+ } else {
+ this.loading = false;
+ }
+ }
+
+ removePhoto() {
+ this.deletePhoto = true;
+ this.file = null;
+ this.fileInput.nativeElement.value = null;
+ this.photoChanged = !!this.curator.photo;
+ this.photo = 'assets/common-assets/curator-default.png';
+ }
+
+ handleUpdateError(message: string) {
+ UIkit.notification(message, {
+ status: 'danger',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ this.loading = false;
+ }
+
+ privacy() {
+ this.privacyStatement.cancelButton = false;
+ this.privacyStatement.okButtonText = 'Close';
+ this.privacyStatement.alertTitle = 'Privacy policy statement';
+ this.privacyStatement.open();
+ }
+
+ uploadPhoto(fileInput: HTMLInputElement) {
+ if (!this.curator.photo && !this.file) {
+ fileInput.click();
+ }
+ }
+
+ get hasChanged(): boolean {
+ return (this.curatorFb && this.curatorFb.dirty) || this.newCurator || this.photoChanged;
+ }
+
+ editAffiliationOpen(index = -1) {
+ this.index = index;
+ let affiliation: Affiliation = new Affiliation();
+ if(index === -1) {
+ this.affiliationModal.alertTitle = 'Add Affiliation';
+ this.affiliationModal.okButtonText = 'Add';
+ } else {
+ this.affiliationModal.alertTitle = 'Edit Affiliation';
+ this.affiliationModal.okButtonText = 'Update';
+ affiliation = this.affiliations.at(index).value;
+ }
+ this.affiliationFb = this.fb.group({
+ id: this.fb.control(affiliation.id),
+ name: this.fb.control(affiliation.name, Validators.required),
+ logo_url: this.fb.control(affiliation.logo_url, [Validators.required, StringUtils.urlValidator()]),
+ website_url: this.fb.control(affiliation.website_url, [Validators.required, StringUtils.urlValidator()])
+ });
+ this.affiliationModal.okButtonLeft = false;
+ this.affiliationModal.cancelButtonText = 'Cancel';
+ this.affiliationModal.open();
+ }
+
+ deleteAffiliationOpen(index: number) {
+ this.index = index;
+ let affiliation: Affiliation = this.affiliations.at(index).value;
+ this.removeAffiliationModal.alertTitle = 'Delete Affiliation';
+ this.removeAffiliationModal.message = 'Do you want to remove ' +
+ affiliation.name + ' from your Affiliations?';
+ this.removeAffiliationModal.okButtonText = 'Yes';
+ this.removeAffiliationModal.cancelButtonText = 'No';
+ this.removeAffiliationModal.open();
+ }
+
+ editAffiliation() {
+ if(this.index === -1) {
+ this.affiliations.push(this.affiliationFb);
+ } else {
+ this.affiliations.at(this.index).setValue(this.affiliationFb.value);
+ }
+ this.curatorFb.markAsDirty();
+ }
+
+ removeAffiliation() {
+ this.affiliations.removeAt(this.index);
+ this.curatorFb.markAsDirty();
+ }
+
+ private curatorsEnabledOpen() {
+ this.enableCuratorsModal.okButtonLeft = false;
+ this.enableCuratorsModal.alertTitle = 'Enable Curators Page';
+ this.enableCuratorsModal.okButtonText = 'Yes';
+ this.enableCuratorsModal.cancelButtonText = 'No';
+ this.enableCuratorsModal.open();
+ }
+
+ enableCurators() {
+ this.helpContentService.togglePages(this.communityId, [this.curatorsPage._id], true, this.properties.adminToolsAPIURL).subscribe(() => {
+ this.curatorsPage.isEnabled = true;
+ UIkit.notification('Curators Page has been enabled successfully ', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ },error => {
+ this.handleUpdateError('An error has occurred. Try again later!');
+ });
+ }
+}
diff --git a/src/app/pages/users/personal-info/personal-info.module.ts b/src/app/pages/users/personal-info/personal-info.module.ts
new file mode 100644
index 0000000..5910ab5
--- /dev/null
+++ b/src/app/pages/users/personal-info/personal-info.module.ts
@@ -0,0 +1,41 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {FormsModule, ReactiveFormsModule} from '@angular/forms';
+import {RouterModule} from '@angular/router';
+import {PersonalInfoComponent} from './personal-info.component';
+import {AlertModalModule} from "../../../openaireLibrary/utils/modal/alertModal.module";
+import {CuratorService} from "../../../openaireLibrary/connect/curators/curator.service";
+import {UtilitiesService} from "../../../openaireLibrary/services/utilities.service";
+import {PageContentModule} from "../../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
+import {UsersTabsModule} from "../users-tabs.module";
+import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module";
+import {InputModule} from "../../../openaireLibrary/sharedComponents/input/input.module";
+import {IconsModule} from "../../../openaireLibrary/utils/icons/icons.module";
+import {IconsService} from "../../../openaireLibrary/utils/icons/icons.service";
+import {add, edit, photo, remove} from "../../../openaireLibrary/utils/icons/icons";
+import {UrlPrefixModule} from "../../../openaireLibrary/utils/pipes/url-prefix.module";
+import {HelpContentService} from "../../../services/help-content.service";
+
+@NgModule({
+ imports: [
+ CommonModule, FormsModule, RouterModule.forChild([
+ {path: '', component: PersonalInfoComponent}
+ ]),
+ AlertModalModule, PageContentModule, UsersTabsModule, LoadingModule, ReactiveFormsModule, InputModule, IconsModule, UrlPrefixModule
+ ],
+ declarations: [
+ PersonalInfoComponent
+ ],
+ providers: [
+ CuratorService, UtilitiesService, HelpContentService
+ ],
+ exports: [
+ PersonalInfoComponent
+ ]
+})
+
+export class PersonalInfoModule {
+ constructor(private iconsService: IconsService) {
+ this.iconsService.registerIcons([photo, edit, remove, add])
+ }
+}
diff --git a/src/app/pages/users/users-managers/users-managers.component.ts b/src/app/pages/users/users-managers/users-managers.component.ts
new file mode 100644
index 0000000..f7af221
--- /dev/null
+++ b/src/app/pages/users/users-managers/users-managers.component.ts
@@ -0,0 +1,67 @@
+import {Component, OnInit} from "@angular/core";
+import {Title} from "@angular/platform-browser";
+import {ActivatedRoute} from "@angular/router";
+import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
+import {Subscriber} from "rxjs";
+import {Email} from "../../../openaireLibrary/utils/email/email";
+import {Composer} from "../../../openaireLibrary/utils/email/composer";
+import {properties} from "../../../../environments/environment";
+
+@Component({
+ selector: 'users-managers',
+ template: `
+
+
+
+ `
+})
+export class UsersManagersComponent implements OnInit {
+ public communityId: string;
+ public name: string;
+ public type: string;
+ public link: string;
+ public loading: boolean;
+ public message: string;
+ public inviteDisableMessage: string;
+ public emailComposer: Function = (name, recipient, role):Email => {
+ return Composer.composeEmailForCommunityDashboard(name, recipient);
+ }
+ private subscriptions: any[] = [];
+
+ constructor(private communityService: CommunityService,
+ private route: ActivatedRoute,
+ private title: Title) {
+ }
+
+ ngOnInit() {
+ this.loading = true;
+ this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
+ if(community) {
+ this.communityId = community.communityId;
+ this.name = community.shortTitle;
+ this.title.setTitle(this.communityId.toUpperCase() + " | Managers");
+ this.type = 'community';
+ this.link = this.getURL(this.communityId);
+ this.message = 'A manager has the right to access the administration part of Research Community Dashboard, ' +
+ 'where he is able to customize and manage the content, invite other users as managers or to subscribe.';
+ if(community.status === "hidden") {
+ this.inviteDisableMessage = "Community's status is Hidden and invitation to manage the Research community dashboard is disabled. Update the community status to enable invitations.
"
+ }
+ this.loading = false;
+ }
+ }));
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(value => {
+ if (value instanceof Subscriber) {
+ value.unsubscribe();
+ }
+ });
+ }
+
+ private getURL(id: string): string {
+ return 'https://' + (properties.environment !== "production"?'beta.':'') + id + ".openaire.eu?verify=";
+ }
+}
diff --git a/src/app/pages/users/users-managers/users-managers.module.ts b/src/app/pages/users/users-managers/users-managers.module.ts
new file mode 100644
index 0000000..4f6b423
--- /dev/null
+++ b/src/app/pages/users/users-managers/users-managers.module.ts
@@ -0,0 +1,16 @@
+import {NgModule} from "@angular/core";
+import {UsersManagersComponent} from "./users-managers.component";
+import {CommonModule} from "@angular/common";
+import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module";
+import {RouterModule} from "@angular/router";
+import {RoleUsersModule} from "../../../openaireLibrary/dashboard/users/role-users/role-users.module";
+import {UsersTabsModule} from '../users-tabs.module';
+
+@NgModule({
+ imports: [CommonModule, LoadingModule, RoleUsersModule, RouterModule.forChild([
+ {path: '', component: UsersManagersComponent}
+ ]), UsersTabsModule],
+ declarations: [UsersManagersComponent],
+ exports: [UsersManagersComponent]
+})
+export class UsersManagersModule {}
diff --git a/src/app/pages/users/users-routing.module.ts b/src/app/pages/users/users-routing.module.ts
new file mode 100644
index 0000000..5039e4f
--- /dev/null
+++ b/src/app/pages/users/users-routing.module.ts
@@ -0,0 +1,20 @@
+import {NgModule} from '@angular/core';
+import {RouterModule} from '@angular/router';
+
+@NgModule({
+ imports: [
+ RouterModule.forChild([
+ {path: '', redirectTo: 'managers', pathMatch: 'full'},
+ {path: 'managers', loadChildren: './users-managers/users-managers.module#UsersManagersModule'},
+ {path: 'subscribers', loadChildren: './users-subscribers/users-subscribers.module#UsersSubscribersModule'},
+ {
+ path: 'notifications',
+ loadChildren: '../usernotifications/manage-user-notifications.module#ManageUserNotificationsModule'
+ },
+ {path: 'claims', loadChildren: '../claims/claims.module#ClaimsModule'},
+ {path: 'personal', loadChildren: './personal-info/personal-info.module#PersonalInfoModule'}
+ ])
+ ]
+})
+export class UsersRoutingModule {
+}
diff --git a/src/app/pages/users/users-subscribers/users-subscribers.component.ts b/src/app/pages/users/users-subscribers/users-subscribers.component.ts
new file mode 100644
index 0000000..9a96fc0
--- /dev/null
+++ b/src/app/pages/users/users-subscribers/users-subscribers.component.ts
@@ -0,0 +1,51 @@
+import {Component, OnInit} from "@angular/core";
+import {Title} from "@angular/platform-browser";
+import {ActivatedRoute} from "@angular/router";
+import {CommunityService} from "../../../openaireLibrary/connect/community/community.service";
+import {Subscriber} from "rxjs";
+
+@Component({
+ selector: 'users-subscribers',
+ template: `
+
+
+
+ `
+})
+export class UsersSubscribersComponent implements OnInit {
+ public communityId: string;
+ public name: string;
+ public type: string;
+ public loading: boolean;
+ public inviteDisableMessage: string;
+ private subscriptions: any[] = [];
+
+ constructor(private communityService: CommunityService,
+ private route: ActivatedRoute,
+ private title: Title) {
+ }
+
+ ngOnInit() {
+ this.loading = true;
+ this.subscriptions.push(this.communityService.getCommunityAsObservable().subscribe(community => {
+ if(community) {
+ this.communityId = community.communityId;
+ this.name = community.shortTitle;
+ this.title.setTitle(this.communityId.toUpperCase() + " | Subscribers");
+ this.type = 'community';
+ if(community.status !== "all") {
+ this.inviteDisableMessage = "Community's status is " + (community.status === 'manager'?'Visible to managers':'Hidden') + " and invitation to subscribe to the Research community dashboard is disabled. Update the community status to enable invitations.
"
+ }
+ this.loading = false;
+ }
+ }));
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(value => {
+ if (value instanceof Subscriber) {
+ value.unsubscribe();
+ }
+ });
+ }
+}
diff --git a/src/app/pages/users/users-subscribers/users-subscribers.module.ts b/src/app/pages/users/users-subscribers/users-subscribers.module.ts
new file mode 100644
index 0000000..7865cfe
--- /dev/null
+++ b/src/app/pages/users/users-subscribers/users-subscribers.module.ts
@@ -0,0 +1,16 @@
+import {NgModule} from "@angular/core";
+import {UsersSubscribersComponent} from "./users-subscribers.component";
+import {CommonModule} from "@angular/common";
+import {LoadingModule} from "../../../openaireLibrary/utils/loading/loading.module";
+import {RouterModule} from "@angular/router";
+import {SubscribersModule} from "../../../openaireLibrary/dashboard/users/subscribers/subscribers.module";
+import {UsersTabsModule} from '../users-tabs.module';
+
+@NgModule({
+ imports: [CommonModule, LoadingModule, RouterModule.forChild([
+ {path: '', component: UsersSubscribersComponent}
+ ]), SubscribersModule, UsersTabsModule],
+ declarations: [UsersSubscribersComponent],
+ exports: [UsersSubscribersComponent]
+})
+export class UsersSubscribersModule {}
diff --git a/src/app/pages/users/users-tabs.component.ts b/src/app/pages/users/users-tabs.component.ts
new file mode 100644
index 0000000..a2ddf80
--- /dev/null
+++ b/src/app/pages/users/users-tabs.component.ts
@@ -0,0 +1,51 @@
+import {Component, Input, OnInit} from '@angular/core';
+import {Session} from '../../openaireLibrary/login/utils/helper.class';
+import {UserManagementService} from '../../openaireLibrary/services/user-management.service';
+import {Subscriber} from 'rxjs';
+import {ActivatedRoute} from '@angular/router';
+
+@Component({
+ selector: 'users-tabs',
+ template: `
+
+ `
+})
+export class UsersTabsComponent implements OnInit {
+ @Input()
+ public type: string;
+ @Input()
+ public tab: "managers"| "members" | "notifications" | "claims" | "personal" = 'managers';
+ private subscriptions = [];
+ isAManager: boolean = false;
+ canManageNotifications: boolean = false;
+ constructor(private userManagementService: UserManagementService, private route: ActivatedRoute) {
+ }
+
+ ngOnInit() {
+ this.route.params.subscribe(params => {
+ if (params && params['community']) {
+ let communityPid = params['community'];
+ this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
+ this.isAManager = Session.isManager("community", communityPid, user);
+ this.canManageNotifications = Session.isManager("community", communityPid, user)// || Session.isCommunityCurator(user);
+ }));
+ }
+ });
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(value => {
+ if (value instanceof Subscriber) {
+ value.unsubscribe();
+ }
+ });
+ }
+}
diff --git a/src/app/pages/users/users-tabs.module.ts b/src/app/pages/users/users-tabs.module.ts
new file mode 100644
index 0000000..cc556be
--- /dev/null
+++ b/src/app/pages/users/users-tabs.module.ts
@@ -0,0 +1,14 @@
+import {NgModule} from '@angular/core';
+import {CommonModule} from '@angular/common';
+import {UsersTabsComponent} from "./users-tabs.component";
+import {RouterModule} from "@angular/router";
+
+@NgModule({
+ declarations: [UsersTabsComponent],
+ imports: [
+ CommonModule, RouterModule
+ ],
+ exports:[UsersTabsComponent]
+})
+export class UsersTabsModule {
+}
diff --git a/src/app/pages/wellcome/wellcome-routing.module.ts b/src/app/pages/wellcome/wellcome-routing.module.ts
deleted file mode 100644
index a5ddec9..0000000
--- a/src/app/pages/wellcome/wellcome-routing.module.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { NgModule } from '@angular/core';
-import {RouterModule} from '@angular/router';
-import {WellcomeComponent} from './wellcome.component';
-
-@NgModule({
- imports: [
- RouterModule.forChild([
- { path: '', component: WellcomeComponent}
- ])
- ]
-})
-export class WellcomeRoutingModule { }
diff --git a/src/app/pages/wellcome/wellcome.component.ts b/src/app/pages/wellcome/wellcome.component.ts
deleted file mode 100644
index f508cae..0000000
--- a/src/app/pages/wellcome/wellcome.component.ts
+++ /dev/null
@@ -1,137 +0,0 @@
-import {Component, Input, OnInit} from '@angular/core';
-import {Session, User} from '../../openaireLibrary/login/utils/helper.class';
-import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
-import {ActivatedRoute} from '@angular/router';
-import {EnvironmentSpecificService} from '../../openaireLibrary/utils/properties/environment-specific.service';
-import {CommunitiesService} from '../../openaireLibrary/connect/communities/communities.service';
-import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
-import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class';
-import {UserManagementService} from '../../openaireLibrary/services/user-management.service';
-import {Title} from '@angular/platform-browser';
-
-@Component({
- selector: 'wellcome',
- template: `
-
-
-
-
-
-
Build an Open Research Gateway for your Community
-
Turn Open Science into practice
-
Share and link your research results.
- Across organizations, across borders. Customized to your needs.
-
-
-
-
-
0 && !showLoading" class="uk-container uk-container-large uk-section-small">
-
-
-
-
- `
-})
-
-export class WellcomeComponent implements OnInit {
- properties: EnvProperties = null;
- public communities: CommunityInfo[] = [];
- showLoading: boolean;
- private user: User;
-
- constructor(private route: ActivatedRoute, private propertiesService: EnvironmentSpecificService, private _communitiesService: CommunitiesService,
- private title: Title,
- private userManagementService: UserManagementService) {
- }
-
- ngOnInit() {
- this.showLoading = true;
- this.title.setTitle('Administration Dashboard | OpenAIRE-Connect');
- this.propertiesService.loadEnvironment().then(es => {
- this.propertiesService.setEnvProperties(es);
- this.properties = this.propertiesService.envSpecific;
- HelperFunctions.scroll();
- this.userManagementService.getUserInfo().subscribe(user => {
- this.user = user;
- this._communitiesService.getCommunitiesState().subscribe(
- communities => {
- this.communities = [];
- if (!communities || communities.length === 0) {
- return;
- }
- var countCommunities = 0;
- var index_managerOfCommunity = null;
- for (var i = 0; i < communities.length; i++) {
- var com = communities[i];
- if (Session.isPortalAdministrator(this.user) || Session.isCommunityCurator(this.user)) {
- this.communities.push(communities[i]);
- } else {
- for (var manager of com.managers) {
- if (this.user && manager == this.user.email) {
- countCommunities++;
- index_managerOfCommunity = i;
- this.communities.push(communities[i]);
- break;
- }
- }
- }
- }
- this.showLoading = false;
- });
- });
- });
- }
-}
diff --git a/src/app/pages/wellcome/wellcome.module.ts b/src/app/pages/wellcome/wellcome.module.ts
deleted file mode 100644
index a545955..0000000
--- a/src/app/pages/wellcome/wellcome.module.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { NgModule } from '@angular/core';
-import {WellcomeComponent} from './wellcome.component';
-import {WellcomeRoutingModule} from './wellcome-routing.module';
-import {RouterModule} from '@angular/router';
-import {CommunitiesService} from '../../openaireLibrary/connect/communities/communities.service';
-//import { EnvironmentSpecificResolver} from '../../openaireLibrary/utils/properties/environmentSpecificResolver';
-import { EnvironmentSpecificService} from '../../openaireLibrary/utils/properties/environment-specific.service';
-import { CommonModule } from '@angular/common';
-
-@NgModule({
- imports: [
- CommonModule, WellcomeRoutingModule, RouterModule
- ],
- declarations: [WellcomeComponent],
- providers: [EnvironmentSpecificService],
- exports: [WellcomeComponent]
-})
-export class WellcomeModule { }
diff --git a/src/app/pages/zenodo-communities/add-zenodo-communities.component.html b/src/app/pages/zenodo-communities/add-zenodo-communities.component.html
index 1543579..e723504 100644
--- a/src/app/pages/zenodo-communities/add-zenodo-communities.component.html
+++ b/src/app/pages/zenodo-communities/add-zenodo-communities.component.html
@@ -1,85 +1,64 @@
-
-
-
-
-
-
- Newly added Zenodo communities will be linked to your community on the next run of our algorithms.
-
-
-
-
-
- No zenodo communities found
-
-
0" class="uk-align-center uk-margin-remove-bottom">
-
-
- {{zenodoCommunitySearchUtils.totalResults | number}} zenodo communities, page {{zenodoCommunitySearchUtils.page | number}} of {{(totalPages()) | number}}
-
-
-
-
-
-
-
-
-
-
-
0" class="uk-align-center uk-margin-remove-bottom">
-
-
- {{zenodoCommunitySearchUtils.totalResults | number}} zenodo communities, page {{zenodoCommunitySearchUtils.page | number}} of {{(totalPages()) | number}}
-
-
-
-
-
-
+
+
+
+
+
+
No zenodo communities found
+
+
+
0">
+
+
+
+
+
+
+
+
+
+
+
+
Master zenodo community
+
+
+
+
+
+
+
+ Remove community
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts b/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts
index 78c0042..0f00c58 100644
--- a/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts
+++ b/src/app/pages/zenodo-communities/add-zenodo-communities.component.ts
@@ -1,192 +1,256 @@
-import {Component, OnInit, Input} from '@angular/core';
-import {SimpleChanges, OnChanges} from '@angular/core';
-import {FormGroup, FormArray, FormBuilder, Validators} from '@angular/forms';
-import {ActivatedRoute, Router} from '@angular/router';
-
-import {HelpContentService} from '../../services/help-content.service';
-import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
-
-import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
-import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
+import {Component, Input, OnInit, ViewChild} from '@angular/core';
+import {FormBuilder, FormControl} from '@angular/forms';
+import {ActivatedRoute, Router} from '@angular/router';
+import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
+import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
+import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
-import {ZenodoCommunityInfo} from '../../openaireLibrary/connect/zenodoCommunities/zenodoCommunityInfo';
-
import {Session} from '../../openaireLibrary/login/utils/helper.class';
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
-import{ManageZenodoCommunitiesService} from '../../services/manageZenodoCommunities.service';
+import {ManageZenodoCommunitiesService} from '../../services/manageZenodoCommunities.service';
+import {SearchInputComponent} from '../../openaireLibrary/sharedComponents/search-input/search-input.component';
+import {Subject, Subscription} from 'rxjs';
+import {debounceTime, distinctUntilChanged} from 'rxjs/operators';
+
+declare var UIkit;
+
@Component({
- selector: 'add-zenodo-communities',
- templateUrl: './add-zenodo-communities.component.html',
+ selector: 'add-zenodo-communities',
+ templateUrl: './add-zenodo-communities.component.html',
})
-
export class AddZenodoCommunitiesComponent implements OnInit {
-
- public zenodoCommunities = null; // zenodo search API results
- public totalZenodoCommunities = null;
- @Input() properties:EnvProperties = null;
- @Input() communityId = null;
-
- public zenodoCommunitySearchUtils:SearchUtilsClass = new SearchUtilsClass();
-
- errorCodes: ErrorCodes;
- public rowsOnPage = 10;
- @Input() masterCommunity = null;
- @Input() selectedCommunities = [];
- newlySelectedCommunities = [];
- constructor (private route: ActivatedRoute,
- private _router: Router,
- public _fb: FormBuilder,
- private _helpContentService: HelpContentService,
- private _zenodoCommunitieService: ZenodoCommunitiesService,
- private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
-
- this.errorCodes = new ErrorCodes();
- this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
- }
-
- ngOnInit() {
- this.zenodoCommunitySearchUtils.keyword = "";
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
- this.newlySelectedCommunities = [];
- if (this.communityId != null && this.communityId != '') {
- this._zenodoCommunitieService.getZenodoCommunities(this.properties, this.properties.zenodoCommunities+"?page="+this.zenodoCommunitySearchUtils.page+"&size="+this.rowsOnPage).subscribe(
- result => {
- this.zenodoCommunities = result[0];
- this.totalZenodoCommunities = result[1];
- this.zenodoCommunitySearchUtils.totalResults = result[1];
- this.zenodoCommunitySearchUtils.page = 1;
- this.zenodoCommunitySearchUtils.size =this.rowsOnPage;
- if(this.totalZenodoCommunities == 0){
- this.zenodoCommunitySearchUtils.status = this.errorCodes.NONE;
- }else{
- this.zenodoCommunitySearchUtils.status = this.errorCodes.DONE;
- }
-
- },
- error => {
- this.zenodoCommunitySearchUtils.status = this.errorCodes.ERROR;
- }
- );
+
+ public zenodoCommunities = null; // zenodo search API results
+ public totalZenodoCommunities = null;
+ @Input() properties: EnvProperties = null;
+ @Input() communityId = null;
+ @ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
+ public filterForm: FormControl;
+ private subscriptions: any[] = [];
+ public subResults: any;
+ public zenodoCommunitySearchUtils: SearchUtilsClass = new SearchUtilsClass();
+ public searchTermStream = new Subject
();
+ errorCodes: ErrorCodes;
+ public rowsOnPage = 10;
+ @Input() masterCommunity = null;
+ @Input() selectedCommunities = [];
+
+ constructor(private route: ActivatedRoute,
+ private _router: Router,
+ public _fb: FormBuilder,
+ private _zenodoCommunitieService: ZenodoCommunitiesService,
+ private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
+
+ this.errorCodes = new ErrorCodes();
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
+ }
+
+ ngOnInit() {
+ this.filterForm = this._fb.control('');
+ this.subscriptions.push(this.filterForm.valueChanges.subscribe(value => {
+ this.searchTermStream.next(value);
+ }));
+ this.subscriptions.push(this.searchTermStream
+ .pipe(debounceTime(1000), distinctUntilChanged())
+ .subscribe((term: string) => {
+ this.zenodoCommunitySearchUtils.keyword = term;
+ this.goTo(1);
+ }));
+
+ this.zenodoCommunitySearchUtils.keyword = "";
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
}
- }
-
- }
-
- public goTo(page:number = 1) {
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- this.zenodoCommunitySearchUtils.page=page;
- this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
- this._zenodoCommunitieService.getZenodoCommunities(this.properties,
- this.properties.zenodoCommunities+"?page="+this.zenodoCommunitySearchUtils.page
- +"&size="+this.rowsOnPage
- +((this.zenodoCommunitySearchUtils.keyword)?("&q="+this.zenodoCommunitySearchUtils.keyword):"")
- ).subscribe(
- result => {
- this.zenodoCommunities = result[0];
- this.totalZenodoCommunities = result[1];
- this.zenodoCommunitySearchUtils.totalResults = result[1];
- this.zenodoCommunitySearchUtils.size =this.rowsOnPage;
- if(this.totalZenodoCommunities == 0){
- this.zenodoCommunitySearchUtils.status = this.errorCodes.NONE;
- }else{
- this.zenodoCommunitySearchUtils.status = this.errorCodes.DONE;
- }
-
- },
- error => {
- this.zenodoCommunitySearchUtils.status = this.errorCodes.ERROR;
- }
- );
- }
- }
-
- totalPages(): number {
- let totalPages:any = this.zenodoCommunitySearchUtils.totalResults/(this.rowsOnPage);
- if(!(Number.isInteger(totalPages))) {
- totalPages = (parseInt(totalPages, 10) + 1);
- }
- return totalPages;
- }
-
-
- public addCommunity(community) {
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- this._manageZenodoCommunitiesService.addZCommunity(this.properties, this.communityId, community.id ).subscribe(
- data => {
- // this.undo[project.id] = data.id;
- community["openaireId"]=data.id;
- this.selectedCommunities.push(community);
- this.newlySelectedCommunities.push(community)
+ });
+ } else {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
+ if (this.communityId != null && this.communityId != '') {
+ this._zenodoCommunitieService.getZenodoCommunities(this.properties, this.properties.zenodoCommunities + "?page=" + this.zenodoCommunitySearchUtils.page + "&size=" + this.rowsOnPage).subscribe(
+ result => {
+ this.zenodoCommunities = result[0];
+ this.totalZenodoCommunities = result[1];
+ this.zenodoCommunitySearchUtils.totalResults = result[1];
+ this.zenodoCommunitySearchUtils.page = 1;
+ this.zenodoCommunitySearchUtils.size = this.rowsOnPage;
+ if (this.totalZenodoCommunities == 0) {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.NONE;
+ } else {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.DONE;
+ }
+
},
- err => {
- console.log(err.status);
- }/*,
+ error => {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.ERROR;
+ }
+ );
+ }
+ }
+
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(subscription => {
+ if (subscription instanceof Subscription) {
+ subscription.unsubscribe();
+ }
+ });
+ if(this.subResults){
+ this.subResults.unsubscribe();
+ }
+ }
+
+ public goTo(page: number = 1) {
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
+ }
+ });
+ } else {
+ this.zenodoCommunitySearchUtils.page = page;
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.LOADING;
+ if(this.subResults){
+ this.subResults.unsubscribe();
+ }
+ this.subResults = this._zenodoCommunitieService.getZenodoCommunities(this.properties,
+ this.properties.zenodoCommunities + "?page=" + this.zenodoCommunitySearchUtils.page
+ + "&size=" + this.rowsOnPage
+ + ((this.zenodoCommunitySearchUtils.keyword) ? ("&q=" + this.zenodoCommunitySearchUtils.keyword) : "")
+ ).subscribe(
+ result => {
+ this.zenodoCommunities = result[0];
+ this.totalZenodoCommunities = result[1];
+ this.zenodoCommunitySearchUtils.totalResults = result[1];
+ this.zenodoCommunitySearchUtils.size = this.rowsOnPage;
+ if (this.totalZenodoCommunities == 0) {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.NONE;
+ } else {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.DONE;
+ }
+
+ },
+ error => {
+ this.zenodoCommunitySearchUtils.status = this.errorCodes.ERROR;
+ }
+ );
+ }
+ }
+
+ totalPages(): number {
+ let totalPages: any = this.zenodoCommunitySearchUtils.totalResults / (this.rowsOnPage);
+ if (!(Number.isInteger(totalPages))) {
+ totalPages = (parseInt(totalPages, 10) + 1);
+ }
+ return totalPages;
+ }
+
+
+ public addCommunity(community) {
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
+ }
+ });
+ } else {
+ this.subscriptions.push(this._manageZenodoCommunitiesService.addZCommunity(this.properties, this.communityId, community.id).subscribe(
+ data => {
+ community["openaireId"] = data.id;
+ this.selectedCommunities.push(community);
+ UIkit.notification('Community successfully added!', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ },
+ err => {
+ this.handleError('An error has been occurred. Try again later!');
+ console.log(err.status);
+ }/*,
() => {
console.info("completed ADD");
}*/
- )
- }
+ ));
}
-
- public removeCommunity( comm) {
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- var openaireId = this.getOpenaireId(comm);
- this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,openaireId, ).subscribe(
- data => {
- var pos = -1;
- for(var i=0; i< this.selectedCommunities.length;i++) {
- if( this.selectedCommunities[i].id == comm.id) {
- pos= i;
- break;
- }
+ }
+
+ public removeCommunity(comm) {
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
+ }
+ });
+ } else {
+ var openaireId = this.getOpenaireId(comm);
+ this.subscriptions.push(this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId, openaireId,).subscribe(
+ data => {
+ var pos = -1;
+ for (var i = 0; i < this.selectedCommunities.length; i++) {
+ if (this.selectedCommunities[i].id == comm.id) {
+ pos = i;
+ break;
}
- if(pos != -1){
- this.selectedCommunities.splice(pos, 1);
- }
- for(var i=0; i< this.newlySelectedCommunities.length;i++) {
- if( this.newlySelectedCommunities[i].id == comm.id) {
- pos= i;
- break;
- }
- }
- if(pos != -1){
- this.newlySelectedCommunities.splice(pos, 1);
- }
-
- },
- err => {
- console.log(err.status);
- }/*,
+ }
+ if (pos != -1) {
+ this.selectedCommunities.splice(pos, 1);
+ }
+
+ UIkit.notification('Community successfully removed!', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ },
+ err => {
+ this.handleError('An error has been occurred. Try again later!');
+ console.log(err.status);
+ }/*,
() => {
console.info("completed remove");
}*/
- )
+ ));
+ }
+ }
+
+ public inThelist(community: any, list): any {
+ for (let com of list) {
+ if (com.id == community.id) {
+ return true;
}
}
-
- public inThelist(community: any, list): any {
- for(let com of list) {
- if(com.id == community.id) {
- return true;
- }
+ return false;
+ }
+
+ public getOpenaireId(community: any): string {
+ for (let com of this.selectedCommunities) {
+ if (com.id == community.id) {
+ return com.openaireId;
}
- return false;
}
- public getOpenaireId(community: any): string {
- for(let com of this.selectedCommunities) {
- if(com.id == community.id) {
- return com.openaireId;
- }
- }
- return null;
- }
+ return null;
+ }
+
+ public onSearchClose() {
+ this.zenodoCommunitySearchUtils.keyword = this.filterForm.value;
+ }
+
+ public resetInput() {
+ this.zenodoCommunitySearchUtils.keyword = null;
+ this.searchInputComponent.reset()
+ }
+
+ handleError(message: string) {
+ UIkit.notification(message, {
+ status: 'danger',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ }
}
diff --git a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html
index 0f615f8..934a3ca 100644
--- a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html
+++ b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html
@@ -1,101 +1,72 @@
-
-
-
Master Zenodo community
-
-
-
{{masterCommunity.description}}
+
+
-
-
-
-
-
- All the research results belonging to the Zenodo communities specified here will be automatically linked to your community dashboard.
+
+
+
-
-
0" class="uk-align-center uk-margin-remove-bottom">
-
-
- {{searchUtils.totalResults | number}} zenodo communities, page {{searchUtils.page | number}} of {{(totalPages()) | number}}
-
-
-
-
+
+
+
Main Zenodo community
+
-
+
+
No zenodo communities found
+
+
+
0">
+
0" [type]="'Zenodo Communities'"
+ [page]="page" [pageSize]="size" (pageChange)="page = $event.value"
+ [totalResults]="previewCommunities.length">
+
+
-
-
-
-
-
- Name
- Last update on
-
- Action
-
-
-
-
-
-
- {{item.title}}
- [no name available]
-
-
-
-
-
- {{item.date | date:'yyyy/MM/dd'}}
+
= page * size ||
+ i < (page - 1) * size">
+
+
+
+
+
+
+
+ Remove community
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
diff --git a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
index fdd4d9a..a88ad09 100644
--- a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
+++ b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.ts
@@ -1,239 +1,189 @@
-import {Component, OnInit, Input, ViewChild, ViewEncapsulation} from '@angular/core';
-import {SimpleChanges, OnChanges} from '@angular/core';
-import {FormGroup, FormArray, FormBuilder, Validators} from '@angular/forms';
-import {ActivatedRoute, Router} from '@angular/router';
-import { Subject } from 'rxjs';
-
-import { DataTableDirective } from 'angular-datatables';
-
-import {HelpContentService} from '../../services/help-content.service';
-import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
-
-import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
-import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
-import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
-import {ZenodoCommunityInfo} from '../../openaireLibrary/connect/zenodoCommunities/zenodoCommunityInfo';
-
+import {
+ Component,
+ EventEmitter,
+ Input,
+ OnChanges,
+ OnDestroy,
+ OnInit,
+ Output, SimpleChanges,
+ ViewChild,
+ ViewEncapsulation
+} from '@angular/core';
+import {FormBuilder, FormControl} from '@angular/forms';
+import {ActivatedRoute, Router} from '@angular/router';
+import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
+import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
+import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {Session} from '../../openaireLibrary/login/utils/helper.class';
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
-import{ManageZenodoCommunitiesService} from '../../services/manageZenodoCommunities.service';
+import {ManageZenodoCommunitiesService} from '../../services/manageZenodoCommunities.service';
+import {SearchInputComponent} from '../../openaireLibrary/sharedComponents/search-input/search-input.component';
+import {Subscription} from 'rxjs';
+
+declare var UIkit;
@Component({
- selector: 'manage-zenodo-communities',
- templateUrl: './manage-zenodo-communities.component.html',
- styles: [`
- #dpTable_info, #dpTable_paginate, #dpTable_length, #dpTable_filter{
- display: none;
- }
-
- `],
- encapsulation: ViewEncapsulation.None // this used in order styles to work
+ selector: 'manage-zenodo-communities',
+ templateUrl: './manage-zenodo-communities.component.html',
+ encapsulation: ViewEncapsulation.None // this used in order styles to work
})
-export class ManageZenodoCommunitiesComponent implements OnInit {
- @Input() properties:EnvProperties = null;
- @Input() communityId = null;
-
- @Input() searchUtils:SearchUtilsClass = null;
-
- errorCodes: ErrorCodes;
- public rowsOnPage = 10;
- @Input() masterCommunity = null;
- @Input() selectedCommunities = [];
-
- @ViewChild(DataTableDirective) datatableElement: DataTableDirective;
- dtTrigger: Subject
= new Subject(); //necessary
- dtOptions: DataTables.Settings = {};
- private triggered: boolean = false;
-
- @ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
- selectedToDelete = null;
- constructor (private route: ActivatedRoute,
- private _router: Router,
- public _fb: FormBuilder,
- private _helpContentService: HelpContentService,
- private _ΖenodoCommunitieService: ZenodoCommunitiesService,
- private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
-
- this.errorCodes = new ErrorCodes();
-
+export class ManageZenodoCommunitiesComponent implements OnInit, OnDestroy {
+ @Input() properties: EnvProperties = null;
+ @Input() communityId = null;
+
+ @Input() searchUtils: SearchUtilsClass = null;
+
+ errorCodes: ErrorCodes;
+ public rowsOnPage = 10;
+ @Input() masterCommunity = null;
+ @Input() selectedCommunities = [];
+ previewCommunities = [];
+
+ @ViewChild('AlertModalDeleteCommunity') alertModalDeleteCommunity;
+ selectedToDelete = null;
+ @Output() toggleView: EventEmitter = new EventEmitter();
+ page = 1;
+ size = 10;
+ @ViewChild('searchInputComponent') searchInputComponent: SearchInputComponent;
+ public filterForm: FormControl;
+ private subscriptions: any[] = [];
+
+ constructor(private route: ActivatedRoute,
+ private _router: Router,
+ public _fb: FormBuilder,
+ private _manageZenodoCommunitiesService: ManageZenodoCommunitiesService) {
+
+ this.errorCodes = new ErrorCodes();
+
+ }
+
+ ngOnInit() {
+ this.init();
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(subscription => {
+ if (subscription instanceof Subscription) {
+ subscription.unsubscribe();
+ }
+ });
+ }
+
+ private init() {
+ this.filterForm = this._fb.control('');
+ this.filterPreviewCommunities("");
+ this.subscriptions.push(this.filterForm.valueChanges.subscribe(value => {
+ this.page = 1;
+ this.filterPreviewCommunities(value);
+ }));
+ this.searchUtils.keyword = "";
+ this.searchUtils.totalResults = this.selectedCommunities.length;
+ }
+
+ public filterPreviewCommunities(value: string) {
+ this.previewCommunities = this.selectedCommunities.filter(community => {
+ return community.title.toLowerCase().indexOf(value.toLowerCase()) != -1
+ });
+ if (this.previewCommunities.slice((this.page - 1) * this.rowsOnPage, this.page * this.rowsOnPage).length == 0) {
+ this.page = 1;
}
-
- ngOnInit() {
-
-
- this.searchUtils.keyword = "";
- this.dtOptions = {
- // "paging": true,
- // "searching": true,
- // "lengthChange": false,
- "pageLength": this.rowsOnPage,
- "language": {
- "search": "",
- "searchPlaceholder": "Search projects..."
- }
-
- };
- if(!this.triggered) {
- this.triggerInitialLoad();
- } else {
- var table = $('#dpTable').DataTable();
- table.clear();
-
- this.rerender();
+ }
+
+ public confirmedDeleteCommunity(data: any) {
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
}
-
- this.searchUtils.totalResults = this.selectedCommunities.length;
- }
-
- public ngOnDestroy() {
-
- $.fn['dataTable'].ext.search.pop();
- }
- rerender(): void {
- if(this.datatableElement.dtInstance){
- this.datatableElement.dtInstance.then((dtInstance: DataTables.Api) => {
- // Destroy the table first
- dtInstance.destroy();
-
- // Call the dtTrigger to rerender again
- this.dtTrigger.next();
- });
- }
- }
-
- ngAfterViewInit(): void {
- $.fn['dataTable'].ext.search.push((settings, data, dataIndex) => {
-
- if (this.filterData(data, this.searchUtils.keyword )) {
- return true;
+ });
+ } else {
+ this.subscriptions.push(this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId, this.selectedToDelete.openaireId).subscribe(
+ data => {
+ var pos = -1;
+ for (var i = 0; i < this.selectedCommunities.length; i++) {
+ if (this.selectedCommunities[i].id == this.selectedToDelete.id) {
+ pos = i;
+ break;
+ }
}
- return false;
- });
-
- //console.info("ngAfterViewInit");
- this.searchUtils.totalResults = this.selectedCommunities.length;
-
- }
-
- filterData(row: any, query: string) {
- let returnValue: boolean = false;
-
- if(query) {
- for(var i=0; i <3; i++){
- var r= this.filterQuery(row[i], query);
- if(r) {
- returnValue = true;
- break;
- }
- }
-
- if(!returnValue) {
- return false;
- }
- }
-
- return true;
- }
-
- filterQuery(data, query){
- if(data.toLowerCase().indexOf(query.toLowerCase()) > -1){
- return true;
- }else{
- return false;
- }
- }
-
-
- /*
- Trigger a table draw in order to get the initial filtering
- */
- triggerInitialLoad(){
- this.triggered = true;
- //console.info("triggerInitialLoad");
- setTimeout(function(){
- var table = ($('#dpTable')).DataTable();
- table.page( 0 ).draw( false );
- }, 500);
- this.dtTrigger.next();
- }
-
- goTo(page:number = 1){
- this.searchUtils.page=page;
-
- var table = $('#dpTable').DataTable();
- table.page( page - 1 ).draw( false );
-
- var info = table.page.info();
- this.searchUtils.totalResults = info.recordsDisplay;
- }
-
- public confirmedDeleteCommunity(data : any) {
-
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- this._manageZenodoCommunitiesService.removeZCommunity(this.properties, this.communityId,this.selectedToDelete.openaireId ).subscribe(
- data => {
- var pos = -1;
- for(var i=0; i< this.selectedCommunities.length;i++) {
- if( this.selectedCommunities[i].id == this.selectedToDelete.id) {
- pos= i;
- break;
- }
- }
- if(pos != -1){
- this.selectedCommunities.splice(pos, 1);
- this.searchUtils.totalResults = this.selectedCommunities.length;
- }
+ if (pos != -1) {
+ this.selectedCommunities.splice(pos, 1);
this.searchUtils.totalResults = this.selectedCommunities.length;
- var table = $('#dpTable').DataTable();
- table.clear();
- this.rerender();
-
- },
- err => {
- console.log(err.status);
- }/*,
- () => {
- console.info("completed remove");
- }*/
- )
+ }
+ this.searchUtils.totalResults = this.selectedCommunities.length;
+ this.filterPreviewCommunities(this.filterForm.value);
+ UIkit.notification('Community has been successfully removed !', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ },
+ err => {
+ this.handleError('An error has been occurred. Try again later!');
+ console.log(err.status);
+ }
+ ));
+ }
+ }
+
+ public removeCommunity(comm) {
+ if (!Session.isLoggedIn()) {
+ this._router.navigate(['/user-info'], {
+ queryParams: {
+ "errorCode": LoginErrorCodes.NOT_VALID,
+ "redirectUrl": this._router.url
+ }
+ });
+ } else {
+ this.selectedToDelete = comm;
+ this.alertModalDeleteCommunity.cancelButton = true;
+ this.alertModalDeleteCommunity.okButton = true;
+ this.alertModalDeleteCommunity.alertTitle = "Remove zenodo community?";
+ let title = "";
+ if (comm.title) {
+ title = comm.title;
}
- }
-
- public removeCommunity( comm) {
- if(!Session.isLoggedIn()){
- this._router.navigate(['/user-info'], { queryParams: { "errorCode": LoginErrorCodes.NOT_VALID, "redirectUrl": this._router.url} });
- } else {
- this.selectedToDelete = comm;
- this.alertModalDeleteCommunity.cancelButton = true;
- this.alertModalDeleteCommunity.okButton = true;
- this.alertModalDeleteCommunity.alertTitle = "Remove zenodo community?";
- let title = "";
- if(comm.title) {
- title = comm.title;
- }
-
-
- this.alertModalDeleteCommunity.message = "Zenodo community";
- if(title) {
- this.alertModalDeleteCommunity.message += " '"+title+"' ";
- }
- this.alertModalDeleteCommunity.message += "will be removed from your community. Are you sure?";
- this.alertModalDeleteCommunity.okButtonText = "Yes";
- this.alertModalDeleteCommunity.open();
+
+
+ this.alertModalDeleteCommunity.message = "Zenodo community";
+ if (title) {
+ this.alertModalDeleteCommunity.message += " '" + title + "' ";
}
+ this.alertModalDeleteCommunity.message += "will be removed from your community. Are you sure?";
+ this.alertModalDeleteCommunity.okButtonText = "Yes";
+ this.alertModalDeleteCommunity.open();
}
-
-
- totalPages(): number {
- let totalPages:any = this.searchUtils.totalResults/(this.rowsOnPage);
- if(!(Number.isInteger(totalPages))) {
- totalPages = (parseInt(totalPages, 10) + 1);
- }
- return totalPages;
+ }
+
+
+ totalPages(): number {
+ let totalPages: any = this.searchUtils.totalResults / (this.rowsOnPage);
+ if (!(Number.isInteger(totalPages))) {
+ totalPages = (parseInt(totalPages, 10) + 1);
}
-
-
+ return totalPages;
+ }
+
+ addNew() {
+ this.toggleView.emit(null);
+ }
+
+ public onSearchClose() {
+ this.searchUtils.keyword = this.filterForm.value;
+ }
+
+ public resetInput() {
+ this.searchUtils.keyword = null;
+ this.searchInputComponent.reset()
+ }
+
+ handleError(message: string) {
+ UIkit.notification(message, {
+ status: 'danger',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
+ }
}
diff --git a/src/app/pages/zenodo-communities/preview-z-community.component.ts b/src/app/pages/zenodo-communities/preview-z-community.component.ts
new file mode 100644
index 0000000..ce68049
--- /dev/null
+++ b/src/app/pages/zenodo-communities/preview-z-community.component.ts
@@ -0,0 +1,32 @@
+import {Component, Input} from '@angular/core';
+
+@Component({
+ selector: 'preview-zenodo-community',
+ template: `
+
+
+
+
{{item.description|htmlToString}}
+
+
+ `
+})
+
+export class PreviewZenodoCommunityComponent {
+ @Input() item;
+ }
diff --git a/src/app/pages/zenodo-communities/zenodo-communities-routing.module.ts b/src/app/pages/zenodo-communities/zenodo-communities-routing.module.ts
index 3ec54da..b0f3aef 100644
--- a/src/app/pages/zenodo-communities/zenodo-communities-routing.module.ts
+++ b/src/app/pages/zenodo-communities/zenodo-communities-routing.module.ts
@@ -1,13 +1,11 @@
-import { NgModule } from '@angular/core';
+import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {ZenodoCommunitiesComponent} from './zenodo-communities.component';
-import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard';
-import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
@NgModule({
imports: [
RouterModule.forChild([
- { path: '', canActivate: [IsCommunity, ConnectAdminLoginGuard], component: ZenodoCommunitiesComponent}
+ { path: '', component: ZenodoCommunitiesComponent}
])
]
})
diff --git a/src/app/pages/zenodo-communities/zenodo-communities.component.ts b/src/app/pages/zenodo-communities/zenodo-communities.component.ts
index 5543e58..cae9f16 100644
--- a/src/app/pages/zenodo-communities/zenodo-communities.component.ts
+++ b/src/app/pages/zenodo-communities/zenodo-communities.component.ts
@@ -1,208 +1,183 @@
-import {Component, ViewChild, OnInit, Input, ElementRef, OnDestroy} from '@angular/core';
-import { ActivatedRoute, Router } from '@angular/router';
-
-import {ManageZenodoCommunitiesComponent} from './manage-zenodo-communities.component';
-import {AddZenodoCommunitiesComponent} from './add-zenodo-communities.component';
+import {Component, ElementRef, OnDestroy, OnInit, ViewChild} from '@angular/core';
+import {ActivatedRoute, Router} from '@angular/router';
import {Session} from '../../openaireLibrary/login/utils/helper.class';
import {LoginErrorCodes} from '../../openaireLibrary/login/utils/guardHelper.class';
import {EnvProperties} from '../../openaireLibrary/utils/properties/env-properties';
import {ZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communities.service';
-import { SearchZenodoCommunitiesService } from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
+import {SearchZenodoCommunitiesService} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunities.service';
import {CommunityService} from '../../openaireLibrary/connect/community/community.service';
import {CommunityInfo} from '../../openaireLibrary/connect/community/communityInfo';
import {ZenodoCommunityInfo} from '../../openaireLibrary/connect/zenodoCommunities/zenodoCommunityInfo';
import {SearchUtilsClass} from '../../openaireLibrary/searchPages/searchUtils/searchUtils.class';
import {ErrorCodes} from '../../openaireLibrary/utils/properties/errorCodes';
-import {HelperFunctions} from "../../openaireLibrary/utils/HelperFunctions.class";
+import {HelperFunctions} from '../../openaireLibrary/utils/HelperFunctions.class';
import {Title} from '@angular/platform-browser';
+import {properties} from '../../../environments/environment';
+import {Subscription} from 'rxjs';
+import {FullScreenModalComponent} from '../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component';
+import {ManageZenodoCommunitiesComponent} from './manage-zenodo-communities.component';
@Component({
- selector: 'zenodo-communities',
- template: `
-
-
-
-
-
-
-
-
- No zenodo communities found
-
-
-
-
-
-
-
+ selector: 'zenodo-communities',
+ template: `
+
+
+
+
+
+
+
+ `
})
-
export class ZenodoCommunitiesComponent implements OnInit, OnDestroy {
- private communityId: string = null;
+ public communityId: string = null;
private community: CommunityInfo = null;
-
- @Input() communityProjects = [];
- @ViewChild (ManageZenodoCommunitiesComponent) manageZenodoCommunitiesComponent: ManageZenodoCommunitiesComponent ;
- @ViewChild (AddZenodoCommunitiesComponent) addZenodoCommunitiesComponent: AddZenodoCommunitiesComponent ;
-
- public warningMessage = '';
- public infoMessage = '';
-
- public toggle = true;
+ public toggle = false;
public updateCommunityProjectsOnToggle = false;
public pageTitle = 'Manage zenodo communities';
- public toggleLinkMessage = 'Manage zenodo communities';
-
masterZenodoCommunityId = null;
masterZenodoCommunity = null;
public properties: EnvProperties = null;
-
selectedCommunityIds = null;
- // ["ecfunded", "zenodo", "lory_hslu", "cs19", "",
- // "hbp","dighl", "wind_energy", "lory", "fp7-bmc","fp7postgrantoapilotoutputs","cernopenlab"];
selectedCommunities = [];
-
zenodocommunitiesloadedCount = 0;
zenodoSearchUtils: SearchUtilsClass = new SearchUtilsClass();
- private errorCodes: ErrorCodes = new ErrorCodes();
-
+ public errorCodes: ErrorCodes = new ErrorCodes();
+ subscriptions = [];
+ @ViewChild('fsModal') fullscreen: FullScreenModalComponent;
+ @ViewChild('manage') manage: ManageZenodoCommunitiesComponent;
+
constructor(private element: ElementRef, private route: ActivatedRoute, private _router: Router,
- private _ΖenodoCommunitieService: ZenodoCommunitiesService, private title: Title,
+ private _zenodoCommunitieService: ZenodoCommunitiesService, private title: Title,
private _communityService: CommunityService,
- private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {}
-
- ngOnInit() {
- this.zenodoSearchUtils.status = this.errorCodes.LOADING;
- this.route.data.subscribe((data: { envSpecific: EnvProperties }) => {
- this.properties = data.envSpecific;
- this.route.queryParams.subscribe(params => {
- HelperFunctions.scroll();
-
- if (params['communityId']) {
- this.communityId = params['communityId'];
- this.title.setTitle('Administration Dashboard | Zenodo Communities');
- if (!Session.isLoggedIn()) {
- this._router.navigate(['/user-info'], {
- queryParams: { 'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url} });
- } else {
- if (this.communityId != null && this.communityId !== '') {
-
- this._communityService.getCommunity(this.properties,
- this.properties.communityAPI + this.communityId).subscribe (
- community => {
- this.community = community;
- this.masterZenodoCommunityId = this.community.zenodoCommunity;
- if (this.masterZenodoCommunityId) {
- this._ΖenodoCommunitieService.getZenodoCommunityById(this.properties,
- this.properties.zenodoCommunities + this.masterZenodoCommunityId,
- null).subscribe(
- result => {
- this.masterZenodoCommunity = result;
-
- },
- error => {
- const emptyCommunity: ZenodoCommunityInfo = new ZenodoCommunityInfo();
- emptyCommunity.id = this.masterZenodoCommunityId;
- emptyCommunity.title = this.masterZenodoCommunityId;
- this.masterZenodoCommunity = emptyCommunity;
- // console.log("Master Zenodo community'"+this.masterZenodoCommunityId+"' couldn't be loaded");
- }
- );
- }
- this.zenodoSearchUtils.status = this.errorCodes.LOADING;
- this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.communityId).subscribe (
- result => {
- this.selectedCommunityIds = result;
- this.zenodoSearchUtils.totalResults = this.selectedCommunityIds.length;
- if (this.selectedCommunityIds.length === 0) {
- this.zenodoSearchUtils.status = this.errorCodes.NONE;
- }
- for (let i = 0; i < this.selectedCommunityIds.length; i++) {
- this.getZenodoCommunityById(
- this.selectedCommunityIds[i]['zenodoid'],
- this.selectedCommunityIds[i]['id']);
- }
-
- },
- error => {
- console.log('list of zenodo communities couldn\'t be loaded');
- this.zenodoSearchUtils.status = this.errorCodes.ERROR;
- } // this.handleError('System error retrieving community profile', error)
- );
-
- },
- error => {
- console.log('Community couldn\'t be loaded');
- this.zenodoSearchUtils.status = this.errorCodes.ERROR;
- }
- );
-
-
- }
+ private _searchZenodoCommunitiesService: SearchZenodoCommunitiesService) {
+ }
+
+ ngOnInit() {
+ this.zenodoSearchUtils.status = this.errorCodes.LOADING;
+ this.properties = properties;
+ this.route.params.subscribe(params => {
+ this.communityId = params['community'];
+ if (this.communityId) {
+ this.title.setTitle(this.communityId.toUpperCase() + ' | Zenodo Communities');
+ if (this.communityId != null && this.communityId !== '') {
+ this.subscriptions.push(this._communityService.getCommunityAsObservable().subscribe(
+ community => {
+ this.community = community;
+ this.masterZenodoCommunityId = this.community.zenodoCommunity;
+ if (this.masterZenodoCommunityId) {
+ this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
+ this.properties.zenodoCommunities + this.masterZenodoCommunityId,
+ null).subscribe(
+ result => {
+ this.masterZenodoCommunity = result;
+ },
+ error => {
+ const emptyCommunity: ZenodoCommunityInfo = new ZenodoCommunityInfo();
+ emptyCommunity.id = this.masterZenodoCommunityId;
+ emptyCommunity.title = this.masterZenodoCommunityId;
+ this.masterZenodoCommunity = emptyCommunity;
+ // console.log("Master Zenodo community'"+this.masterZenodoCommunityId+"' couldn't be loaded");
+ }
+ ));
}
-
-
- }
- });
- });
-}
-
-
-
- public ngOnDestroy() {}
-
+ this.zenodoSearchUtils.status = this.errorCodes.LOADING;
+ this._searchZenodoCommunitiesService.searchZCommunities(this.properties, this.communityId).subscribe(
+ result => {
+ this.selectedCommunityIds = result;
+ this.zenodoSearchUtils.totalResults = this.selectedCommunityIds.length;
+ if (this.selectedCommunityIds.length === 0) {
+ this.zenodoSearchUtils.status = this.errorCodes.NONE;
+ }
+ for (let i = 0; i < this.selectedCommunityIds.length; i++) {
+ this.getZenodoCommunityById(
+ this.selectedCommunityIds[i]['zenodoid'],
+ this.selectedCommunityIds[i]['id']);
+ }
+
+ },
+ error => {
+ console.log('list of zenodo communities couldn\'t be loaded');
+ this.zenodoSearchUtils.status = this.errorCodes.DONE;
+ } // this.handleError('System error retrieving community profile', error)
+ );
+ }));
+ }
+ }
+ });
+ this.fullscreen.title = "Search and Add Zenodo Communities";
+ this.fullscreen.okButtonText = "Done";
+ this.fullscreen.okButton = true;
+
+
+ }
+
+ ngOnDestroy() {
+ this.subscriptions.forEach(subscription => {
+ if (subscription instanceof Subscription) {
+ subscription.unsubscribe();
+ }
+ });
+ }
+
public toggleAction() {
if (!Session.isLoggedIn()) {
this._router.navigate(['/user-info'], {
- queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url} });
+ queryParams: {'errorCode': LoginErrorCodes.NOT_VALID, 'redirectUrl': this._router.url}
+ });
} else {
HelperFunctions.scroll();
-
+
this.toggle = !this.toggle;
if (this.toggle) {
+ this.fullscreen.open();
this.pageTitle = 'Manage zenodo communities';
-
} else {
+ this.manage.filterPreviewCommunities(this.manage.filterForm.value);
this.updateCommunityProjectsOnToggle = false;
this.pageTitle = 'Search zenodo communities';
}
}
}
-
+
getZenodoCommunityById(zenodoid, openaireId) {
- this._ΖenodoCommunitieService.getZenodoCommunityById(this.properties,
- this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
- result => {
- this.selectedCommunities.push(result);
- this.zenodocommunitiesloadedCount++;
- if (this.zenodocommunitiesloadedCount >= this.selectedCommunityIds.length) {
- this.zenodoSearchUtils.status = this.errorCodes.DONE;
- }
-
-
- },
- error => {
- const emptyCommunity: ZenodoCommunityInfo = new ZenodoCommunityInfo();
- emptyCommunity.id = zenodoid;
- emptyCommunity.openaireId = openaireId;
- emptyCommunity.title = zenodoid;
- this.selectedCommunities.push(emptyCommunity);
- this.zenodocommunitiesloadedCount++;
- if (this.zenodocommunitiesloadedCount >= this.selectedCommunityIds.length) {
- this.zenodoSearchUtils.status = this.errorCodes.DONE;
+ this.subscriptions.push(this._zenodoCommunitieService.getZenodoCommunityById(this.properties,
+ this.properties.zenodoCommunities + zenodoid, openaireId).subscribe(
+ result => {
+ this.selectedCommunities.push(result);
+ this.zenodocommunitiesloadedCount++;
+ if (this.zenodocommunitiesloadedCount >= this.selectedCommunityIds.length) {
+ this.zenodoSearchUtils.status = this.errorCodes.DONE;
+ }
+
+
+ },
+ error => {
+ const emptyCommunity: ZenodoCommunityInfo = new ZenodoCommunityInfo();
+ emptyCommunity.id = zenodoid;
+ emptyCommunity.openaireId = openaireId;
+ emptyCommunity.title = zenodoid;
+ this.selectedCommunities.push(emptyCommunity);
+ this.zenodocommunitiesloadedCount++;
+ if (this.zenodocommunitiesloadedCount >= this.selectedCommunityIds.length) {
+ this.zenodoSearchUtils.status = this.errorCodes.DONE;
+ }
+ console.log('Zenodo community\'' + zenodoid + '\' couldn\'t be loaded');
}
- console.log('Zenodo community\'' + zenodoid + '\' couldn\'t be loaded');
- }
- );
+ ));
}
}
diff --git a/src/app/pages/zenodo-communities/zenodo-communities.module.ts b/src/app/pages/zenodo-communities/zenodo-communities.module.ts
index d5d26b2..ce96c76 100644
--- a/src/app/pages/zenodo-communities/zenodo-communities.module.ts
+++ b/src/app/pages/zenodo-communities/zenodo-communities.module.ts
@@ -2,35 +2,44 @@ import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
-import {PagingModule} from '../../openaireLibrary/utils/paging.module';
import {ManageZenodoCommunitiesComponent} from './manage-zenodo-communities.component';
import {AddZenodoCommunitiesComponent} from './add-zenodo-communities.component';
import {ZenodoCommunitiesComponent} from './zenodo-communities.component';
-import {FABModule} from '../../utils/fabModule.module';
-import { DataTablesModule } from 'angular-datatables';
-import {SearchZenodoCommunitiesServiceModule } from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
+import {SearchZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/searchZenodoCommunitiesService.module';
import {ManageZenodoCommunitiesService} from '../../services/manageZenodoCommunities.service';
import {ZenodoCommunitiesServiceModule} from '../../openaireLibrary/connect/zenodoCommunities/zenodo-communitiesService.module';
import {AlertModalModule} from '../../openaireLibrary/utils/modal/alertModal.module';
import {ZenodoCommunitiesRoutingModule} from './zenodo-communities-routing.module';
-import {IsCommunity} from '../../openaireLibrary/connect/communityGuard/isCommunity.guard';
-import {ConnectAdminLoginGuard} from '../../openaireLibrary/connect/communityGuard/connectAdminLoginGuard.guard';
+import {CommunityInfoModule} from '../community-info/community-info.module';
+import {SearchInputModule} from '../../openaireLibrary/sharedComponents/search-input/search-input.module';
+import {IconsModule} from '../../openaireLibrary/utils/icons/icons.module';
+import {IconsService} from '../../openaireLibrary/utils/icons/icons.service';
+import {add, arrow_left, remove_circle_outline} from '../../openaireLibrary/utils/icons/icons';
+import {NoLoadPaging} from '../../openaireLibrary/searchPages/searchUtils/no-load-paging.module';
+import {LoadingModule} from '../../openaireLibrary/utils/loading/loading.module';
+import {PreviewZenodoCommunityComponent} from './preview-z-community.component';
+import {PageContentModule} from '../../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module';
+import {FullScreenModalModule} from '../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.module';
+import {HTMLToStringPipeModule} from '../../openaireLibrary/utils/pipes/HTMLToStringPipe.module';
@NgModule({
imports: [
- CommonModule, FormsModule, RouterModule,
- PagingModule, FABModule, DataTablesModule, SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule,
- AlertModalModule, ZenodoCommunitiesRoutingModule
+ CommonModule, FormsModule, RouterModule, SearchZenodoCommunitiesServiceModule, ZenodoCommunitiesServiceModule,
+ AlertModalModule, ZenodoCommunitiesRoutingModule, CommunityInfoModule, PageContentModule, SearchInputModule, IconsModule, NoLoadPaging, LoadingModule, FullScreenModalModule, HTMLToStringPipeModule
],
declarations: [
- ManageZenodoCommunitiesComponent, ZenodoCommunitiesComponent, AddZenodoCommunitiesComponent
+ ManageZenodoCommunitiesComponent, ZenodoCommunitiesComponent, AddZenodoCommunitiesComponent, PreviewZenodoCommunityComponent
],
providers: [
- ManageZenodoCommunitiesService, IsCommunity, ConnectAdminLoginGuard
+ ManageZenodoCommunitiesService
],
exports: [
ZenodoCommunitiesComponent
]
})
-export class ZenodoCommunitiesModule { }
+export class ZenodoCommunitiesModule {
+ constructor(private iconsService: IconsService) {
+ this.iconsService.registerIcons([add, arrow_left, remove_circle_outline ])
+ }
+}
diff --git a/src/app/services/help-content.service.ts b/src/app/services/help-content.service.ts
index d5cc46c..e413e6d 100644
--- a/src/app/services/help-content.service.ts
+++ b/src/app/services/help-content.service.ts
@@ -281,12 +281,17 @@ export class HelpContentService {
// //.map(res =>
> res.json())
// .pipe(catchError(this.handleError));
// }
-
+
+ getCommunityPagesByRoute(pid: string, route: string, helpContentUrl:string) {
+ return this.http.get>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'
+ + (route ? '?page_route='+route : ''))
+ .pipe(map(pages => (pages.length>0?pages[0]:null)), catchError(this.handleError));
+ }
+
// Replacing getCommunityPages
getCommunityPagesByType(pid: string, type: string, helpContentUrl:string) {
return this.http.get>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'
+ (type ? '?page_type='+type : ''))
- //.map(res => > res.json())
.pipe(catchError(this.handleError));
}
// End of replacing getCommunityPages
diff --git a/src/app/utils/fab.component.ts b/src/app/utils/fab.component.ts
deleted file mode 100644
index d7020c6..0000000
--- a/src/app/utils/fab.component.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Component, EventEmitter, Output } from '@angular/core';
-
-@Component({
- selector: 'fab',
- template: `
-
- `
-})
-
-export class FABComponent {
- @Output() public clicked:EventEmitter = new EventEmitter();
-
- constructor () {}
-
- public ngOnInit() {}
-
- public onClick() {
- this.clicked.emit(true);
- }
-
-}
diff --git a/src/app/utils/fabModule.module.ts b/src/app/utils/fabModule.module.ts
deleted file mode 100644
index 5d2b8f6..0000000
--- a/src/app/utils/fabModule.module.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { NgModule } from '@angular/core';
-import { CommonModule} from '@angular/common';
-import { FormsModule } from '@angular/forms';
-import {FABComponent} from './fab.component';
-
-@NgModule({
- imports: [
- CommonModule,
- FormsModule
- ],
- declarations: [
- FABComponent
- ],
- exports: [
- FABComponent
- ]
-})
-
-export class FABModule { }
diff --git a/src/assets/css/connect-custom.css b/src/assets/css/connect-custom.css
index 3395519..5a33499 100644
--- a/src/assets/css/connect-custom.css
+++ b/src/assets/css/connect-custom.css
@@ -1,40 +1,29 @@
:root {
-
---portal-main-color: #222080;
-/* --portal-main-contrast: #2E2E2E; */
---portal-main-contrast: white;
---portal-dark-color: #4687E6;
-
---openaire-main-color: #313179;
-
---explore-portal-color: #D95F2D;
---provide-portal-color: #37C7E9;
---monitor-portal-color: #9ABB55;
---connect-portal-color: #EBB13E;
---develop-portal-color: #DA65AB;
-
---explore-portal-lower-tone: #a0462c;
---provide-portal-lower-tone: #3A8FA3;
---monitor-portal-lower-tone: #7c9144;
---connect-portal-lower-tone: #b48536;
---develop-portal-lower-tone: #9f4e7e;
+ --portal-main-color: #FECA1D;
+ --portal-main-contrast: #FFFFFF;
+ --portal-dark-color: #b48536;
+ --primary-color: var(--theme-secondary-color);
+ --secondary-color: var(--theme-secondary-color);
}
+
.tm-toolbar .uk-subnav-line .custom-connect-li, .tm-toolbar .uk-subnav-line .custom-connect-admin-li {
- display: block;
- background:#DEAF50 !important; color:#fff !important;
+ display: block;
+ background: #DEAF50 !important;
+ color: #fff !important;
}
-.custom-connect-toolbar ul.uk-subnav.uk-subnav-line, .custom-connect-admin-toolbar ul.uk-subnav.uk-subnav-line{
+
+.custom-connect-toolbar ul.uk-subnav.uk-subnav-line, .custom-connect-admin-toolbar ul.uk-subnav.uk-subnav-line {
background-color: #FFC700 !important;
- }
+}
- .custom-connect-toolbar .inner, .custom-connect-admin-toolbar .inner {
- background-color: #FFC700 !important;
- }
+.custom-connect-toolbar .inner, .custom-connect-admin-toolbar .inner {
+ background-color: #FFC700 !important;
+}
-.custom-connect-toolbar,.custom-connect-admin-toolbar{
- border-top-color:#FFC700 !important;
- }
+.custom-connect-toolbar, .custom-connect-admin-toolbar {
+ border-top-color: #FFC700 !important;
+}
.red_color {
color: #FF3030;
@@ -56,94 +45,77 @@
color: #767779 !important;
}
-.wellcomePage{
+.wellcomePage {
background: transparent linear-gradient(0deg, #FAFAFA 0%, #E2EEFA 100%) 0 0 no-repeat padding-box;
min-height: calc(100vh - 412.767px);
}
-.sidebar{
- background-color: #9C9C9C;
-}
-.uk-button-default:hover,.uk-button-default:focus,.btn:hover,.btn:focus {
- background-color:#fff !important;
- color:#5b5b5b !important;
- box-shadow:0 6px 50px rgba(0,0,0,0.05)
-}
-
-
-.connect-admin-menu{
- background-color: var(--portal-main-color) !important;
-}
-
-.connect-admin-menu.uk-navbar-transparent .uk-navbar-nav > li > a{
- color: white !important;
-}
-
-.connect-admin-menu .uk-logo{
- background-color: white !important;
- margin: 5px;
-}
-
-.sidebar .uk-nav>li>a{
- font-weight: 400;
- color: rgb(255,255,255);
-}
-
-.uk-button:disabled, .uk-button:disabled:hover {
- background-color: #f7f7fa;
- color: #cbcbcb;
- background-image: none;
- box-shadow: none;
- cursor: not-allowed;
-}
- .uk-pagination > .uk-active > span {
- background-color: var(--portal-main-color) !important;
- color: var(--portal-main-contrast) !important;
- border-color:var(--portal-main-color) !important;
- border-bottom-color: var(--portal-main-color) !important;
- }
-
-.communitiesImageBox{
- width:107px; height:57px;
-}
-
-.communityCard {
- box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
-}
-
-.font-41 {
- font-size: 41px;
-}
-
-.iframeContainer{
- overflow:hidden;
+.iframeContainer {
+ overflow: hidden;
}
-.iframeContainer iframe{
+.iframeContainer iframe {
- width:100%;
- height:100%;
- border:0;
+ width: 100%;
+ height: 100%;
+ border: 0;
}
/*Customization*/
-.customizationMenuPanel{
- background-color: #999999;
+.customizationMenuPanel {
+ /*background-color: #999999;*/
}
-.customizationMenuPanel .customizationMenuItems{
- background-color: white;
- border: white solid 1px;
- border-radius: 14px;
+.customizationMenuPanel .customizationMenuItems {
+ background-color: white;
+ border: white solid 1px;
+ border-radius: 14px;
+}
+/*#colorPickerInput {
+ width: 15px;
+ height: 15px;
+ border: 1px solid #707070;
+ border-radius: 50%;
+ opacity: 1;
+ cursor:pointer;
+
+}*/
+
+.colorPicker input {
+ width: 35px;
+ height: 15px;
+ border: 1px solid #707070;
+ border-radius: 2px;
+ opacity: 1;
+ cursor:pointer;
}
-
-.colorPicker input{
- width:35px;
- height: 15px;
- border: 1px solid #707070;
- border-radius: 2px;
- opacity: 1;
+/* NEW CSS*/
+.login circle {
+ fill: var(--primary-color);
+}
+
+.login:hover circle {
+ fill: var(--secondary-color);
+}
+
+#sidebar_main .sidebar_main_header .portal-logo {
+ background: url("/assets/common-assets/logo-large-connect.png") no-repeat;
+ background-size: contain;
+}
+
+.sidebar_mini #sidebar_main .sidebar_main_header .portal-logo {
+ background: url("/assets/common-assets/logo-small-connect.png") no-repeat;
+ background-size: contain;
+}
+
+#sidebar_main #sidebar_content {
+ border-right: 1px solid var(--portal-main-color);
+}
+
+#sidebar_switcher_toggle {
+ border: 1px solid var(--portal-main-color);
+ border-left: 0;
}
diff --git a/src/assets/env-properties.json b/src/assets/env-properties.json
deleted file mode 100644
index 6b2f905..0000000
--- a/src/assets/env-properties.json
+++ /dev/null
@@ -1,103 +0,0 @@
-{
- "environment":"development",
- "adminToolsPortalType": "community",
- "enablePiwikTrack" : false,
- "useCache" : false,
- "metricsAPIURL" : "https://beta.services.openaire.eu/usagestats/",
- "framesAPIURL" : "https://beta.openaire.eu/stats3/",
- "claimsAPIURL" : "http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/",
- "statisticsAPIURL" : "https://beta.services.openaire.eu/stats-api/",
- "statisticsFrameAPIURL":"https://beta.openaire.eu/stats/",
- "statisticsFrameNewAPIURL": "https://stats.madgik.di.uoa.gr/stats-api/",
- "useNewStatistisTool":true,
- "searchAPIURLLAst" : "https://beta.services.openaire.eu/search/v2/api/",
- "searchResourcesAPIURL" : "https://beta.services.openaire.eu/search/v2/api/resources",
- "openCitationsAPIURL" : "https://services.openaire.eu/opencitations/getCitations?id=",
- "csvAPIURL" : "http://rudie.di.uoa.gr:8080/dnet-functionality-services-2.0.0-SNAPSHOT/rest/v2/reports",
- "searchCrossrefAPIURL" : "https://api.crossref.org/works",
- "searchDataciteAPIURL" : "https://api.datacite.org/works",
- "searchOrcidURL" : "https://pub.orcid.org/",
- "orcidURL" : "https://orcid.org/",
- "doiURL" : "https://dx.doi.org/",
- "cordisURL" : "http://cordis.europa.eu/projects/",
- "openDoarURL": "http://v2.sherpa.ac.uk/id/repository/",
- "r3DataURL": "http://service.re3data.org/repository/",
- "sherpaURL": "http://www.sherpa.ac.uk/romeo/search.php?issn=",
- "zenodo" : "https://zenodo.org/",
- "zenodoCommunities" : "https://zenodo.org/api/communities/",
- "openAccess" : "https://www.openaire.eu/support/faq#article-id-234",
- "openAccessRepo" : "https://www.openaire.eu/support/faq#article-id-310",
- "fp7Guidlines" : "https://www.openaire.eu/open-access-in-fp7-seventh-research-framework-programme",
- "h2020Guidlines" : "https://www.openaire.eu/oa-publications/h2020/open-access-in-horizon-2020",
- "ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
- "helpdesk" : "https://www.openaire.eu/support/helpdesk",
- "helpdeskEmail": "helpdesk@openaire.eu",
- "utilsService" : "http://mpagasas.di.uoa.gr:8000",
-
- "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",
-
- "piwikBaseUrl" :" https://analytics.openaire.eu/piwik.php?idsite=6",
- "loginUrl" :"http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login",
-
- "userInfoUrl" : "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
- "logoutUrl" :"https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
-
- "cookieDomain" :".di.uoa.gr",
-
- "feedbackmail" :"openaire.test@gmail.com",
- "feedbackmailForMissingEntities" :"feedback@openaire.eu",
- "cacheUrl" :"http://scoobydoo.di.uoa.gr:3000/get?url=",
-
- "adminToolsAPIURL" :"http://dl170.madgik.di.uoa.gr:8080/uoa-admin-tools/",
-
- "adminToolsCommunity" :"openaire",
- "communityAPI": "https://dev-openaire.d4science.org/openaire/community/",
-
- "miningBackendURL": "https://beta.services.openaire.eu/interactive-mining",
-
- "csvLimit": 2000,
- "pagingLimit": 20,
- "resultsPerPage": 10,
-
- "baseLink" : "https://demo.openaire.eu",
- "baseOpenaireLink" : "https://beta.explore.openaire.eu",
-
- "searchLinkToPublication" : "/search/publication?articleId=",
- "searchLinkToProject" : "/search/project?projectId=",
- "searchLinkToDataProvider" : "/search/dataprovider?datasourceId=",
- "searchLinkToDataset" : "/search/dataset?datasetId=",
- "searchLinkToOrganization" : "/search/organization?organizationId=",
-
- "searchLinkToPublications" : "/search/find/publications",
- "searchLinkToDataProviders" : "/search/find/dataproviders",
- "searchLinkToProjects" : "/search/find/projects",
- "searchLinkToDatasets" : "/search/find/datasets",
- "searchLinkToSoftware" : "/search/find/software",
- "searchLinkToOrganizations" : "/search/find/organizations",
- "searchLinkToCompatibleDataProviders" : "/search/content-providers",
- "searchLinkToEntityRegistriesDataProviders" : "/search/entity-registries",
- "searchLinkToEntityRegistriesDataProvidersTable" : "/search/entity-registries-table",
- "searchLinkToJournals" : "/search/journals",
- "searchLinkToJournalsTable" : "/search/journals-table",
-
- "searchLinkToAdvancedPublications" : "/search/advanced/publications",
- "searchLinkToAdvancedProjects" : "/search/advanced/projects",
- "searchLinkToAdvancedDatasets" : "/search/advanced/datasets",
- "searchLinkToAdvancedSoftware" : "/search/advanced/software",
- "searchLinkToAdvancedDataProviders" : "/search/advanced/dataproviders",
- "searchLinkToAdvancedOrganizations" : "/search/advanced/organizations",
-
- "sendMailUrl": "http://duffy.di.uoa.gr:8080/uoa-admin-tools/sendMail",
- "notifyForNewManagers": "http://duffy.di.uoa.gr:8080/uoa-admin-tools/notifyForNewManagers/",
- "notifyForNewSubscribers": "http://duffy.di.uoa.gr:8080/uoa-admin-tools/notifyForNewSubscribers/",
-
- "lastIndexInformationLink" : "https://www.openaire.eu/aggregation-and-content-provision-workflows",
- "showLastIndexInformationLink" : false,
-
- "widgetLink" : "https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
- "claimsInformationLink": "https://www.openaire.eu/linking-beta",
- "lastIndexUpdate": "2019-05-16",
- "indexInfoAPI": "http://beta.services.openaire.eu/openaire/info/",
- "admins" : ["kostis30fylloy@gmail.com"],
- "adminPortalURL": "https://beta.admin.connect.openaire.eu"
-}
diff --git a/src/assets/external-link.svg b/src/assets/external-link.svg
deleted file mode 100644
index c291d7e..0000000
--- a/src/assets/external-link.svg
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/assets/imgs/add-icon.png b/src/assets/imgs/add-icon.png
deleted file mode 100644
index bd93323..0000000
Binary files a/src/assets/imgs/add-icon.png and /dev/null differ
diff --git a/src/assets/imgs/check-icon.png b/src/assets/imgs/check-icon.png
deleted file mode 100644
index 40622e8..0000000
Binary files a/src/assets/imgs/check-icon.png and /dev/null differ
diff --git a/src/assets/imgs/delete-icon.png b/src/assets/imgs/delete-icon.png
deleted file mode 100644
index b64cc5f..0000000
Binary files a/src/assets/imgs/delete-icon.png and /dev/null differ
diff --git a/src/assets/imgs/icn_edit.png b/src/assets/imgs/icn_edit.png
deleted file mode 100644
index be8c68f..0000000
Binary files a/src/assets/imgs/icn_edit.png and /dev/null differ
diff --git a/src/assets/imgs/icn_search.png b/src/assets/imgs/icn_search.png
deleted file mode 100644
index f362e30..0000000
Binary files a/src/assets/imgs/icn_search.png and /dev/null differ
diff --git a/src/assets/imgs/icn_trash.png b/src/assets/imgs/icn_trash.png
deleted file mode 100644
index 675820f..0000000
Binary files a/src/assets/imgs/icn_trash.png and /dev/null differ
diff --git a/src/assets/imgs/logo-large-connect-admin.png b/src/assets/imgs/logo-large-connect-admin.png
deleted file mode 100644
index e3d95b8..0000000
Binary files a/src/assets/imgs/logo-large-connect-admin.png and /dev/null differ
diff --git a/src/assets/imgs/logo-small-connect-admin.png b/src/assets/imgs/logo-small-connect-admin.png
deleted file mode 100644
index 08fd7cd..0000000
Binary files a/src/assets/imgs/logo-small-connect-admin.png and /dev/null differ
diff --git a/src/assets/imgs/wellcome.png b/src/assets/imgs/wellcome.png
deleted file mode 100644
index 8ed6785..0000000
Binary files a/src/assets/imgs/wellcome.png and /dev/null differ
diff --git a/src/assets/imgs/x-icon.png b/src/assets/imgs/x-icon.png
deleted file mode 100644
index 6f7365a..0000000
Binary files a/src/assets/imgs/x-icon.png and /dev/null differ
diff --git a/src/assets/loading.gif b/src/assets/loading.gif
deleted file mode 100644
index b36a2b6..0000000
Binary files a/src/assets/loading.gif and /dev/null differ
diff --git a/src/assets/styles.css b/src/assets/styles.css
deleted file mode 100644
index 4a7c5d1..0000000
--- a/src/assets/styles.css
+++ /dev/null
@@ -1,1535 +0,0 @@
-@media (min-width: 768px) {
- .form-inline .radio input[type="radio"],
- .form-inline .checkbox input[type="checkbox"],
- .form-group .checkbox input[type="checkbox"]{
- float: left;
- margin-right: 5px;
- }
-}
-
-#sidebar-default {
- /*background: #00b9b4 none repeat scroll 0 0;*/
- background: #00a0de none repeat scroll 0 0;
- /*border-right: 1px solid #18aba6;*/
- border-right: 1px solid #008ec5;
- position: fixed;
- width: 260px;
-}
-
-#sidebar-default .current-user {
- background: #fff none repeat scroll 0 0;
- color: #000;
- margin-bottom: 40px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
-}
-
-#sidebar-default .menu-section ul li a:hover, #sidebar-default .menu-section ul li a.toggled {
- /*background: #18aba6 none repeat scroll 0 0;*/
- background: #008ec5 none repeat scroll 0 0;
-}
-
-#sidebar-default .menu-section ul li a.active {
- /*background: #ff6600 none repeat scroll 0 0;*/
- /*background: #003f3c none repeat scroll 0 0;*/
- /*background: #05007A none repeat scroll 0 0;*/
- background: #e2d442 none repeat scroll 0 0;
-}
-
-#sidebar-default .menu-section h3 {
- font-size: 14px;
-}
-
-#sidebar-default .menu-section ul li a {
- color: #fff;
- font-weight: bold;
-}
-
-#users #content form.search {
- margin-left: 140px;
-}
-
-#dashboard #content .menubar.fixed,
-#newPageHelpContent #content .menubar.fixed,
-#editPageHelpContent #content .menubar.fixed
-{
- padding-left: 300px;
-}
-
-.modal-header .close {
- margin-top: 3px;
-}
-
-.modal-dialog {
- width: 500px;
-}
-
-.dropdown-menu > li > a {
- cursor: pointer;
-}
-
-#faqQuestions #content .content-wrapper .page-controls .filters .links a,
-#pageContents #content .content-wrapper .page-controls .filters .links a {
- cursor: pointer;
-}
-
-.bootstrap-switch-mySuccess {
- background: #76b852;
- color: #fff;
-}
-/*#dashboard #content .page-title {*/
- /*border-right: 1px solid #e6e6e6;*/
- /*bottom: 0;*/
- /*color: #7e7e7e;*/
- /*font-size: 16px;*/
- /*font-weight: 600;*/
- /*letter-spacing: 0.3px;*/
- /*padding: 20px 30px;*/
- /*position: absolute;*/
- /*text-transform: uppercase;*/
- /*top: 0;*/
-/*}*/
-
-/*#form #content .menubar.fixed {*/
- /*padding-left: 270px;*/
-/*}*/
-
-/*#form #content .form-horizontal .form-group .detail {*/
- /*margin-bottom: 0;*/
- /*margin-top: 0;*/
- /*padding-top: 7px;*/
-/*}*/
-
-/*#users #content .page-title {
- !*color: #ff6600;*!
- color: #003f3c;
- font-size: 17px;
- font-weight: 700;
-}*/
-
-
-/*To be moved to resource-type.component.css*/
-
-/*#users #content .content-wrapper .users-list .headers .header label {*/
- /*height: auto;*/
-/*}*/
-
-/*#users #content .content-wrapper .users-list .headers .header label span {*/
- /*background: #fff none repeat scroll 0 0;*/
- /*color: #333;*/
- /*display: block;*/
- /*font-weight: 600;*/
- /*text-decoration: none;*/
- /*transition: all 0.14s linear 0s;*/
-/*}*/
-
-/***********************************************/
-
-.btn-primary {
- /*background-color: #00b9b4;*/
- background-color: #00a0de;
- /*border-color: #18aba6;*/
- border-color: #008ec5;
- color: #fff;
-}
-
-
-
-
-/*****************************************************************************************/
-/*****************************************************************************************/
-
-/** Add css rules here for your application. */
-
-*::before, *::after {
- box-sizing: border-box;
-}
-
-*::before, *::after {
- box-sizing: border-box;
-}
-
-* {
- box-sizing: border-box;
-}
-
-
-body {
- background: #fff none repeat scroll 0 0;
- padding-top: 0px !important;
- /*font: normal 13px/20px Open Sans !important;*/
- font: normal 13px/20px Source Sans Pro !important;
- margin: 0;
-}
-
-.loading {
- position: relative;
- min-height: 200px;
-}
-
-.loading-medium {
- position: relative;
- min-height: 300px;
-}
-
-.loading-big {
- position: relative;
- min-height: 600px;
-}
-
-.loader {
- background: url("assets/imgs/loader-small.gif") no-repeat center;
- z-index: 10;
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
-}
-
-.loader-big {
- background: url("assets/imgs/loader-big.gif") no-repeat center;
- z-index: 10;
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
-}
-
-.whiteFilm {
- background: #ffffff;
- z-index: 5;
- width: 100%;
- height: 100%;
- opacity: 0.7;
- position: absolute;
- top: 0;
- left: 0;
-}
-
-.inlineBlock {
- display: inline-block;
-}
-
-.marginLeftRight20 {
- margin-left: 20px;
- margin-right: 20px;
-}
-
-.marginBottom20 {
- margin-bottom: 20px;
-}
-
-.pull-right {
- float: right;
-}
-
-.comment {
- font-size: 12px;
- color: #666;
-}
-
-.fontItalic {
- font-style: italic;
-}
-
-.btn {
- background-color: #fff !important;
- background-image: none !important;
- border-color: #ccc !important;
- color: #333;
- /*border-radius: 0px !important;*/
-}
-
-/*.btn-primary {*/
- /*background-color: #586175 !important;*/
- /*background-image: none !important;*/
-/*}*/
-
-.btn-default {
- background-color: #fff !important;
- background-image: none !important;
- border-color: #ccc !important;
- color: #333;
-}
-
-.btn-success {
- background-color: #76b852 !important;
- border: 1px solid #63a042 !important;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.14), 0 1px 0 rgba(255, 255, 255, 0.2) inset !important;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
- transition: all 0.2s linear 0s !important;
- color: #fff;
-}
-
-.btn-info {
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.14), 0 1px 0 rgba(255, 255, 255, 0.3) inset !important;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
- transition: all 0.2s linear 0s !important;
- background-color: #5bc0de !important;
- border-color: #46b8da !important;
- color: #fff;
-}
-
-.btn-danger {
-
- background-color: #d9534f !important;
- border-color: #d43f3a !important;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.14), 0 1px 0 rgba(255, 255, 255, 0.3) inset !important;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
- transition: all 0.2s linear 0s !important;
- color: #fff;
-}
-
-
-
-#signin .bg {
- background: #3f4c5b url("./assets/imgs/fotoInteraWithOpacity.jpg") no-repeat fixed 50% 50% / 100% auto !important;
- padding-top: 70px;
-}
-
-#signin .logo {
- display: block;
- text-align: center;
- text-decoration: none;
-}
-
-#signin h3 {
- color: #fff;
- font-size: 24px;
- margin-top: 35px;
- text-align: center;
-}
-
-#signin .content {
- background: #fff none repeat scroll 0 0;
- border-radius: 3px;
- box-shadow: 0 1px 40px 0 rgba(0, 0, 0, 0.3);
- margin: 40px auto 0;
- max-width: 460px;
- padding: 42px 48px;
-}
-
-#signin .content .alert {
- margin-bottom: 15px;
-}
-
-#signin .content .fields {
- margin-bottom: 10px;
-}
-
-#signin .content .fields strong {
- display: block;
- margin-bottom: 10px;
-}
-
-#signin .content .fields input[type="text"], #signin .content .fields input[type="password"] {
- margin-bottom: 15px;
-}
-input.form-control[type="text"], input.form-control[type="email"], input.form-control[type="password"] {
- box-shadow: none;
-}
-
-.form-control {
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
- color: #555;
- display: block;
- font-size: 14px;
- height: 34px;
- line-height: 1.42857;
- padding: 6px 12px;
- transition: border-color 0.15s ease-in-out 0s, box-shadow 0.15s ease-in-out 0s;
- width: 100%;
-}
-
-#signin .content .actions {
- margin-bottom: 10px;
- margin-top: 30px;
- text-align: center;
-}
-
-#signin .content input {
- height: 35px !important;
-}
-
-.btn-lg, .btn-group-lg > .btn {
- border-radius: 2px !important;
- font-size: 17px !important;
- line-height: 1.33 !important;
- padding: 10px 20px !important;
-}
-
-#signin .bottom-wrapper {
- padding-bottom: 157px;
-}
-
-#signin .bottom-wrapper .message {
- border: 1px solid #8b9bc4;
- border-radius: 4px;
- color: #fff;
- margin: 60px auto 0;
- max-width: 360px;
- padding: 18px;
- text-align: center;
-}
-
-#signin .bottom-wrapper .message a {
- color: #fff;
- margin-left: 6px;
-}
-
-
-
-
-modal-backdrop, .modal-backdrop.fade.in {
- opacity: 0.35 !important;
-}
-/*.modal {
- border-radius: 0px !important;
-}*/
-
-.modal.confirmationModal {
- margin-left: -230px;
- margin-top: 90px !important;
- width: 500px !important;
-}
-
-.confirmationModal .entriesInfo {
- margin-bottom: 15px;
-}
-
-.modal.formModal {
- margin-left: -230px;
- width: 500px !important;
-}
-
-.confirmationModal .modal-header,
-.formModal .modal-header {
- padding: 15px 20px !important;
-}
-
-.confirmationModal .modal-header h3,
-.formModal .modal-header h3{
- font-size: 20px !important;
- font-weight: 400 !important;
-}
-
-.confirmationModal .modal-body,
-.formModal .modal-body {
- padding: 20px 25px;
-}
-
-.confirmationModal .modal-footer,
-.formModal .modal-footer {
- padding: 19px 20px 20px !important;
- margin-top: 15px;
- background-color: #fff !important;
- border-top: 1px solid #e5e5e5 !important;
-}
-
-.confirmationModal .modal-footer .confirmationModalButtons .btn,
-.formModal .modal-footer .confirmationModalButtons .btn {
- margin-left: 10px;
-}
-
-.formModal label {
- display: inline-block;
- font-weight: 700;
- margin-bottom: 5px;
-}
-
-.formModal input {
- height: 35px !important;
-}
-
-.formModal .input-xxlarge {
- width: 450px;
-}
-
-.formModal textarea {
- height: 90px;
-}
-
-.formModal form {
- margin: 0px !important;
-}
-
-.formModal fieldset.firstInlineFieldSet {
- margin-right: 28px;
-}
-
-.formModal .controls .span2 {
- width: 202px;
-}
-
-
-
-
-/*#wrapper {*/
- /*margin: 0 auto;*/
- /*position: relative;*/
-/*}*/
-
-/*#sidebar-default {*/
- /*background: #2a313a none repeat scroll 0 0;*/
- /*border-right: 1px solid #3c434d;*/
- /*left: 0;*/
- /*position: absolute;*/
- /*top: 0;*/
- /*width: 260px;*/
- /*z-index: 999;*/
-/*}*/
-
-/*.main-sidebar {*/
- /*bottom: 0;*/
-/*}*/
-
-/*#sidebar-default .current-user {*/
- /*background: linear-gradient(#3d4a5d, #3f4c5c) repeat scroll 0 0%, #686e78 none repeat scroll 0 0;*/
- /*color: #fff;*/
- /*height: 63px;*/
- /*margin-bottom: 20px;*/
- /*padding: 0 20px;*/
- /*position: relative;*/
-/*}*/
-
-/*#sidebar-default .current-user .name {*/
- /*color: #f0f5fa;*/
- /*display: block;*/
- /*font-size: 15px;*/
- /*padding: 10px 0;*/
- /*position: relative;*/
- /*text-decoration: none;*/
- /*text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);*/
-/*}*/
-
-/*#sidebar-default .current-user .name span {*/
- /*position: relative;*/
- /*top: 4px;*/
-/*}*/
-
-/*#sidebar-default .current-user .name .avatar {*/
- /*border-radius: 50%;*/
- /*margin-right: 12px;*/
- /*max-width: 41px;*/
- /*position: relative;*/
- /*top: 2px;*/
- /*background-color: #dde1d4;*/
- /*padding: 3px;*/
-/*}*/
-
-img {
- vertical-align: middle;
- border: 0 none;
-}
-
-a {
- background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
-}
-
-/*#sidebar-default .menu-section {*/
- /*margin-bottom: 25px;*/
-/*}*/
-
-/*#sidebar-default .menu-section h3 {*/
- /*color: #fff;*/
- /*font-size: 11px;*/
- /*font-weight: bold;*/
- /*letter-spacing: 0.5px;*/
- /*margin-bottom: 0;*/
- /*margin-top: 0;*/
- /*padding-left: 23px;*/
- /*text-shadow: 1px 1px #000;*/
- /*text-transform: uppercase;*/
-/*}*/
-
-/*#sidebar-default .menu-section ul {*/
- /*list-style-type: none;*/
- /*margin-bottom: 0;*/
- /*margin-left: 0;*/
- /*margin-right: 0;*/
- /*margin-top: 0;*/
- /*padding-left: 0;*/
-/*}*/
-
-/*#sidebar-default .menu-section ul li {*/
- /*margin: 1px 0;*/
-/*}*/
-
-/*#sidebar-default .menu-section ul li a {*/
- /*background: transparent none repeat scroll 0 0;*/
- /*color: #ecf6ff;*/
- /*display: inline-block;*/
- /*font-size: 14px;*/
- /*font-weight: 400;*/
- /*padding: 7px 10px 9px 23px;*/
- /*text-decoration: none;*/
- /*transition: background 0.13s linear 0s;*/
- /*width: 100%;*/
-/*}*/
-
-/*#sidebar-default .menu-section ul li a.active {*/
- /*background: linear-gradient(#5b6479, #4c5566) repeat scroll 0 0%, #686e78 none repeat scroll 0 0;*/
- /*box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25), 0 1px 0 rgba(255, 255, 255, 0.16) inset;*/
- /*text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);*/
-/*}*/
-
-/*#sidebar-default .menu-section ul li a i {*/
- /*font-size: 19px;*/
- /*margin-right: 9px;*/
- /*min-width: 17px;*/
- /*position: relative;*/
- /*text-align: center;*/
- /*top: 1px;*/
-/*}*/
-
-#sidebar-default .bottom-menu {
- bottom: 0;
- position: fixed;
- width: 260px;
- z-index: 999;
-}
-
-#sidebar-default .bottom-menu > ul {
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-#sidebar-default .bottom-menu > ul > li {
- border-right: 1px solid #3e4e55;
- border-top: 1px solid #3e4e55;
- display: block;
- float: left;
- width: 33.333%;
-}
-
-#sidebar-default .bottom-menu > ul > li > a {
- background: #333d4b none repeat scroll 0 0;
- display: block;
- padding: 6px 0;
- position: relative;
- text-align: center;
-}
-
-#sidebar-default .bottom-menu > ul > li > a i {
- color: #cbd3db;
- font-size: 19px;
- transition: all 0.1s linear 0s;
-}
-
-#sidebar-default .bottom-menu > ul > li > a .flag {
- background: #9ed166 none repeat scroll 0 0;
- border-radius: 25px;
- display: block;
- height: 7px;
- position: absolute;
- right: 25px;
- top: 4px;
- width: 7px;
-}
-
-#sidebar-default .bottom-menu > ul > li .menu::after {
- background-image: url("popover-arrow.png");
- background-size: 100% 100%;
- bottom: -12px;
- content: "";
- display: block;
- height: 12px;
- left: 49%;
- margin-left: -18.5px;
- position: absolute;
- transform: rotateX(180deg);
- width: 37px;
-}
-
-#sidebar-default .bottom-menu > ul > li > a:hover + .menu {
- opacity: 1;
- transform: scale(1);
-}
-
-#sidebar-default .bottom-menu > ul > li .menu {
- background: #fff none repeat scroll 0 0;
- border-radius: 3px;
- bottom: 34px;
- box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.25);
- left: 39px;
- list-style-type: none;
- opacity: 0;
- padding: 7px 0;
- position: absolute;
- transform: scale(0);
- transform-origin: 50% 100% 0;
- transition: all 300ms cubic-bezier(0.34, 1.61, 0.7, 1) 0s;
- width: 155px;
- z-index: 999;
-}
-
-#sidebar-default .bottom-menu > ul > li .menu li {
- border-bottom: 1px solid #e6e6e6;
- padding: 8px 0;
- text-align: center;
-}
-
-#sidebar-default .bottom-menu > ul > li .menu li:last-child {
- border-bottom: 0 none;
-}
-
-#sidebar-default .bottom-menu > ul > li .menu li a {
- color: #54a0e2;
- display: block;
- font-weight: 600;
- text-decoration: none;
- transition: all 0.2s linear 0s;
-}
-
-
-
-
-
-
-#content {
- background: #fff none repeat scroll 0 0;
- margin-left: 260px;
- min-height: 900px;
- padding: 67px 40px 40px;
- position: relative;
- transition: all 0.3s ease-out 0s;
-}
-
-/*#steps #content {
- padding: 67px 0px 0px;
-}*/
-
-#content .menubar {
- background: white none repeat scroll 0 0;
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
- height: 63px;
- left: 0;
- padding: 20px 40px;
- position: absolute;
- top: 0;
- width: 100%;
- z-index: 99;
-}
-
-#content .menubar.fixed {
- padding-left: 260px;
- position: fixed;
-}
-
-#content .menubar .page-title {
- color: #333;
- float: left;
- font-size: 17px;
- line-height: 26px;
- position: relative;
-}
-
-#content .menubar .page-title small {
- margin-left: 10px;
-}
-
-#content .menubar .btn.pull-right {
- font-weight: bold;
- letter-spacing: 0.3px;
- position: relative;
- top: -5px;
-}
-
-#users #content .page-title,
-#roles #content .page-title,
-#news #content .page-title,
-#dataProviders #content .page-title,
-#faqTopics #content .page-title,
-#faqQuestions #content .page-title,
-#pages #content .page-title,
-#pageContents #content .page-title,
-#entities #content .entity-title,
-#communities #content .community-title {
- border-right: 1px solid #e6e6e6;
- bottom: 0;
- color: #7e7e7e;
- font-size: 16px;
- font-weight: 600;
- letter-spacing: 0.3px;
- padding: 20px 35px;
- position: absolute;
- text-transform: uppercase;
- top: 0;
-}
-
-
-#content .content-wrapper {
- margin-top: 20px;
-}
-
-#content .content-wrapper .contentPanel {
- padding: 10px 15px;
-}
-
-#steps #content .content-wrapper .contentPanel {
- padding: 0px;
-}
-
-#users #content .content-wrapper .contentPanel .alert,
-#roles #content .content-wrapper .contentPanel .alert,
-#news #content .content-wrapper .contentPanel .alert,
-#faqTopics #content .content-wrapper .contentPanel .alert,
-#faqQuestions #content .content-wrapper .contentPanel .alert,
-#harvestHistory #content .content-wrapper .contentPanel .alert,
-#pages #content .content-wrapper .contentPanel .alert,
-#pageContents #content .content-wrapper .contentPanel .alert,
-#entities #content .content-wrapper .contentPanel .alert,
-#communities #content .content-wrapper .contentPanel .alert {
- margin-left: -10px;
- margin-right: -10px;
-}
-
-#dataProviders #content .content-wrapper .contentPanel .alert {
- margin-left: -25px;
- margin-right: -25px;
-}
-
-#dataProviders #content .content-wrapper .contentPanel .row .alert {
- margin-left: 0px;
- margin-right: 0px;
-}
-
-
-
-/*.clearfix::before, .clearfix::after, .container::before, .container::after, .container-fluid::before, .container-fluid::after, .row::before, .row::after, .form-horizontal .form-group::before, .form-horizontal .form-group::after, .btn-toolbar::before, .btn-toolbar::after, .btn-group-vertical > .btn-group::before, .btn-group-vertical > .btn-group::after, .nav::before, .nav::after, .navbar::before, .navbar::after, .navbar-header::before, .navbar-header::after, .navbar-collapse::before, .navbar-collapse::after, .pager::before, .pager::after, .panel-body::before, .panel-body::after, .modal-footer::before, .modal-footer::after {
- content: " ";
- display: table;
-}
-
-.clearfix::after, .container::after, .container-fluid::after, .row::after, .form-horizontal .form-group::after, .btn-toolbar::after, .btn-group-vertical > .btn-group::after, .nav::after, .navbar::after, .navbar-header::after, .navbar-collapse::after, .pager::after, .panel-body::after, .modal-footer::after {
- clear: both;
-}
-
-.clearfix::before, .clearfix::after, .container::before, .container::after, .container-fluid::before, .container-fluid::after, .row::before, .row::after, .form-horizontal .form-group::before, .form-horizontal .form-group::after, .btn-toolbar::before, .btn-toolbar::after, .btn-group-vertical > .btn-group::before, .btn-group-vertical > .btn-group::after, .nav::before, .nav::after, .navbar::before, .navbar::after, .navbar-header::before, .navbar-header::after, .navbar-collapse::before, .navbar-collapse::after, .pager::before, .pager::after, .panel-body::before, .panel-body::after, .modal-footer::before, .modal-footer::after {
- content: " ";
- display: table;
-}*/
-
-
-#dashboard .metrics {
- background: linear-gradient(#303d4f, #435266) repeat scroll 0 0%, #686e78 none repeat scroll 0 0;
- border: 1px solid #000;
- border-radius: 5px;
- box-shadow: 0 1px rgba(255, 255, 255, 0.3) inset;
- font-family: "Helvetica Neue",Arial;
- margin-top: 30px;
-}
-
-#dashboard .metrics .metric {
- border-right: 1px solid #526075;
- float: left;
- padding: 23px 0;
- text-align: center;
- width: 25%;
-}
-
-#dashboard .metrics .metric .field {
- color: #f4f4f4;
- display: inline-block;
- font-size: 14px;
- margin-bottom: 9px;
-}
-
-#dashboard .metrics .metric .data {
- color: #fff;
- display: block;
- font-size: 27px;
- text-shadow: 1px 1px #000;
-}
-
-
-
-
-
-#dashboard .chart {
- background: #fff none repeat scroll 0 0;
- border: 1px solid #dfe3eb;
- border-radius: 5px;
- box-shadow: 0 1px 0 #ededed inset;
- margin: 40px 0 50px;
- padding: 25px;
-}
-
-#dashboard .requestsGraphPanel {
- height: 400px;
-}
-
-#dashboard .usersGraphPanel {
- height: 400px;
-}
-
-#dashboard .userSectorPiePanel {
- height: 400px;
- width: 48%;
- display: inline-block;
- /*float: left;*/
-}
-
-#dashboard .requestStatusDonutPanel {
- height: 400px;
- width: 48%;
- display: inline-block;
- margin-right: 4%;
- /*float: left;*/
-}
-
-#dashboard .requestStatusDonutPanel.chart, #dashboard .userSectorPiePanel.chart {
- margin-top: 0px;
-}
-
-#dashboard .chart h3 {
- font-size: 18px;
- font-weight: 600;
- margin-bottom: 25px;
- margin-top: 0;
-}
-
-#dashboard .chart #visitors-chart {
- height: 230px;
- position: relative;
-}
-
-#dashboard .chart h3 .total {
- color: #2d96be;
- font-size: 14px;
- left: -8px;
- position: relative;
- top: 6px;
-}
-
-.pull-right {
- float: right;
-}
-
-#dashboard .chart h3 .total .change {
- border-radius: 3px;
- display: inline-block;
- font-size: 13px;
- margin-left: 7px;
- padding: 2px 5px;
-}
-
-#dashboard .chart h3 .total .change.up {
- color: #3fb83f;
-}
-
-
-
-
-
-
-
-#users #content form.search {
- float: left;
- margin-left: 170px;
- position: relative;
- top: -2px;
- width: 260px;
-}
-
-#roles #content form.search {
- float: left;
- margin-left: 200px;
- position: relative;
- top: -2px;
- width: 260px;
-}
-
-#news #content form.search {
- float: left;
- margin-left: 310px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#faqTopics #content form.search {
- float: left;
- margin-left: 170px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#faqQuestions #content form.search {
- float: left;
- margin-left: 200px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#pages #content form.search {
- float: left;
- margin-left: 150px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#pageContents #content form.search {
- float: left;
- margin-left: 250px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#entities #content form.search {
- float: left;
- margin-left: 150px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#communities #content form.search {
- float: left;
- margin-left: 150px;
- position: relative;
- top: -2px;
- width: 360px;
-}
-
-#dataProviders #content form.search {
- float: left;
- margin-left: 220px;
- position: relative;
- top: -2px;
- width: 420px;
-}
-
-#users #content form.search input[type="text"],
-#roles #content form.search input[type="text"],
-#news #content form.search input[type="text"],
-#dataProviders #content form.search input[type="text"],
-#faqTopics #content form.search input[type="text"],
-#faqQuestions #content form.search input[type="text"],
-#pages #content form.search input[type="text"],
-#pageContents #content form.search input[type="text"],
-#entities #content form.search input[type="text"],
-#communities #content form.search input[type="text"] {
- border: 0 none;
- border-radius: 3px;
- padding: 6px 15px 6px 37px;
- width: 100%;
- height: 35px !important;
- box-shadow: none !important;
- background-image: url("assets/imgs/icn_search.png");
- background-position: 2% 40%;
- background-repeat: no-repeat;
- background-size: 20px auto;
-}
-
-#users #content form.search input[type="submit"],
-#roles #content form.search input[type="submit"],
-#news #content form.search input[type="submit"],
-#dataProviders #content form.search input[type="submit"],
-#faqTopics #content form.search input[type="submit"],
-#faqQuestions #content form.search input[type="submit"],
-#pages #content form.search input[type="submit"],
-#pageContents #content form.search input[type="submit"],
-#entities #content form.search input[type="submit"],
-#communities #content form.search input[type="submit"] {
- position: absolute;
- visibility: hidden;
-}
-
-#users #content .content-wrapper .page-controls,
-#roles #content .content-wrapper .page-controls,
-#news #content .content-wrapper .page-controls,
-#faqTopics #content .content-wrapper .page-controls,
-#harvestHistory #content .content-wrapper .page-controls,
-#pages #content .content-wrapper .page-controls
-{
- margin-top: 30px;
-}
-
-#faqQuestions #content .content-wrapper .page-controls,
-#pageContents #content .content-wrapper .page-controls
-{
- margin-top: 10px;
-}
-
-#users #content .content-wrapper .page-controls .filters .links,
-#roles #content .content-wrapper .page-controls .filters .links,
-#news #content .content-wrapper .page-controls .filters .links,
-#faqTopics #content .content-wrapper .page-controls .filters .links,
-#faqQuestions #content .content-wrapper .page-controls .filters .links,
-#pages #content .content-wrapper .page-controls .filters .links,
-#pageContents #content .content-wrapper .page-controls .filters .links,
-#harvestHistory #content .content-wrapper .page-controls .filters .links,
-#harvest #content .content-wrapper .page-controls .filters .links {
- /*float: left;
- margin-left: -5px;*/
-}
-
-#users #content .content-wrapper .page-controls .filters .links .filterLabel,
-#roles #content .content-wrapper .page-controls .filters .links .filterLabel,
-#news #content .content-wrapper .page-controls .filters .links .filterLabel,
-#faqTopics #content .content-wrapper .page-controls .filters .links .filterLabel,
-#faqQuestions #content .content-wrapper .page-controls .filters .links .filterLabel,
-#pages #content .content-wrapper .page-controls .filters .links .filterLabel,
-#pageContents #content .content-wrapper .page-controls .filters .links .filterLabel,
-#harvestHistory #content .content-wrapper .page-controls .filters .links .filterLabel,
-#harvest #content .content-wrapper .page-controls .filters .links .filterLabel {
- font-size: 15px;
- margin-right: 20px;
- display: inline-block;
- font-weight: 700;
- margin-bottom: 5px;
- display: inline-block;
-}
-
-#harvestHistory #content .content-wrapper .page-controls .filters .links .input-xxlarge {
- width: 380px !important;
-}
-
-
-#users #content .content-wrapper .page-controls .filters .links a,
-#roles #content .content-wrapper .page-controls .filters .links a,
-#news #content .content-wrapper .page-controls .filters .links a,
-#faqQuestions #content .content-wrapper .page-controls .filters .links a,
-#pageContents #content .content-wrapper .page-controls .filters .links a,
-#harvest #content .content-wrapper .page-controls .filters .links a {
- color: #666;
- margin-right: 35px;
- padding-bottom: 2px;
- text-decoration: none;
- transition: all 0.1s linear 0s;
-}
-
-#users #content .content-wrapper .page-controls .filters .links a.active,
-#roles #content .content-wrapper .page-controls .filters .links a.active,
-#news #content .content-wrapper .page-controls .filters .links a.active,
-#faqQuestions #content .content-wrapper .page-controls .filters .links a.active,
-#pageContents #content .content-wrapper .page-controls .filters .links a.active,
-#harvest #content .content-wrapper .page-controls .filters .links a.activ {
- border-bottom: 1px solid #82bfe9;
- color: #378fca;
- font-weight: 600;
-}
-
-#users #content .content-wrapper .page-controls .filters .show-options,
-#roles #content .content-wrapper .page-controls .filters .show-options,
-#news #content .content-wrapper .page-controls .filters .show-options,
-#faqTopics #content .content-wrapper .page-controls .filters .show-options,
-#faqQuestions #content .content-wrapper .page-controls .filters .show-options,
-#pages #content .content-wrapper .page-controls .filters .show-options,
-#pageContents #content .content-wrapper .page-controls .filters .show-options,
-#harvestHistory #content .content-wrapper .page-controls .filters .show-options,
-#harvest #content .content-wrapper .page-controls .filters .show-options {
- float: right;
-}
-
-#users #content .content-wrapper .page-controls .filters .show-options .btn,
-#news #content .content-wrapper .page-controls .filters .show-options .btn,
-#faqTopics #content .content-wrapper .page-controls .filters .show-options .btn,
-#faqQuestions #content .content-wrapper .page-controls .filters .show-options .btn,
-#pages #content .content-wrapper .page-controls .filters .show-options .btn,
-#pageContents #content .content-wrapper .page-controls .filters .show-options .btn,
-#harvestHistory #content .content-wrapper .page-controls .filters .show-options .btn,
-#harvest #content .content-wrapper .page-controls .filters .show-options .btn {
- display: inline-block;
- margin-left: 20px;
- position: relative;
- top: -7px;
-}
-
-.show-options .dropdown-menu {
- right: 0;
- margin: -5px 0 0 !important;
- left: auto;
-}
-
-.show-options .dropdown-menu > li > a:hover, .show-options .dropdown-menu > li > a:focus {
- background-color: #f5f5f5 !important;
- color: #262626 !important;
- text-decoration: none !important;
- background-image: none !important;
-}
-
-
-
-
-
-#content .content-wrapper .users-list {
- margin-bottom: 40px;
- margin-top: 35px;
- /*font-size: 12px;*/
-}
-
-#content .content-wrapper .dataProviders-list {
- margin-bottom: 40px;
- margin-top: 15px;
-}
-
-.row {
- margin-left: -15px;
- margin-right: -15px;
-}
-
-.dataProviders-list .row {
- margin-left: -25px !important;
- margin-right: -25px !important;
-}
-
-.col-md-12 {
- width: 100%;
-}
-
-.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
- float: left;
-}
-
-.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1,
-.col-xs-2, .col-sm-2, .col-md-2, .col-lg-2,
-.col-xs-3, .col-sm-3, .col-md-3, .col-lg-3,
-.col-xs-4, .col-sm-4, .col-md-4, .col-lg-4,
-.col-xs-5, .col-sm-5, .col-md-5, .col-lg-5,
-.col-xs-6, .col-sm-6, .col-md-6, .col-lg-6,
-.col-xs-7, .col-sm-7, .col-md-7, .col-lg-7,
-.col-xs-8, .col-sm-8, .col-md-8, .col-lg-8,
-.col-xs-9, .col-sm-9, .col-md-9, .col-lg-9,
-.col-xs-10, .col-sm-10, .col-md-10, .col-lg-10,
-.col-xs-11, .col-sm-11, .col-md-11, .col-lg-11,
-.col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
- min-height: 1px;
- padding-left: 15px;
- padding-right: 15px;
- position: relative;
- display: inline-block;
-}
-
-#content .content-wrapper .users-list .headers,
-#content .content-wrapper .dataProviders-list .headers {
- min-height: 35px;
- padding-bottom: 10px;
-}
-
-#content .content-wrapper .users-list .headers .header label,
-#content .content-wrapper .dataProviders-list .headers .header label {
- color: #333;
- font-weight: 600;
- /*height: 100%;*/
- width: 100%;
-}
-
-#content .content-wrapper .users-list .headers .header label a,
-#content .content-wrapper .dataProviders-list .headers .header label a {
- background: #fff none repeat scroll 0 0;
- color: #333;
- display: block;
- font-weight: 600;
- text-decoration: none;
- transition: all 0.14s linear 0s;
-}
-
-.col-sm-1 {
- width: 8.33333%;
-}
-
-.col-sm-2 {
- width: 16.6667%;
-}
-
-.col-sm-3 {
- width: 25%;
-}
-
-.col-sm-4 {
- width: 33.3333%;
-}
-
-.col-sm-5 {
- width: 41.6667%;
-}
-
-#content .content-wrapper .users-list .user:nth-child(2n),
-#content .content-wrapper .dataProviders-list .user:nth-child(2n) {
- background: #fafafc none repeat scroll 0 0;
-}
-
-#content .content-wrapper .users-list .user,
-#content .content-wrapper .dataProviders-list .user {
- border-bottom: 1px solid #f0f0f0;
- padding: 12px 0;
-}
-
-#content .content-wrapper .users-list .user .avatar input[type="checkbox"],
-#content .content-wrapper .dataProviders-list .user .avatar input[type="checkbox"] {
- cursor: pointer;
- margin-right: 15px;
- margin-top: 0;
-}
-
-#content .content-wrapper .users-list .user .name {
- color: #333;
- position: relative;
- text-decoration: none;
- /*top: 13px;*/
-}
-
-#content .content-wrapper .users-list .user .email {
- font-size: 13px;
- position: relative;
- /*top: 13px;*/
-}
-
-#content .content-wrapper .users-list .user .alert {
- margin-bottom: 0px !important;
- margin-left: 0px !important;
- margin-right: 0px !important;
-}
-
-#content .content-wrapper .users-list .user .actions input {
- margin-right: 10px !important;
-}
-
-#content .content-wrapper .dataProviders-list .user .actions input {
- margin-left: 10px !important;
-}
-
-#content .content-wrapper .users-list .user .label,
-#content .content-wrapper .dataProviders-list .user .label {
- display: inline-block;
- margin-left: 15px;
- position: relative;
- text-decoration: none !important;
- padding: 3px 10px !important;
-}
-
-.label-warning {
- background-color: #f0ad4e !important;
-}
-
-
-
-
-
-#steps .steps .step {
- border-bottom: 1px solid #eee;
- margin: 0;
- padding: 35px 75px;
-}
-
-#steps .steps .step:nth-child(2n+1) {
- background: #f8f8fa none repeat scroll 0 0;
-}
-
-/*#steps .steps .step.done {
- background: #f8f8fa none repeat scroll 0 0;
- margin: 0;
- padding: 35px 75px;
-}*/
-
-#steps .steps .step .info {
- float: left;
- position: relative;
-}
-
-#steps .steps .step.done .info {
- top: -6px;
-}
-
-#steps .steps .step .info .number {
- font-size: 26px;
- margin-right: 20px;
- position: relative;
- top: 2px;
-}
-
-#steps .steps .step .btn {
- margin-left: 10px;
-}
-
-
-
-#harvest #content .content-wrapper .manualHarvest {
- float: left;
- height: 100%;
- min-height: 800px;
- /*padding: 30px 30px 80px;*/
- position: relative;
- width: 30%;
- margin-top: -30px;
- margin-left: -35px;
-}
-
-.manualHarvest input[type="text"] {
- height: 30px !important;
-}
-
-.manualHarvest .input-xlarge {
- width: 98%;
-}
-
-input.inputWithComment {
- margin-bottom: 0px !important;
-}
-
-.manualHarvest label {
- display: inline-block;
- font-weight: 700;
- margin-bottom: 5px;
-}
-
-.manualHarvestObjectTypes, .scheduledHarvestObjectTypes {
- padding-left: 5px;
- padding-right: 5px;
-}
-
-.manualHarvestObjectTypes label, .scheduledHarvestObjectTypes label {
- /*display: block;*/
- font-weight: 400;
- margin-bottom: 7px;
- width: 50%;
-}
-
-.scheduledHarvestObjectTypes input {
- height: 20px !important;
- margin-top: 0 !important;
-}
-
-label.selectAllObjectTypes {
- display: block;
- width: 100%;
- background: rgba(0, 0, 0, 0) linear-gradient(#f7f8fc, #f8f9fc) repeat scroll 0 0;
- border-bottom: 1px solid #dee3ea;
- border-top: 1px solid #d4dbe4;
- box-shadow: 0 1px rgba(255, 255, 255, 0.79) inset;
- padding: 5px 10px;
- margin-left: -5px;
- margin-right: -5px;
-}
-
-.selectAllObjectTypes input[type="checkbox"] {
- margin-left: -4px !important;
- margin-right: 6px;
-}
-
-.selectAllObjectTypes span {
- letter-spacing: 0.5px;
-}
-
-.manualHarvest .actionButtons {
- text-align: center;
-}
-
-.manualHarvest .harvestNow {
- font-weight: bold;
- letter-spacing: 0.3px;
-}
-
-#harvest #content .content-wrapper .scheduleHarvest {
- border-left: 1px solid #e8ebf0;
- bottom: 0;
- position: absolute;
- right: 0;
- top: 67px;
- width: 70%;
-}
-
-#harvest .manualHarvest h3,
-#harvest .scheduleHarvest h3 {
- font-size: 17px !important;
- font-weight: 400;
- margin: 20px 0 25px;
- padding: 0 20px;
- text-align: center;
-}
-
-#harvest .scheduleHarvest .row {
- margin-left: 20px;
- margin-right: 20px;
-}
-
-#harvest #content .content-wrapper .page-controls {
- margin-top: 15px;
-}
-
-#harvest #content .content-wrapper .page-controls .filters .show-options {
- margin-top: 7px;
-}
-
-table.dataTable {
- clear: both;
- margin: 15px 30px;
-}
-
-#harvest .content-wrapper .scheduleHarvest thead th::after {
- bottom: -1px;
- box-shadow: 0 1px 1px rgba(66, 85, 124, 0.14);
- content: "";
- height: 1px;
- left: 0;
- position: absolute;
- width: 100%;
-}
-
-#harvest .content-wrapper .scheduleHarvest thead th {
- background: rgba(0, 0, 0, 0) linear-gradient(#f7f8fc, #f8f9fc) repeat scroll 0 0;
- border-bottom: 1px solid #dee3ea;
- border-top: 1px solid #d4dbe4;
- box-shadow: 0 1px rgba(255, 255, 255, 0.79) inset;
- color: #444;
- padding: 10px 18px 12px 20px;
- position: relative;
- text-shadow: 1px 1px #fff;
-}
-
-table.dataTable tr.odd {
- background-color: white;
-}
-
-table.dataTable tr.even {
- background-color: white;
-}
-
-#harvest .content-wrapper .scheduleHarvest td {
- padding: 11px 20px;
- text-align: center;
-}
-
-table.dataTable tr.odd td.selecting {
- background-color: #fafbfd;
-}
-
-table.dataTable tr.even td.selecting {
- background-color: #fafbfd;
-}
-
-table.dataTable td {
- border-bottom: 1px solid #edf2f7;
- padding: 11px 9px;
-}
-
-table.dataTable td input.edit {
- margin-right: 5px;
-}
-
-.scheduleHarvestAlerts {
- margin-left: 30px;
- margin-right: 20px;
-}
-
-#performanceIndicators #content .contentPanel {
- font-size: 15px;
- padding-left: 0;
-}
-
-.form-group.required label:after {
- content:"*";
- color:red;
-}
diff --git a/src/environments/environment.beta.ts b/src/environments/environment.beta.ts
index 99e023a..dd2306a 100644
--- a/src/environments/environment.beta.ts
+++ b/src/environments/environment.beta.ts
@@ -2,6 +2,8 @@ import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-propert
export let properties: EnvProperties = {
environment: "beta",
+ isDashboard: true,
+ adminToolsPortalType: "community",
enablePiwikTrack: false,
useCache: false,
metricsAPIURL: "https://beta.services.openaire.eu/usagestats/",
@@ -36,14 +38,15 @@ export let properties: EnvProperties = {
utilsService: "https://demo.openaire.eu/utils-service",
vocabulariesAPI: "https://beta.services.openaire.eu/provision/mvc/vocabularies/",
piwikBaseUrl: " https://analytics.openaire.eu/piwik.php?idsite=6",
+ registryUrl: 'https://beta.services.openaire.eu/uoa-user-management/api/registry/',
loginUrl: "https://beta.services.openaire.eu/connect-dashboard-login/openid_connect_login",
userInfoUrl: "https://beta.services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
- registryUrl: 'https://beta.services.openaire.eu/uoa-user-management/api/registry/',
- logoutUrl: "https://services.openaire.eu/connect-dashboard-login/openid_logout",
+ logoutUrl: "https://beta.services.openaire.eu/connect-dashboard-login/openid_logout",
cookieDomain: ".openaire.eu",
feedbackmail: "feedback@openaire.eu",
feedbackmailForMissingEntities: "feedback@openaire.eu",
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
+ deleteCacheUrl: 'https://demo.openaire.eu/cache/clear',
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
adminToolsCommunity: "openaire",
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
@@ -82,6 +85,6 @@ export let properties: EnvProperties = {
claimsInformationLink: "https://beta.openaire.eu/linking",
lastIndexUpdate: "2020-05-06",
indexInfoAPI: "http://beta.services.openaire.eu/openaire/info/",
- adminPortalURL: "https://beta.admin.connect.openaire.eu",
- admins: ["rcd-helpdesk@openaire.eu"]
+ admins: ["rcd-helpdesk@openaire.eu"],
+ adminPortalURL: "https://beta.admin.connect.openaire.eu"
};
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 0e04c43..3783bf3 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -2,6 +2,7 @@ import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-propert
export let properties: EnvProperties = {
environment:"production",
+ isDashboard: true,
adminToolsPortalType: "community",
enablePiwikTrack: false,
useCache: false,
@@ -35,44 +36,32 @@ export let properties: EnvProperties = {
helpdesk: "https://www.openaire.eu/support/helpdesk",
helpdeskEmail: "helpdesk@openaire.eu",
utilsService: "https://explore.openaire.eu/utils-service",
-
vocabulariesAPI:"https://services.openaire.eu/provision/mvc/vocabularies/",
-
piwikBaseUrl:" https://analytics.openaire.eu/piwik.php?idsite=6",
- loginUrl: "https://services.openaire.eu/connect-dashbaord-login/openid_connect_login",
+ loginUrl: "https://services.openaire.eu/connect-dashboard-login/openid_connect_login",
userInfoUrl: " https://services.openaire.eu/uoa-user-management/api/users/getUserInfo?accessToken=",
registryUrl: 'https://services.openaire.eu/uoa-user-management/api/registry/',
- logoutUrl: "https://services.openaire.eu/connect-dashbaord-login/openid_logout",
-
+ logoutUrl: "https://services.openaire.eu/connect-dashboard-login/openid_logout",
cookieDomain:".openaire.eu",
-
feedbackmail:"openaire.test@gmail.com",
feedbackmailForMissingEntities: "feedback@openaire.eu",
-
cacheUrl:"https://explore.openaire.eu/cache/get?url=",
deleteCacheUrl: 'https://explore.openaire.eu/cache/clear',
-
adminToolsAPIURL:"https://services.openaire.eu/uoa-admin-tools/",
-
adminToolsCommunity:"openaire",
communityAPI: "https://services.openaire.eu/openaire/community/",
-
miningBackendURL: "https://beta.services.openaire.eu/interactive-mining",
-
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
-
baseLink: "",
domain: "https://admin.explore.openaire.eu/",
baseOpenaireLink: "https://explore.openaire.eu",
-
searchLinkToPublication: "/search/publication?articleId=",
searchLinkToProject: "/search/project?projectId=",
searchLinkToDataProvider: "/search/dataprovider?datasourceId=",
searchLinkToDataset: "/search/dataset?datasetId=",
searchLinkToOrganization: "/search/organization?organizationId=",
-
searchLinkToPublications: "/search/find/publications",
searchLinkToDataProviders: "/search/find/dataproviders",
searchLinkToProjects: "/search/find/projects",
@@ -84,7 +73,6 @@ export let properties: EnvProperties = {
searchLinkToEntityRegistriesDataProvidersTable: "/search/entity-registries-table",
searchLinkToJournals: "/search/journals",
searchLinkToJournalsTable: "/search/journals-table",
-
searchLinkToAdvancedPublications: "/search/advanced/publications",
searchLinkToAdvancedProjects: "/search/advanced/projects",
searchLinkToAdvancedDatasets: "/search/advanced/datasets",
@@ -93,11 +81,10 @@ export let properties: EnvProperties = {
searchLinkToAdvancedOrganizations: "/search/advanced/organizations",
lastIndexInformationLink: "https://www.openaire.eu/aggregation-and-content-provision-workflows",
showLastIndexInformationLink: false,
-
widgetLink: "https://www.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=",
claimsInformationLink: "https://www.openaire.eu/linking",
lastIndexUpdate: "2019-07-24",
indexInfoAPI: "http://services.openaire.eu/openaire/info/",
- adminPortalURL: "https://admin.connect.openaire.eu",
- admins: ["rcd-helpdesk@openaire.eu"]
+ admins: ["rcd-helpdesk@openaire.eu"],
+ adminPortalURL: "https://admin.connect.openaire.eu"
};
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 43f25b9..e6ebb1e 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -7,12 +7,13 @@ import {EnvProperties} from '../app/openaireLibrary/utils/properties/env-propert
export let properties: EnvProperties = {
environment: 'development',
+ isDashboard: true,
adminToolsPortalType: "community",
enablePiwikTrack: false,
useCache: false,
metricsAPIURL: 'https://beta.services.openaire.eu/usagestats/',
framesAPIURL: 'https://beta.openaire.eu/stats3/',
- claimsAPIURL: 'http://dl170.madgik.di.uoa.gr:8180/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/',
+ claimsAPIURL: 'http://scoobydoo.di.uoa.gr:8080/dnet-claims-service-2.0.0-SNAPSHOT/rest/claimsService/',
statisticsAPIURL: 'https://beta.services.openaire.eu/stats-api/',
statisticsFrameAPIURL: 'https://beta.openaire.eu/stats/',
statisticsFrameNewAPIURL: "https://stats.madgik.di.uoa.gr/stats-api/",
@@ -40,42 +41,32 @@ export let properties: EnvProperties = {
helpdesk: 'https://www.openaire.eu/support/helpdesk',
helpdeskEmail: 'helpdesk@openaire.eu',
utilsService: 'http://mpagasas.di.uoa.gr:8000',
-
vocabulariesAPI: 'https://beta.services.openaire.eu/provision/mvc/vocabularies/',
-
piwikBaseUrl: ' https://analytics.openaire.eu/piwik.php?idsite=6',
registryUrl: 'http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/registry/',
- loginUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-login/openid_connect_login",
- userInfoUrl: "http://dl170.madgik.di.uoa.gr:8180/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
- logoutUrl: "https://aai.openaire.eu/proxy/saml2/idp/SingleLogoutService.php?ReturnTo=",
+ loginUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_connect_login",
+ userInfoUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/api/users/getUserInfo?accessToken=",
+ logoutUrl: "http://mpagasas.di.uoa.gr:8080/dnet-openaire-users-1.0.0-SNAPSHOT/openid_logout",
cookieDomain: '.di.uoa.gr',
-
feedbackmail: 'openaire.test@gmail.com',
feedbackmailForMissingEntities: 'feedback@openaire.eu',
cacheUrl: 'http://scoobydoo.di.uoa.gr:3000/get?url=',
deleteCacheUrl: 'http://duffy.di.uoa.gr:3000/clear',
-
adminToolsAPIURL: 'http://duffy.di.uoa.gr:8080/uoa-admin-tools/',
-
adminToolsCommunity: 'openaire',
communityAPI: 'https://dev-openaire.d4science.org/openaire/community/',
-
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
-
csvLimit: 2000,
pagingLimit: 20,
resultsPerPage: 10,
-
baseLink: "",
- domain:'https://demo.openaire.eu',
+ domain:'https://beta.admin.connect.openaire.eu',
baseOpenaireLink: 'https://beta.explore.openaire.eu',
-
searchLinkToPublication: '/search/publication?articleId=',
searchLinkToProject: '/search/project?projectId=',
searchLinkToDataProvider: '/search/dataprovider?datasourceId=',
searchLinkToDataset: '/search/dataset?datasetId=',
searchLinkToOrganization: '/search/organization?organizationId=',
-
searchLinkToPublications: '/search/find/publications',
searchLinkToDataProviders: '/search/find/dataproviders',
searchLinkToProjects: '/search/find/projects',
@@ -87,7 +78,6 @@ export let properties: EnvProperties = {
searchLinkToEntityRegistriesDataProvidersTable: '/search/entity-registries-table',
searchLinkToJournals: '/search/journals',
searchLinkToJournalsTable: '/search/journals-table',
-
searchLinkToAdvancedPublications: '/search/advanced/publications',
searchLinkToAdvancedProjects: '/search/advanced/projects',
searchLinkToAdvancedDatasets: '/search/advanced/datasets',
@@ -96,7 +86,6 @@ export let properties: EnvProperties = {
searchLinkToAdvancedOrganizations: '/search/advanced/organizations',
lastIndexInformationLink: 'https://www.openaire.eu/aggregation-and-content-provision-workflows',
showLastIndexInformationLink: false,
-
widgetLink: 'https://beta.openaire.eu/index.php?option=com_openaire&view=widget&format=raw&projectId=',
claimsInformationLink: 'https://www.openaire.eu/linking-beta',
lastIndexUpdate: '2019-05-16',
diff --git a/src/index.html b/src/index.html
index aa85824..62500c7 100644
--- a/src/index.html
+++ b/src/index.html
@@ -1,39 +1,35 @@
-
-
-
- Administration Dashboard | OpenAIRE-Connect
+
+
+
+ Administration Dashboard | OpenAIRE-Connect
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/material.scss b/src/material.scss
index 1957d96..b5fe85b 100644
--- a/src/material.scss
+++ b/src/material.scss
@@ -1,9 +1,23 @@
@import '~@angular/material/theming';
@include mat-core();
-$my-app-primary: mat-palette($mat-blue-grey);
-$my-app-accent: mat-palette($mat-green);
-$my-app-warn: mat-palette($mat-deep-orange);
-
-$my-app-theme: mat-light-theme($my-app-primary, $my-app-accent, $my-app-warn);
+$primary-color: (
+ 0: var(--primary-color),
+ contrast: (
+ 50: var(--contrast-color)
+ )
+);
+$secondary-color: (
+ 0: var(--secondary-color),
+ contrast: (
+ 50: var(--contrast-color)
+ )
+);
+$my-app-primary: mat-palette($primary-color, 0);
+$my-app-accent: mat-palette($secondary-color, 0);
+$my-app-theme: mat-light-theme($my-app-primary, $my-app-accent);
@include angular-material-theme($my-app-theme);
+
+.cdk-global-overlay-wrapper, .cdk-overlay-container {
+ z-index: 9999!important;
+}
diff --git a/src/styles.css b/src/styles.css
index 8f4a2d9..200aa08 100644
--- a/src/styles.css
+++ b/src/styles.css
@@ -2,5 +2,6 @@
@import "assets/common-assets/common/theme.css";
@import "assets/common-assets/common/custom.css";
@import "assets/common-assets/library.css";
+@import "assets/dashboard-theme/main.css";
@import "assets/css/connect-custom.css";
- - {{item.title}} - [no name available] - - - Master zenodo community - - - - - Added - - - - -
-