diff --git a/dmp-frontend/src/app/datasets/dataset.component.ts b/dmp-frontend/src/app/datasets/dataset.component.ts index e5334bf43..0836fb96d 100644 --- a/dmp-frontend/src/app/datasets/dataset.component.ts +++ b/dmp-frontend/src/app/datasets/dataset.component.ts @@ -8,7 +8,7 @@ import { Dmp } from '../entities/model/Dmp'; import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4'; @Component({ - selector: 'projects', + selector: 'datasets-table', templateUrl: 'dataset.html', // template: ` //

Projects

@@ -68,6 +68,7 @@ export class DatasetsComponent implements OnInit{ } reloadDatasets(params) { + this.datasetResource = new DataTableResource(this.datasets); this.datasetResource.query(params).then(projects => this.datasets = projects); } diff --git a/dmp-frontend/src/app/datasets/dataset.module.ts b/dmp-frontend/src/app/datasets/dataset.module.ts index 7439526e3..3ac3b0f5f 100644 --- a/dmp-frontend/src/app/datasets/dataset.module.ts +++ b/dmp-frontend/src/app/datasets/dataset.module.ts @@ -19,6 +19,9 @@ import { DatasetRoutingModule } from './dataset-routing.module'; DatasetsComponent //ProjectDetailComponent ], - providers: [ ] + providers: [ ], + exports: [ + DatasetsComponent + ] }) export class DatasetsModule {} \ No newline at end of file diff --git a/dmp-frontend/src/app/modal/modal.component.ts b/dmp-frontend/src/app/modal/modal.component.ts new file mode 100644 index 000000000..05fffc372 --- /dev/null +++ b/dmp-frontend/src/app/modal/modal.component.ts @@ -0,0 +1,76 @@ +import { Component, OnInit, Input, ViewChild, ElementRef } from '@angular/core'; +import { ServerService } from '../../app/services/server.service'; +import { DropdownField } from '../../app/form/fields/dropdown/field-dropdown'; +import { Param } from '../entities/model/param'; +import { Dataset } from '../entities/model/dataset'; +import { DataTable, DataTableTranslations, DataTableResource } from 'angular-4-data-table-bootstrap-4'; + +@Component({ + selector: 'modal', + templateUrl: './modal.html' +}) + +export class ModalComponent implements OnInit { + + @Input() datasetDropDown: DropdownField; + @Input() dataSetVisibe:boolean; + @Input() datasets: Dataset[]; + datasetResource :DataTableResource; + @Input() datasetCount = 0; + + @ViewChild('modalDmps') modalDmps; + + constructor(private serverService: ServerService) { + this.datasetDropDown = new DropdownField(); + this.datasetDropDown.options = []; + this.dataSetVisibe= false; + this.datasets = []; + } + + ngOnInit() { + + this.serverService.listDmpsLabelID().subscribe( + response => { + console.log("response"); + console.log(response); + //let params = new Param(); + response.forEach((dmp) => { + let params = new Param(); + params.key = dmp.id; + params.value = dmp.label; + this.datasetDropDown.options.push(params); + }); + + } + ) + + } + + showDatasets(dmpId, event) { + debugger; + this.dataSetVisibe = true; + this.serverService.getAllDatasets().subscribe( + response => { + console.log("response"); + console.log(response); + //let params = new Param(); + response.forEach((dataset) => { + let dt = new Dataset(); + dt.id = dataset.id; + dt.name = dataset.label; + dt.uriDataset = dataset.uri; + this.datasets.push(dt); + var params = { limit: 8, offset: 0, sortAsc: false } + this.afterLoad(); + this.datasetResource.query(params).then(datasets => this.datasets = datasets); + }); + }); + + } + + afterLoad(){ + this.datasetResource = new DataTableResource(this.datasets); + this.datasetResource.count().then(count => this.datasetCount = count); + } +} + diff --git a/dmp-frontend/src/app/modal/modal.html b/dmp-frontend/src/app/modal/modal.html new file mode 100644 index 000000000..987447324 --- /dev/null +++ b/dmp-frontend/src/app/modal/modal.html @@ -0,0 +1,58 @@ + + + + diff --git a/dmp-frontend/src/app/projects/project.css b/dmp-frontend/src/app/projects/project.css index 320901ed8..526299dad 100644 --- a/dmp-frontend/src/app/projects/project.css +++ b/dmp-frontend/src/app/projects/project.css @@ -7,10 +7,6 @@ background-color: #E4EDF9; } -.fa { - display: inline-block; - font: normal normal normal 14px/1 FontAwesome; - font-size: inherit; - text-rendering: auto; - -webkit-font-smoothing: antialiased; +a.editGridColumn{ + color: #333; } \ 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 63571923c..83205f50a 100644 --- a/dmp-frontend/src/app/projects/project.html +++ b/dmp-frontend/src/app/projects/project.html @@ -1,32 +1,12 @@
- + Filter: + +
+ - + @@ -46,6 +26,14 @@ + + + +
Selected: @@ -53,8 +41,14 @@
+ + + +