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<>();
FileEnvelope file = getWordDocument(id.toString(), principal, configLoader);
addFileMap.add("filename", file.getFilename());
FileSystemResource fileSystemResource = new FileSystemResource(file.getFile());
String name = file.getFilename().substring(0, file.getFilename().length() - 5);
File pdfFile = datasetManager.convertToPDF(file, environment);
addFileMap.add("filename", name + ".pdf");
FileSystemResource fileSystemResource = new FileSystemResource(pdfFile);
addFileMap.add("file", fileSystemResource);
HttpEntity<MultiValueMap<String, Object>> addFileMapRequest = new HttpEntity<>(addFileMap, fileHeaders);

View File

@ -100,17 +100,8 @@ export class AppComponent implements OnInit {
return appTitle;
})
).subscribe((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);
});
}
this.translateTitle(ttl);
this.translate.onLangChange.subscribe(() => this.translateTitle(ttl));
});
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() {
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 *ngIf="this.isAuthenticated()" class="container-fluid">
<div *ngIf="this.dashboardStatisticsData">
<div *ngIf="!this.hasDmps()">
<div class="main-content">
<div class="col-auto">
@ -83,7 +84,7 @@
<a href="#" class="link-disabled">{{'DASHBOARD.RELATED-ORGANISATIONS' | translate}}</a>
</div>
</div>
</div>
</div>
</div>

View File

@ -199,6 +199,15 @@ input[type="text"] {
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 {
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 class="d-flex flex-direction-row pt-4">
<!-- Sort by -->

View File

@ -13,7 +13,7 @@
</div>
<div class="profile-form">
<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>
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
{{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>
</div>
<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')"
placeholder="{{'INVITATION-EDITOR.AUTOCOMPLETE-USER-EMAIL' | translate}}"
[configuration]="usersAutoCompleteConfiguration">

View File

@ -28,24 +28,38 @@
border-radius: 4px;
}
::ng-deep .mat-dialog-container {
.search {
::ng-deep {
.mat-dialog-container {
border-radius: 8px;
}
::ng-deep .mat-form-field-underline {
}
.mat-form-field-underline {
display: none;
}
::ng-deep .mat-form-field-wrapper {
}
.mat-form-field-wrapper {
padding: 0em !important;
}
::ng-deep .mat-form-field-infix {
}
.mat-form-field-infix {
border: none;
}
.align-arrow-right {
display: none;
}
}
}
::ng-deep .align-arrow-right {
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 {
@ -61,7 +75,7 @@
}
.select-role {
width: 16% !important;
width: 20% !important;
font-size: 14px;
color: #848484;
height: min-content;

View File

@ -8,7 +8,7 @@
<div class="icon-bar3"></div>
</div>
<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>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navigation">
@ -44,7 +44,7 @@
</div>
<mat-menu #toggleMenu="matMenu">
<div *ngIf="!(isAuthenticated() && onInvalidUrl())">
<div *ngIf="!(isAuthenticated() && onInvalidUrl())" (mouseleave)="closeMyMenu()">
<ul class="list m-2">
<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()">

View File

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

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

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

View File

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