Merge branch 'ui-redesign' of gitlab.eudat.eu:dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-redesign

# Conflicts:
#	dmp-frontend/src/app/ui/dashboard/dashboard.component.html
This commit is contained in:
apapachristou 2020-08-24 16:12:53 +03:00
commit be48a150b2
15 changed files with 451 additions and 395 deletions

View File

@ -1906,8 +1906,10 @@ public class DataManagementPlanManager {
LinkedMultiValueMap<String, Object> addFileMap = new LinkedMultiValueMap<>(); LinkedMultiValueMap<String, Object> addFileMap = new LinkedMultiValueMap<>();
FileEnvelope file = getWordDocument(id.toString(), principal, configLoader); FileEnvelope file = getWordDocument(id.toString(), principal, configLoader);
addFileMap.add("filename", file.getFilename()); String name = file.getFilename().substring(0, file.getFilename().length() - 5);
FileSystemResource fileSystemResource = new FileSystemResource(file.getFile()); File pdfFile = datasetManager.convertToPDF(file, environment);
addFileMap.add("filename", name + ".pdf");
FileSystemResource fileSystemResource = new FileSystemResource(pdfFile);
addFileMap.add("file", fileSystemResource); addFileMap.add("file", fileSystemResource);
HttpEntity<MultiValueMap<String, Object>> addFileMapRequest = new HttpEntity<>(addFileMap, fileHeaders); HttpEntity<MultiValueMap<String, Object>> addFileMapRequest = new HttpEntity<>(addFileMap, fileHeaders);

View File

@ -100,17 +100,8 @@ export class AppComponent implements OnInit {
return appTitle; return appTitle;
}) })
).subscribe((ttl: string) => { ).subscribe((ttl: string) => {
if (ttl.length > 0) { this.translateTitle(ttl);
this.translate.get(ttl).subscribe((translated: string) => { this.translate.onLangChange.subscribe(() => this.translateTitle(ttl));
this.translate.get('GENERAL.TITLES.PREFIX').subscribe((titlePrefix: string) => {
this.titleService.setTitle(titlePrefix + translated);
});
});
} else {
this.translate.get('GENERAL.TITLES.GENERAL').subscribe((translated: string) => {
this.titleService.setTitle(translated);
});
}
}); });
this.statusChangeSubscription = this.ccService.statusChange$.subscribe((event: NgcStatusChangeEvent) => { this.statusChangeSubscription = this.ccService.statusChange$.subscribe((event: NgcStatusChangeEvent) => {
@ -140,6 +131,20 @@ export class AppComponent implements OnInit {
}) })
} }
translateTitle(ttl: string) {
if (ttl.length > 0) {
this.translate.get(ttl).subscribe((translated: string) => {
this.translate.get('GENERAL.TITLES.PREFIX').subscribe((titlePrefix: string) => {
this.titleService.setTitle(titlePrefix + translated);
});
});
} else {
this.translate.get('GENERAL.TITLES.GENERAL').subscribe((translated: string) => {
this.titleService.setTitle(translated);
});
}
}
ngOnDestroy() { ngOnDestroy() {
this.statusChangeSubscription.unsubscribe(); this.statusChangeSubscription.unsubscribe();
} }

View File

@ -1,5 +1,6 @@
<div class="main-content dashboard-main-container h-100" [class.non-auth-main-container]="!this.isAuthenticated()"> <div class="main-content dashboard-main-container h-100" [class.non-auth-main-container]="!this.isAuthenticated()">
<div *ngIf="this.isAuthenticated()" class="container-fluid"> <div *ngIf="this.isAuthenticated()" class="container-fluid">
<div *ngIf="this.dashboardStatisticsData">
<div *ngIf="!this.hasDmps()"> <div *ngIf="!this.hasDmps()">
<div class="main-content"> <div class="main-content">
<div class="col-auto"> <div class="col-auto">
@ -83,7 +84,7 @@
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a> <a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>

View File

@ -199,6 +199,15 @@ input[type="text"] {
padding: 0.3rem 0rem 0.6rem 0rem !important; padding: 0.3rem 0rem 0.6rem 0rem !important;
} }
.empty-list {
text-align: center;
font-weight: 300;
font-size: 1.25rem;
letter-spacing: 0px;
color: #212121;
opacity: 0.6;
}
/* th { /* th {
text-transform: uppercase; text-transform: uppercase;
} }

View File

@ -1,3 +1,6 @@
<div class="col-md-12 d-flex justify-content-center" *ngIf="allRecentActivities == null">
<span class="empty-list">{{'DMP-LISTING.EMPTY-LIST' | translate}}</span>
</div>
<div *ngIf="allRecentActivities != null"> <div *ngIf="allRecentActivities != null">
<div class="d-flex flex-direction-row pt-4"> <div class="d-flex flex-direction-row pt-4">
<!-- Sort by --> <!-- Sort by -->

View File

@ -13,7 +13,7 @@
</div> </div>
<div class="profile-form"> <div class="profile-form">
<mat-form-field *ngIf="!isNewDataset"> <mat-form-field *ngIf="!isNewDataset">
<app-multiple-auto-complete required='true' [formControl]="formGroup.get('profiles')" placeholder="{{'DMP-EDITOR.FIELDS.DATASET-TEMPLATES' | translate}}" [configuration]="profilesAutoCompleteConfiguration"> <app-multiple-auto-complete required='true' [formControl]="formGroup.get('profiles')" placeholder="{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}" [configuration]="profilesAutoCompleteConfiguration">
</app-multiple-auto-complete> </app-multiple-auto-complete>
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')"> <mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
{{formGroup.get('profiles').getError('backendError').message}}</mat-error> {{formGroup.get('profiles').getError('backendError').message}}</mat-error>

View File

@ -7,7 +7,7 @@
<h1 mat-dialog-title class="title">{{'DMP-LISTING.ACTIONS.INVITE-AUTHORS' | translate}}</h1> <h1 mat-dialog-title class="title">{{'DMP-LISTING.ACTIONS.INVITE-AUTHORS' | translate}}</h1>
</div> </div>
<div mat-dialog-content class="row content"> <div mat-dialog-content class="row content">
<mat-form-field class="col pt-0 pb-2 mb-4" appearance="standard"> <mat-form-field class="col pt-0 pb-2 mb-4 search" appearance="standard">
<app-multiple-auto-complete [formControl]="formGroup.get('users')" <app-multiple-auto-complete [formControl]="formGroup.get('users')"
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}" placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
[configuration]="usersAutoCompleteConfiguration"> [configuration]="usersAutoCompleteConfiguration">

View File

@ -28,25 +28,39 @@
border-radius: 4px; border-radius: 4px;
} }
::ng-deep .mat-dialog-container {
.search {
::ng-deep {
.mat-dialog-container {
border-radius: 8px; border-radius: 8px;
} }
.mat-form-field-underline {
::ng-deep .mat-form-field-underline {
display: none; display: none;
} }
.mat-form-field-wrapper {
::ng-deep .mat-form-field-wrapper {
padding: 0em !important; padding: 0em !important;
} }
.mat-form-field-infix {
::ng-deep .mat-form-field-infix {
border: none; border: none;
} }
.align-arrow-right {
::ng-deep .align-arrow-right {
display: none; display: none;
} }
}
}
.select-role {
::ng-deep {
.mat-form-field-outline-start,
.mat-form-field-outline-gap,
.mat-form-field-outline-end {
border: none !important;
}
.mat-form-field-wrapper {
padding: 0em !important;
}
}
}
.invite-btn { .invite-btn {
width: 6.64em; width: 6.64em;
@ -61,7 +75,7 @@
} }
.select-role { .select-role {
width: 16% !important; width: 20% !important;
font-size: 14px; font-size: 14px;
color: #848484; color: #848484;
height: min-content; height: min-content;

View File

@ -8,7 +8,7 @@
<div class="icon-bar3"></div> <div class="icon-bar3"></div>
</div> </div>
<a class="logo"><img src="../../../assets/splash/assets/img/argos-logo-2.svg"></a> <a class="logo"><img src="../../../assets/splash/assets/img/argos-logo-2.svg"></a>
<button class="navbar-toggler ml-auto" type="button" [matMenuTriggerFor]="toggleMenu"> <button class="navbar-toggler ml-auto" type="button" [matMenuTriggerFor]="toggleMenu" (mouseenter)="openMyMenu()">
<mat-icon class="toggle-icon">view_headline</mat-icon> <mat-icon class="toggle-icon">view_headline</mat-icon>
</button> </button>
<div class="collapse navbar-collapse justify-content-end" id="navigation"> <div class="collapse navbar-collapse justify-content-end" id="navigation">
@ -44,7 +44,7 @@
</div> </div>
<mat-menu #toggleMenu="matMenu"> <mat-menu #toggleMenu="matMenu">
<div *ngIf="!(isAuthenticated() && onInvalidUrl())"> <div *ngIf="!(isAuthenticated() && onInvalidUrl())" (mouseleave)="closeMyMenu()">
<ul class="list m-2"> <ul class="list m-2">
<li *ngIf="isAuthenticated();else loginoption" class="d-flex justify-content-center avatar"> <li *ngIf="isAuthenticated();else loginoption" class="d-flex justify-content-center avatar">
<img mat-card-avatar class="my-mat-card-avatar" [src]="this.getPrincipalAvatar()" (error)="this.applyFallbackAvatar($event)" (click)="openProfile()" [matTooltip]="this.getPrincipalName()"> <img mat-card-avatar class="my-mat-card-avatar" [src]="this.getPrincipalAvatar()" (error)="this.applyFallbackAvatar($event)" (click)="openProfile()" [matTooltip]="this.getPrincipalName()">

View File

@ -1,6 +1,6 @@
import { Location } from '@angular/common'; import { Location } from '@angular/common';
import { Component, ElementRef, EventEmitter, OnInit, Output } from '@angular/core'; import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
import { MatDialog } from '@angular/material'; import { MatDialog, MatMenuTrigger } from '@angular/material';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { AppRole } from '@app/core/common/enum/app-role'; import { AppRole } from '@app/core/common/enum/app-role';
import { AuthService } from '@app/core/services/auth/auth.service'; import { AuthService } from '@app/core/services/auth/auth.service';
@ -37,6 +37,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
selectedLanguage = 'en'; selectedLanguage = 'en';
private user: UserListingModel; private user: UserListingModel;
@Output() sidebarToggled: EventEmitter<any> = new EventEmitter(); @Output() sidebarToggled: EventEmitter<any> = new EventEmitter();
@ViewChild(MatMenuTrigger, {static: false}) trigger: MatMenuTrigger;
constructor(location: Location, constructor(location: Location,
private element: ElementRef, private element: ElementRef,
@ -83,6 +84,14 @@ export class NavbarComponent extends BaseComponent implements OnInit {
return this.currentRoute === '/language-editor' || this.currentRoute === '/profile'; return this.currentRoute === '/language-editor' || this.currentRoute === '/profile';
} }
openMyMenu() {
this.trigger.openMenu();
}
closeMyMenu() {
this.trigger.closeMenu();
}
sidebarOpen() { sidebarOpen() {
const toggleButton = this.toggleButton; const toggleButton = this.toggleButton;
const body = document.getElementsByTagName('body')[0]; const body = document.getElementsByTagName('body')[0];

View File

@ -703,6 +703,7 @@
"TEMPLATES": "Vorlagen", "TEMPLATES": "Vorlagen",
"TEMPLATE": "DMP Vorlage", "TEMPLATE": "DMP Vorlage",
"DATASET-TEMPLATES": "Zugehörige Vorlagen für Datensatzbeschreibungen", "DATASET-TEMPLATES": "Zugehörige Vorlagen für Datensatzbeschreibungen",
"SELECT-TEMPLATE": "Select a template to describe your dataset",
"PROFILE": "DMP Vorlage", "PROFILE": "DMP Vorlage",
"PROJECT": "Projekt", "PROJECT": "Projekt",
"GRANT": "Förderung", "GRANT": "Förderung",

View File

@ -774,6 +774,7 @@
"TEMPLATES": "Templates", "TEMPLATES": "Templates",
"TEMPLATE": "DMP Template", "TEMPLATE": "DMP Template",
"DATASET-TEMPLATES": "Related Dataset Description Templates", "DATASET-TEMPLATES": "Related Dataset Description Templates",
"SELECT-TEMPLATE": "Select a template to describe your dataset",
"PROFILE": "DMP Template", "PROFILE": "DMP Template",
"PROJECT": "Project", "PROJECT": "Project",
"GRANT": "Grant", "GRANT": "Grant",
@ -1268,11 +1269,9 @@
"SEARCH": "SEARCH...", "SEARCH": "SEARCH...",
"DATA-MANAGEMENT-PLANS": "DATA MANAGEMENT PLANS", "DATA-MANAGEMENT-PLANS": "DATA MANAGEMENT PLANS",
"PERSONAL-USAGE": "Personal Usage", "PERSONAL-USAGE": "Personal Usage",
"DMPS": "DMPs",
"DATASET-DESCRIPTIONS": "Dataset Descriptions", "DATASET-DESCRIPTIONS": "Dataset Descriptions",
"PUBLIC-DMPS": "Public DMPs", "PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DATASETS": "Public Dataset Descriptions", "PUBLIC-DATASETS": "Public Dataset Descriptions",
"GRANTS": "Grants",
"RELATED-ORGANISATIONS": "Related Organisations", "RELATED-ORGANISATIONS": "Related Organisations",
"DRAFTS": "Drafts", "DRAFTS": "Drafts",
"ALL": "All", "ALL": "All",

File diff suppressed because it is too large Load Diff

View File

@ -768,6 +768,7 @@
"TEMPLATES": "Templates", "TEMPLATES": "Templates",
"TEMPLATE": "Template Σχεδίου Διαχείρισης Δεδομένων", "TEMPLATE": "Template Σχεδίου Διαχείρισης Δεδομένων",
"DATASET-TEMPLATES": "Σχετικά Templates Περιγραφής Συνόλου Δεδομένων", "DATASET-TEMPLATES": "Σχετικά Templates Περιγραφής Συνόλου Δεδομένων",
"SELECT-TEMPLATE": "Select a template to describe your dataset",
"PROFILE": "Template Σχεδίου Διαχείρισης Δεδομένων", "PROFILE": "Template Σχεδίου Διαχείρισης Δεδομένων",
"PROJECT": "Έργο", "PROJECT": "Έργο",
"GRANT": "Επιχορήγηση", "GRANT": "Επιχορήγηση",
@ -1252,7 +1253,6 @@
"DATASET-DESCRIPTIONS": "Περιγραφές Dataset", "DATASET-DESCRIPTIONS": "Περιγραφές Dataset",
"PUBLIC-DMPS": "Public DMPs", "PUBLIC-DMPS": "Public DMPs",
"PUBLIC-DATASETS": "Public Dataset Descriptions", "PUBLIC-DATASETS": "Public Dataset Descriptions",
"GRANTS": "Grants",
"RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί", "RELATED-ORGANISATIONS": "Σχετικοί Οργανισμοί",
"DRAFTS": "Προσχέδια", "DRAFTS": "Προσχέδια",
"ALL": "Όλα", "ALL": "Όλα",

View File

@ -700,6 +700,7 @@
"TEMPLATES": "Şablonlar", "TEMPLATES": "Şablonlar",
"TEMPLATE": "VYP Şablonu", "TEMPLATE": "VYP Şablonu",
"DATASET-TEMPLATES": "İlgili Veriseti Tanım Şablonları", "DATASET-TEMPLATES": "İlgili Veriseti Tanım Şablonları",
"SELECT-TEMPLATE": "Select a template to describe your dataset",
"PROFILE": "VYP Şablonu", "PROFILE": "VYP Şablonu",
"PROJECT": "Proje", "PROJECT": "Proje",
"GRANT": "Hibe", "GRANT": "Hibe",