Fix margins in subjects

This commit is contained in:
Konstantinos Triantafyllou 2023-05-03 17:00:14 +03:00
parent ffa7ab71a0
commit ced4fe404d
4 changed files with 16 additions and 17 deletions

@ -1 +1 @@
Subproject commit bd87a47795f8f9243e0a1129d715fcb96cf9b714
Subproject commit c321390ccbbe72515f336830c3aa54e3156379ef

View File

@ -2,14 +2,13 @@ import {ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild} from "@angul
import {CommunityService} from "../../openaireLibrary/connect/community/community.service";
import {AdvancedCriteriaService} from "./advanced-criteria.service";
import {Subscription} from "rxjs";
import {ContentProvider, SelectionCriteria} from "../../openaireLibrary/utils/entities/contentProvider";
import {SelectionCriteria} from "../../openaireLibrary/utils/entities/contentProvider";
import {
FullScreenModalComponent
} from "../../openaireLibrary/utils/modal/full-screen-modal/full-screen-modal.component";
import {NotificationHandler} from "../../openaireLibrary/utils/notification-handler";
import {CriteriaComponent} from "../content-providers/criteria/criteria.component";
import {CriteriaUtils} from "../content-providers/criteria-utils";
import {OpenaireEntities} from "../../openaireLibrary/utils/properties/searchFields";
import {CommunityInfo} from "../../openaireLibrary/connect/community/communityInfo";
@Component({

View File

@ -1,13 +1,13 @@
<div page-content>
<div actions class="uk-margin-top">
<div class="uk-section-xsmall">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid uk-margin-top" uk-grid>
<div [disabled]="showLoading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
<div actions>
<div class="uk-section-xsmall uk-margin-top">
<div class="uk-flex uk-flex-right@m uk-flex-center uk-flex-middle uk-grid" uk-grid>
<div [disabled]="loading" search-input class="uk-width-1-3@xl uk-width-2-5@l uk-width-1-2@m uk-width-1-1"
[searchControl]="filterForm" [expandable]="true" placeholder="Search Subjects" searchInputClass="outer">
</div>
<div>
<button class="uk-button uk-button-default uk-flex uk-flex-middle"
[disabled]="showLoading" [class.uk-disabled]="showLoading"
[disabled]="loading" [class.uk-disabled]="loading"
(click)="editAllSubjects()"
uk-tooltip="title:<div><div class='uk-margin-small-bottom uk-text-bold'>Add or edit subjects</div> All the research results associated to the subjects specified here will be automatically linked to the community dashboard in the next run of OpenAIRE workflows.</div>">
<span>Add/Edit Subjects</span>
@ -18,10 +18,10 @@
</div>
<div inner>
<div class="uk-section uk-section-small uk-position-relative" style="min-height: 60vh">
<div *ngIf="showLoading" class="uk-position-center">
<div *ngIf="loading" class="uk-position-center">
<loading></loading>
</div>
<div *ngIf="!showLoading">
<div *ngIf="!loading">
<div *ngIf="displayedSubjects?.length == 0 && displayedSdg?.length == 0 && displayedFos?.length == 0"
class="uk-card uk-card-default uk-padding-large uk-text-center uk-margin-bottom uk-text-bold">
<div>No subjects</div>

View File

@ -28,7 +28,7 @@ export class SubjectsEditFormComponent implements OnInit {
properties: EnvProperties = properties;
communityId: string = null;
community: CommunityInfo = null;
showLoading = true;
loading = true;
params: any;
private subscriptions: any[] = [];
@ -105,7 +105,7 @@ export class SubjectsEditFormComponent implements OnInit {
params => {
this.communityId = params['community'];
this.title.setTitle(this.communityId.toUpperCase() + ' | Subjects');
this.showLoading = true;
this.loading = true;
this.subscriptions.push(this._communityService.getCommunityAsObservable().subscribe(
community => {
this.community = community;
@ -131,7 +131,7 @@ export class SubjectsEditFormComponent implements OnInit {
this.originalSubjects = HelperFunctions.copy(this.displayedSubjects);
this.originalSdg = HelperFunctions.copy(this.displayedSdg);
this.originalFos = HelperFunctions.copy(this.displayedFos);
this.showLoading = false;
this.loading = false;
},
error => this.handleUpdateError('System error retrieving community profile', error)
));
@ -305,7 +305,7 @@ export class SubjectsEditFormComponent implements OnInit {
public saveSubjects(subjects, displayedSubjects, type: string) {
if (this.communityId != null && this.communityId !== '') {
this.showLoading = true;
this.loading = true;
const subjectsToDeleteAr = this.getSubjectsExistOnlyInFirst(subjects, displayedSubjects);
const subjectsToAddAr = this.getSubjectsExistOnlyInFirst(displayedSubjects, subjects);
const subjectsToDelete = this.getNonEmptyItems(subjectsToDeleteAr);
@ -328,7 +328,7 @@ export class SubjectsEditFormComponent implements OnInit {
console.error(error)
}
NotificationHandler.rise(message, 'danger');
this.showLoading = false;
this.loading = false;
}
afterUpdateActions(response, message: string) {
@ -344,7 +344,7 @@ export class SubjectsEditFormComponent implements OnInit {
this._communityService.updateSubjects(this.community.subjects, this.community.fos, this.community.sdg);
this._clearCacheService.purgeBrowserCache("Subjects "+message, this.communityId);
NotificationHandler.rise('Subjects successfully ' + message + '!')
this.showLoading = false;
this.loading = false;
}