-
No {{openaireEntiites.PROJECTS | lowercase}} for {{community.shortTitle}}
+
No {{openaireEntiites.PROJECTS | lowercase}}
+ for {{community.shortTitle}}
+ found
+
0"
class="uk-grid uk-grid-large uk-child-width-1-1 uk-child-width-1-2@m uk-margin-bottom" uk-grid uk-height-match="target: .uk-card-body">
diff --git a/src/app/pages/projects/remove-projects.component.ts b/src/app/pages/projects/remove-projects.component.ts
index 6a3b525..90d06b9 100644
--- a/src/app/pages/projects/remove-projects.component.ts
+++ b/src/app/pages/projects/remove-projects.component.ts
@@ -152,126 +152,99 @@ export class RemoveProjectsComponent implements OnInit {
}
public confirmedDeleteProject(data: any) {
- if (!Session.isLoggedIn()) {
- this._router.navigate(['/user-info'], {
- queryParams: {
- "errorCode": LoginErrorCodes.NOT_VALID,
- "redirectUrl": this._router.url
- }
- });
- } else {
- this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, this.selectedCommunityProject.id).subscribe(
- data => {
- let index = this.communityProjects.indexOf(this.selectedCommunityProject);
- this.communityProjects.splice(index, 1);
+ this.subscriptions.push(this._manageCommunityProjectsService.removeProject(this.properties, this.community.communityId, this.selectedCommunityProject.id).subscribe(
+ data => {
+ let index = this.communityProjects.indexOf(this.selectedCommunityProject);
+ this.communityProjects.splice(index, 1);
- this.applyFilters();
+ this.applyFilters();
- UIkit.notification(OpenaireEntities.PROJECT+' successfully removed!', {
- status: 'success',
- timeout: 6000,
- pos: 'bottom-right'
- });
+ UIkit.notification(OpenaireEntities.PROJECT+' successfully removed!', {
+ status: 'success',
+ timeout: 6000,
+ pos: 'bottom-right'
+ });
- this.communityProjectsChanged.emit({
- value: this.communityProjects,
- });
+ this.communityProjectsChanged.emit({
+ value: this.communityProjects,
+ });
- this.communitySearchUtils.totalResults--;
- this.communitySearchUtils.page = 1;
- },
- err => {
- this.handleError('An error has been occurred. Try again later!');
- console.error(err);
- }
- ));
- }
+ this.communitySearchUtils.totalResults--;
+ this.communitySearchUtils.page = 1;
+ },
+ err => {
+ this.handleError('An error has been occurred. Try again later!');
+ console.error(err);
+ }
+ ));
}
public removeProject(communityProject: any) {
- if (!Session.isLoggedIn()) {
- this._router.navigate(['/user-info'], {
- queryParams: {
- "errorCode": LoginErrorCodes.NOT_VALID,
- "redirectUrl": this._router.url
- }
- });
- } else {
- this.selectedCommunityProject = communityProject;
- this.alertModalDeleteCommunity.cancelButton = true;
- this.alertModalDeleteCommunity.okButton = true;
- this.alertModalDeleteCommunity.alertTitle = "Remove "+OpenaireEntities.PROJECT;
- let title = "";
- if (communityProject.name) {
- title = communityProject.name;
- }
- if (communityProject.name && communityProject.acronym) {
- title += " (";
- }
- if (communityProject.acronym) {
- title += communityProject.acronym;
- }
- if (communityProject.name && communityProject.acronym) {
- title += ")";
- }
- this.alertModalDeleteCommunity.message = OpenaireEntities.PROJECT;
- if (title) {
- this.alertModalDeleteCommunity.message += "
" + title + " ";
- }
- this.alertModalDeleteCommunity.message += "will be removed from your "+OpenaireEntities.COMMUNITY.toLowerCase()+". Are you sure?";
- this.alertModalDeleteCommunity.okButtonText = "Yes";
- this.alertModalDeleteCommunity.open();
+ this.selectedCommunityProject = communityProject;
+ this.alertModalDeleteCommunity.cancelButton = true;
+ this.alertModalDeleteCommunity.okButton = true;
+ this.alertModalDeleteCommunity.alertTitle = "Remove "+OpenaireEntities.PROJECT;
+ let title = "";
+ if (communityProject.name) {
+ title = communityProject.name;
}
+ if (communityProject.name && communityProject.acronym) {
+ title += " (";
+ }
+ if (communityProject.acronym) {
+ title += communityProject.acronym;
+ }
+ if (communityProject.name && communityProject.acronym) {
+ title += ")";
+ }
+ this.alertModalDeleteCommunity.message = OpenaireEntities.PROJECT;
+ if (title) {
+ this.alertModalDeleteCommunity.message += "
" + title + " ";
+ }
+ this.alertModalDeleteCommunity.message += "will be removed from your "+OpenaireEntities.COMMUNITY.toLowerCase()+". Are you sure?";
+ this.alertModalDeleteCommunity.okButtonText = "Yes";
+ this.alertModalDeleteCommunity.open();
}
public _getCommunityProjects() {
- if (!Session.isLoggedIn()) {
- this._router.navigate(['/user-info'], {
- queryParams: {
- "errorCode": LoginErrorCodes.NOT_VALID,
- "redirectUrl": this._router.url
+ this.communitySearchUtils.status = this.errorCodes.LOADING;
+ this.communityProjects = [];
+ this.communitySearchUtils.totalResults = 0;
+ this.communitySearchUtils.page = 1;
+ this.communitySearchUtils.keyword = "";
+
+ this.subscriptions.push(this._searchCommunityProjectsService.searchProjects(this.properties, this.community.communityId).subscribe(
+ data => {
+ this.communityProjects = data;
+ this.previewCommunityProjects = this.communityProjects;
+ this.sort();
+
+ this.communitySearchUtils.totalResults = data.length;
+ this.communitySearchUtils.status = this.errorCodes.DONE;
+
+ this.communityProjectsChanged.emit({
+ value: this.communityProjects,
+ });
+
+ this.createFunderFilter();
+
+ this.loading = false;
+ },
+ err => {
+ console.error(err);
+ //TODO check erros (service not available, bad request)
+
+ if (err.status == '404') {
+ this.communitySearchUtils.status = this.errorCodes.NOT_FOUND;
+ } else if (err.status == '500') {
+ this.communitySearchUtils.status = this.errorCodes.ERROR;
+ } else {
+ this.communitySearchUtils.status = this.errorCodes.NOT_AVAILABLE;
}
- });
- } else {
- this.communitySearchUtils.status = this.errorCodes.LOADING;
- this.communityProjects = [];
- this.communitySearchUtils.totalResults = 0;
- this.communitySearchUtils.page = 1;
- this.communitySearchUtils.keyword = "";
- this.subscriptions.push(this._searchCommunityProjectsService.searchProjects(this.properties, this.community.communityId).subscribe(
- data => {
- this.communityProjects = data;
- this.previewCommunityProjects = this.communityProjects;
- this.sort();
-
- this.communitySearchUtils.totalResults = data.length;
- this.communitySearchUtils.status = this.errorCodes.DONE;
-
- this.communityProjectsChanged.emit({
- value: this.communityProjects,
- });
-
- this.createFunderFilter();
-
- this.loading = false;
- },
- err => {
- console.error(err);
- //TODO check erros (service not available, bad request)
-
- if (err.status == '404') {
- this.communitySearchUtils.status = this.errorCodes.NOT_FOUND;
- } else if (err.status == '500') {
- this.communitySearchUtils.status = this.errorCodes.ERROR;
- } else {
- this.communitySearchUtils.status = this.errorCodes.NOT_AVAILABLE;
- }
-
- this.loading = false;
- }
- ));
- }
+ this.loading = false;
+ }
+ ));
}
public createFunderFilter(): void {
diff --git a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html
index a9b4205..a989628 100644
--- a/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html
+++ b/src/app/pages/subjects/subjects-edit-form/subjects-edit-form.component.html
@@ -36,7 +36,10 @@
-
No subjects found
+
No subjects
+ for {{community.shortTitle}}
+ found
+
0">
0" [type]="'Subjects'"
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 7afc88a..5c7f755 100644
--- a/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html
+++ b/src/app/pages/zenodo-communities/manage-zenodo-communities.component.html
@@ -32,7 +32,10 @@
-
No zenodo communities found
+
No zenodo communities
+ for {{community.shortTitle}}
+ found
+
0">