minor fixes

This commit is contained in:
annampak 2017-11-01 14:01:14 +02:00
parent ce829dafc7
commit 63d509d0cb
6 changed files with 38 additions and 25 deletions

View File

@ -32,7 +32,7 @@ export class DatasetsComponent implements OnInit {
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers
@ -50,10 +50,10 @@ export class DatasetsComponent implements OnInit {
@Input() datasetCount = 0;
@Input() dmpIdforDatasets: string;
@Input() dmpLabelforDatasets: string;
@Input() statusDropDown: DropdownField;
dataset: any;
saveAndDescribe:boolean;
//@ViewChild(DataTable) projectsTable;
dataSetValue: boolean
@Input()
@ -86,6 +86,9 @@ export class DatasetsComponent implements OnInit {
this.datasetProfileDropDown = new DropdownField();
this.datasetProfileDropDown.options = [];
this.saveAndDescribe = false;
this.statusDropDown = new DropdownField();
this.statusDropDown.options =[];
this.statusDropDown.options= [{key:'0', value:"active"},{key:'1', value:"inactive"}]
}

View File

@ -2,13 +2,19 @@
<table class="table table-striped" [mfData]="tableData | dmpTableFilter : filterQuery"
#mf="mfDataTable" [mfRowsOnPage]="rowsOnPage" [(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<table class="table table-striped" [mfData]="tableData | dmpTableFilter : filterQuery" #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
[(mfSortBy)]="sortBy" [(mfSortOrder)]="sortOrder">
<thead>
<tr>
<th colspan="1">
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter' />
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Search in Labels' />
</th>
<th colspan="1">
<!-- <input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' /> -->
<select class="form-control" [id]="statusid" [(ngModel)]="statusDropDownkey" [name]="statusDropDown"
#datasetfield >
<option *ngFor="let opt of statusDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</th>
<th>
<button class="btn btn-default" (click)="refreshTable($event)">
@ -62,7 +68,7 @@
<tfoot>
<tr>
<td colspan="5">
<button type="button" class="btn btn-info btncustom" (click) = "newDataset(item)" >New Dataset</button>
<button type="button" class="btn btn-info btncustom" (click)="newDataset(item)">New Dataset</button>
<mfBootstrapPaginator [rowsOnPageSet]="[5,20,40]"></mfBootstrapPaginator>
</td>
</tr>
@ -84,21 +90,22 @@
<form #newProjectForm="ngForm" (ngSubmit)="SaveNewDmp()">
<div class="form-group">
<label for="recipient-name" class="col-form-label">Dataset Profile:</label>
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown" #datasetfield>
<select class="form-control" [id]="datasetProfileDropDownKey" [(ngModel)]="dataset.profile" [name]="datasetProfileDropDown"
#datasetfield>
<option *ngFor="let opt of datasetProfileDropDown.options" [value]="opt.key">{{opt.value}}</option>
</select>
</div>
<div class="form-group">
<label for="label-name" class="form-control-label">Label:</label>
<input type="text" class="form-control" id="label-name" [(ngModel)]= "dataset.label" name = "label">
<input type="text" class="form-control" id="label-name" [(ngModel)]="dataset.label" name="label">
</div>
<div class="form-group">
<label for="abbreviation-text" class="form-control-label">DMP:</label>
<input class="form-control" id="abbreviation-text" [(ngModel)]= "dataset.dmp" name = "dmp" disabled>
<input class="form-control" id="abbreviation-text" [(ngModel)]="dataset.dmp" name="dmp" disabled>
</div>
<div class="form-group">
<label for="uri-text" class="form-control-label">Uri:</label>
<input class="form-control" id="uri-text" [(ngModel)]= "dataset.uri" name = "uri">
<input class="form-control" id="uri-text" [(ngModel)]="dataset.uri" name="uri">
</div>
<!-- <div class="form-group">
<label for="start-date" class="form-control-label">Properties:</label>

View File

@ -37,7 +37,7 @@ export class DmpComponent implements OnInit{
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers

View File

@ -7,6 +7,8 @@
<tr>
<th colspan="1">
<input class="form-control" [(ngModel)]="filterQuery" placeholder='Filter' />
</th>
<th colspan="1">
<input class="form-control" [(ngModel)]="versionFilter" placeholder='Filter' />
</th>
<th>

View File

@ -37,7 +37,7 @@ export class ProjectsComponent implements OnInit{
//required by the table
public filterQuery = "";
public rowsOnPage = 10;
//public sortBy = "email";
public sortBy = "label";
public sortOrder = "asc";
//visibility rules for containers

View File

@ -26,6 +26,7 @@ export class GlobalInterceptor implements HttpInterceptor {
    auth2.signOut().then(function () {
      console.log('User signed out.');
localStorage.removeItem('currentUser');
this.router.navigate(['/login-page']);
    });
this.tokenService.setToken(null);
//EDW VALE TO KWDIKA GIA TO LOGOUT KAI SXOLIASE TON OPOU ALLOU TON EXEIS