From fc1c6b90d0c99257bd9fb9bec46ca09b3624476c Mon Sep 17 00:00:00 2001 From: Nikolaos Laskaris Date: Fri, 24 Nov 2017 18:21:08 +0200 Subject: [PATCH] changes on dmp-details and project-details --- dmp-frontend/src/app/app.module.ts | 2 - .../src/app/projects/project.detail.ts | 33 --- dmp-frontend/src/app/projects/project.html | 4 +- .../src/app/services/server.service.ts | 53 +++-- .../dmp-detailed/dmp-detailed.component.css | 26 ++- .../dmp-detailed/dmp-detailed.component.html | 67 +++++- .../dmp-detailed/dmp-detailed.component.ts | 43 +++- .../project-detailed.component.css | 213 +++++++++++++++++- .../project-detailed.component.html | 83 ++++++- .../project-detailed.component.ts | 47 +++- 10 files changed, 487 insertions(+), 84 deletions(-) delete mode 100644 dmp-frontend/src/app/projects/project.detail.ts diff --git a/dmp-frontend/src/app/app.module.ts b/dmp-frontend/src/app/app.module.ts index e0ebc2023..b0a007294 100644 --- a/dmp-frontend/src/app/app.module.ts +++ b/dmp-frontend/src/app/app.module.ts @@ -62,7 +62,6 @@ import { DmpVersionFilterPipe } from './pipes/dmp-version-filter.pipe'; import { ProjectTableFilterPipe } from './pipes/project-table-filter.pipe'; import { ProjectsComponent } from './projects/projects.component'; -import { ProjectDetailComponent } from './projects/project.detail'; import { ModalComponent } from './modal/modal.component'; import { NgDatepickerModule } from 'ng2-datepicker'; @@ -91,7 +90,6 @@ import { ProjectDetailedComponent } from './viewers/project-detailed/project-det PageNotFoundComponent, HomepageComponent, ModalComponent, - ProjectDetailComponent, ProjectsComponent, DmpComponent, DatasetsComponent, diff --git a/dmp-frontend/src/app/projects/project.detail.ts b/dmp-frontend/src/app/projects/project.detail.ts deleted file mode 100644 index cf4c3f839..000000000 --- a/dmp-frontend/src/app/projects/project.detail.ts +++ /dev/null @@ -1,33 +0,0 @@ -import 'rxjs/add/operator/switchMap'; -import { Component, OnInit, HostBinding } from '@angular/core'; -import { Observable } from 'rxjs/Observable'; -import { Router, ActivatedRoute, ParamMap } from '@angular/router'; - -@Component({ - template: ` -
-

"{{ project.name }}"

-
- {{ project.id }}
-
- - -
-
- ` -}) -export class ProjectDetailComponent implements OnInit { - - - constructor( - private route: ActivatedRoute, - private router: Router, - ) {} - - ngOnInit() { - // this.hero$ = this.route.paramMap - // .switchMap((params: ParamMap) => - // this.service.getHero(params.get('id'))); - } - -} \ No newline at end of file diff --git a/dmp-frontend/src/app/projects/project.html b/dmp-frontend/src/app/projects/project.html index 2dfdaac4a..8824f61f8 100644 --- a/dmp-frontend/src/app/projects/project.html +++ b/dmp-frontend/src/app/projects/project.html @@ -55,8 +55,8 @@ {{project?.id}} {{(project?.label?.length > 40) ? (project?.label | slice:0:40)+'...':(project?.label) }} {{project?.abbreviation}} - {{project?.startdate | date:'yyyy-MM-dd HH:mm:ss Z' }} - {{project?.enddate | date:'yyyy-MM-dd HH:mm:ss Z'}} + {{project?.startdate | date:'medium' }} + {{project?.enddate | date:'medium'}} {{project?.status | statusToString}} {{(project?.description?.length > 40) ? (project?.description | slice:0:40)+'...':(project?.description) }} diff --git a/dmp-frontend/src/app/services/server.service.ts b/dmp-frontend/src/app/services/server.service.ts index 7aa80645c..e85195dbb 100644 --- a/dmp-frontend/src/app/services/server.service.ts +++ b/dmp-frontend/src/app/services/server.service.ts @@ -57,6 +57,11 @@ export class ServerService { return this.restBase.get("dmps/"+dmpid, {"eager": true}); } + public getDmpHistory(dmpid: string){ + return this.restBase.get("dmp/history/"+dmpid); + } + + public listDmpIDs(){ return this.restBase.get("dmps"); } @@ -97,6 +102,10 @@ export class ServerService { return this.restBase.post("project/update", data); } + public getDmpsOfProject(projectID: string){ + return this.restBase.get("project/dmps", {"id":projectID}); + } + public getAllDataSet(){ return this.restBase.get("dataset/getAll"); } @@ -123,31 +132,35 @@ export class ServerService { public getDatasetForDmp(data:any){ return this.restBase.post("dmp/getdatasets", data); -} + } -public createDatasetForDmp(data:any){ - return this.restBase.post("dataset/create", data); -} + public createDatasetForDmp(data:any){ + return this.restBase.post("dataset/create", data); + } -public getAllDatsetsProfile(){ - return this.restBase.get("datasetprofile/getAll"); -} + public getAllDatsetsProfile(){ + return this.restBase.get("datasetprofile/getAll"); + } -public getDatasetProfileByID(id){ - return this.restBase.get("datasetprofiles/"+id); -} + public getDatasetProfileByID(id){ + return this.restBase.get("datasetprofiles/"+id); + } -public updateDatsetsProfile(data:any){ - return this.restBase.post("dataset/update", data); -} - -public deleteDataset(dataset: any){ - return this.restBase.post("dataset/softdelete", dataset); -} + public updateDatsetsProfile(data:any){ + return this.restBase.post("dataset/update", data); + } + + public deleteDataset(dataset: any){ + return this.restBase.post("dataset/softdelete", dataset); + } -public whoami(){ - return this.restBase.get("user/whoami"); -} + public getUserByID(id : string){ + return this.restBase.get("users/"+id); + } + + public whoami(){ + return this.restBase.get("user/whoami"); + } /* diff --git a/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.css b/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.css index 33fb3a6b2..984ae07b0 100644 --- a/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.css +++ b/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.css @@ -1,20 +1,27 @@ /* START - FOR DETAILS MODALS */ +.modal-content { + overflow-y: scroll; +} + .modal.modal-fullscreen .modal-dialog, .modal.modal-fullscreen .modal-content { position: absolute; - left: 1%; - right: 1%; - top: 1%; - bottom: 1%; + left: 15%; + right: 15%; + top: 5%; + bottom: 5%; } .modal.modal-fullscreen .modal-dialog { margin: 0; - width: 98%; + width: 70%; animation-duration:0.5s; } .modal.modal-fullscreen .modal-content { + -moz-border-radius: 20px; + border-radius: 20px; + /* border: none; -moz-border-radius: 0; border-radius: 0; @@ -22,6 +29,7 @@ -moz-box-shadow: inherit; -o-box-shadow: inherit; box-shadow: inherit; + */ /* change bg color below */ /* background:#1abc9c; */ } @@ -43,4 +51,10 @@ .modal.modal-fullscreen.force-fullscreen .modal-footer { bottom: 0; } -/* END - FOR DETAILS MODALS */ \ No newline at end of file +/* END - FOR DETAILS MODALS */ + + +.row { + padding-top:30px; + padding-bottom:30px; +} \ No newline at end of file diff --git a/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.html b/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.html index d4a59e9cd..baf72769a 100644 --- a/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.html +++ b/dmp-frontend/src/app/viewers/dmp-detailed/dmp-detailed.component.html @@ -1,18 +1,75 @@