Merge branch 'Development' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into Development
This commit is contained in:
commit
fbf788781d
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
|
}
|
|
@ -18,8 +18,8 @@ export class ProjectListingModel implements Serializable<ProjectListingModel> {
|
||||||
this.reference = item.reference;
|
this.reference = item.reference;
|
||||||
this.uri = item.uri;
|
this.uri = item.uri;
|
||||||
this.status = item.status;
|
this.status = item.status;
|
||||||
this.startDate = item.startdate;
|
this.startDate = new Date(item.startdate);
|
||||||
this.endDate = item.enddate;
|
this.endDate = new Date(item.enddate);
|
||||||
this.description = item.description;
|
this.description = item.description;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -11,7 +11,7 @@ export class ProjectModel implements Serializable<ProjectModel> {
|
||||||
public abbreviation: String;
|
public abbreviation: String;
|
||||||
public reference: String;
|
public reference: String;
|
||||||
public uri: String;
|
public uri: String;
|
||||||
public status: Status;
|
public status: Status = Status.Active;
|
||||||
public startDate: Date;
|
public startDate: Date;
|
||||||
public endDate: Date;
|
public endDate: Date;
|
||||||
public description: String;
|
public description: String;
|
||||||
|
|
|
@ -9,3 +9,14 @@
|
||||||
.navbar-button {
|
.navbar-button {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.user-label {
|
||||||
|
padding: 0 0 0 5px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-title {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<mat-toolbar color="primary">
|
<mat-toolbar color="primary">
|
||||||
{{'NAV-BAR.TITLE' | translate}}
|
<a class="app-title" routerLink="/">{{'NAV-BAR.TITLE' | translate}}</a>
|
||||||
<span class="navbar-spacer"></span>
|
<div *ngIf="isAuthenticated()">
|
||||||
<div *ngIf="isAuthenticated()">
|
<button mat-button class="navbar-button" routerLink="/projects">{{'NAV-BAR.PROJECTS' | translate}}</button>
|
||||||
<a mat-button class="navbar-button" routerLink="/forms">Forms</a>
|
<button mat-button class="navbar-button" routerLink="/dmps">{{'NAV-BAR.DMPS' | translate}}</button>
|
||||||
<!-- <a mat-button *ngIf="isAdmin()" class="navbar-button" routerLink="/configuration">Configuration</a>
|
<button mat-button class="navbar-button" routerLink="/datadets">{{'NAV-BAR.DATASETS' | translate}}</button>
|
||||||
<a mat-button *ngIf="isAdmin()" class="navbar-button" routerLink="/users">Users</a>
|
</div>
|
||||||
--><button mat-icon-button class="navbar-icon" (click)="logout()"><mat-icon class="navbar-icon">exit_to_app</mat-icon></button>
|
<span class="navbar-spacer"></span>
|
||||||
</div>
|
<div *ngIf="isAuthenticated()">
|
||||||
</mat-toolbar>
|
<span class="user-label">{{this.getPrincipalName()}}</span>
|
||||||
|
<button mat-icon-button class="navbar-icon" (click)="logout()">
|
||||||
|
<mat-icon class="navbar-icon">exit_to_app</mat-icon>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</mat-toolbar>
|
|
@ -18,7 +18,7 @@ export class NavigationComponent {
|
||||||
public logout(): void {
|
public logout(): void {
|
||||||
this.authentication.logout();
|
this.authentication.logout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public isAuthenticated(): boolean {
|
public isAuthenticated(): boolean {
|
||||||
return !(!this.authentication.current())
|
return !(!this.authentication.current())
|
||||||
}
|
}
|
||||||
|
@ -33,4 +33,10 @@ export class NavigationComponent {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getPrincipalName(): string {
|
||||||
|
const principal: Principal = this.authentication.current();
|
||||||
|
if (principal) { return principal.name; }
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,10 +8,20 @@
|
||||||
"MESSAGE": "Are you sure you want to delete this item?",
|
"MESSAGE": "Are you sure you want to delete this item?",
|
||||||
"POSITIVE": "Yes",
|
"POSITIVE": "Yes",
|
||||||
"NEGATIVE": "Cancel"
|
"NEGATIVE": "Cancel"
|
||||||
|
},
|
||||||
|
"SNACK-BAR": {
|
||||||
|
"SUCCESSFUL-CREATION": "Created Successfully",
|
||||||
|
"SUCCESSFUL-LOGIN": "Successful Login",
|
||||||
|
"SUCCESSFUL-LOGOUT": "Successful Logout",
|
||||||
|
"UNSUCCESSFUL-LOGOUT": "Unsuccessful Logout",
|
||||||
|
"UNSUCCESSFUL-LOGIN": "Unsuccessful Login"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"NAV-BAR": {
|
"NAV-BAR": {
|
||||||
"TITLE": "DMPS"
|
"TITLE": "Data Management Plans",
|
||||||
|
"PROJECTS": "Projects",
|
||||||
|
"DMPS": "Plans",
|
||||||
|
"DATASETS": "Datasets"
|
||||||
},
|
},
|
||||||
"PROJECT-LISTING": {
|
"PROJECT-LISTING": {
|
||||||
"TITLE": "Projects",
|
"TITLE": "Projects",
|
||||||
|
@ -80,7 +90,7 @@
|
||||||
"DESCRIPTION": "Description",
|
"DESCRIPTION": "Description",
|
||||||
"ORGANISATIONS": "Organisations",
|
"ORGANISATIONS": "Organisations",
|
||||||
"RESEARCHERS": "Researchers",
|
"RESEARCHERS": "Researchers",
|
||||||
"PROFILES":"Profiles"
|
"PROFILES": "Profiles"
|
||||||
},
|
},
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
"SAVE": "Save",
|
"SAVE": "Save",
|
||||||
|
|
Loading…
Reference in New Issue