dataset style

This commit is contained in:
annampak 2017-12-20 14:23:44 +02:00
parent 5d00d133c4
commit 013e0916f5
5 changed files with 30 additions and 19 deletions

View File

@ -6,18 +6,19 @@
<mat-card-content> <mat-card-content>
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{'DATASET-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" formControlName="label" required> <input matInput placeholder="{{'DATASET-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" formControlName="label"
required>
<mat-error *ngIf="formGroup.get('label').errors?.backendError">{{baseErrorModel.label}}</mat-error> <mat-error *ngIf="formGroup.get('label').errors?.backendError">{{baseErrorModel.label}}</mat-error>
<mat-error *ngIf="formGroup.get('label').errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="formGroup.get('label').errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{'DATASET-EDITOR.FIELDS.PROFILE' | translate}}" type="text" name="profile" formControlName="profile" <input matInput placeholder="{{'DATASET-EDITOR.FIELDS.PROFILE' | translate}}" type="text" formControlName="profile" required>
required>
<mat-error *ngIf="formGroup.get('profile').errors?.backendError">{{baseErrorModel.profile}}</mat-error> <mat-error *ngIf="formGroup.get('profile').errors?.backendError">{{baseErrorModel.profile}}</mat-error>
<mat-error *ngIf="formGroup.get('profile').errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error> <mat-error *ngIf="formGroup.get('profile').errors?.required">{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
</mat-form-field> </mat-form-field>
<mat-form-field> <mat-form-field>
<input matInput placeholder="{{'DATASET-EDITOR.FIELDS.URI' | translate}}" type="text" name="uri" formControlName="uri" required> <input matInput placeholder="{{'DATASET-EDITOR.FIELDS.URI' | translate}}" type="text" name="uri" formControlName="uri" required>
<mat-error *ngIf="formGroup.get('uri').errors?.backendError">{{baseErrorModel.uri}}</mat-error> <mat-error *ngIf="formGroup.get('uri').errors?.backendError">{{baseErrorModel.uri}}</mat-error>
@ -85,18 +86,18 @@
</td-chips> </td-chips>
<td-chips color="accent" [items]="filteredServices" formControlName="services" placeholder="{{'DATASET-EDITOR.FIELDS.SERVICES' | translate}}" <td-chips color="accent" [items]="filteredServices" formControlName="services" placeholder="{{'DATASET-EDITOR.FIELDS.SERVICES' | translate}}"
(inputChange)="filteredServices($event)" requireMatch> (inputChange)="filteredServices($event)" requireMatch>
<ng-template td-chip let-chip="chip"> <ng-template td-chip let-chip="chip">
<div class="tc-grey-100 bgc-teal-700" td-chip-avatar>{{chip.label.substring(0, 1).toUpperCase()}}</div> <div class="tc-grey-100 bgc-teal-700" td-chip-avatar>{{chip.label.substring(0, 1).toUpperCase()}}</div>
{{chip.name}} {{chip.name}}
</ng-template> </ng-template>
<ng-template td-autocomplete-option let-option="option"> <ng-template td-autocomplete-option let-option="option">
<div layout="row" layout-align="start center"> <div layout="row" layout-align="start center">
{{option.name}} {{option.name}}
</div> </div>
</ng-template> </ng-template>
<mat-progress-bar [style.height.px]="2" *ngIf="filteringResearchersAsync" mode="indeterminate"></mat-progress-bar> <mat-progress-bar [style.height.px]="2" *ngIf="filteringResearchersAsync" mode="indeterminate"></mat-progress-bar>
</td-chips> </td-chips>
<div layout="row" class="full-width text-right" align="end"> <div layout="row" class="full-width text-right" align="end">
<button mat-raised-button color="primary" (click)="cancel()" type="button">{{'DATASET-EDITOR.ACTIONS.CANCEL' | translate}}</button> <button mat-raised-button color="primary" (click)="cancel()" type="button">{{'DATASET-EDITOR.ACTIONS.CANCEL' | translate}}</button>

View File

@ -1,4 +1,4 @@
<form class="form-criteria"> <form class="dataset-criteria">
<mat-card class="mat-card"> <mat-card class="mat-card">
<div class="row"> <div class="row">
<!-- <div class="col-sm-6 col-md-2"> <!-- <div class="col-sm-6 col-md-2">
@ -15,14 +15,14 @@
<mat-datepicker #periodStartPicker></mat-datepicker> <mat-datepicker #periodStartPicker></mat-datepicker>
</mat-form-field> </mat-form-field>
</div> --> </div> -->
<div class="col-sm-6 col-md-2"> <div class="col-md-6">
<mat-form-field> <mat-form-field>
<input matInput placeholder=" {{'CRITERIA.PROJECTS.LIKE'| translate}}" name="datasetCriteriaName" [(ngModel)]="criteria.like" <input matInput placeholder=" {{'CRITERIA.PROJECTS.LIKE'| translate}}" name="datasetCriteriaName" [(ngModel)]="criteria.like"
(ngModelChange)="controlModified()"> (ngModelChange)="controlModified()">
<mat-error *ngIf="baseErrorModel?.name">{{baseErrorModel['Criteria.like']}}</mat-error> <mat-error *ngIf="baseErrorModel?.name">{{baseErrorModel['Criteria.like']}}</mat-error>
</mat-form-field> </mat-form-field>
</div> </div>
<div class="col-sm-6 col-md-2"> <div class="col-md-6">
<mat-form-field> <mat-form-field>
<mat-select placeholder=" {{'CRITERIA.DATA-SETS.STATUS'| translate}}" name="datasetCriteriastatus" [(ngModel)]="criteria.status" <mat-select placeholder=" {{'CRITERIA.DATA-SETS.STATUS'| translate}}" name="datasetCriteriastatus" [(ngModel)]="criteria.status"
(ngModelChange)="controlModified()"> (ngModelChange)="controlModified()">

View File

@ -0,0 +1,10 @@
.dataset-criteria {
mat-form-field {
padding-bottom: 5px;
width: 100%;
}
mat-card {
padding-bottom: 0px;
}
}

View File

@ -10,7 +10,7 @@ import { DatasetCriteria } from '../../../../models/criteria/dataset/DatasetCrit
@Component({ @Component({
selector: 'app-datasets-criteria-component', selector: 'app-datasets-criteria-component',
templateUrl: './datasets-criteria.component.html', templateUrl: './datasets-criteria.component.html',
styleUrls: ['./datasets-criteria.component.css'], styleUrls: ['./datasets-criteria.component.scss'],
providers: [ providers: [
] ]
}) })