This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 57659b41 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Umsetzung #67 (Suche nach Typ) nochmals Auswahl aufgehübscht.

parent d0638b72
1 merge request!17Initial Merge to Prepare Release 1.0.0
...@@ -57,15 +57,19 @@ ...@@ -57,15 +57,19 @@
</div> </div>
<div> <div>
<form name="searchForm" class="form-inline"> <form name="searchForm" class="form-inline">
<div class="input-group w-100 mt-3"> <div class="nav-item dropdown">
<table><tr><td><p jhiTranslate="exercise.metadata.type">Type</p></td> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="javascript:void(0);">
</tr><tr *ngFor="let type of typeValues"><td> <span jhiTranslate="exercise.metadata.type">Type</span>
<input </a><span *ngFor="let type of getSelectedTypes(), let isLast=last">{{'exercise.metadata.' + type | translate}}{{isLast ? '' : ', '}}</span>
class="form-check-input" [value]="type" style="align:left" type="checkbox" queryParamName="{{type}}" id="type" <div class="dropdown-menu" style="padding-left: 10px;">
><label class="form-check-label" for="type">{{'exercise.metadata.' + type | translate}}</label> <table><tr *ngFor="let type of typeValues"><td>
</td></tr> <input class="form-check-input" [value]="type" type="checkbox" queryParamName="{{type}}" id="type">
</table> </td><td style="text-align: left;">
</div> <label class="form-check-label" style="display: inline-block;align-items: left" for="type">{{'exercise.metadata.' + type | translate}}</label>
</td></table>
</div>
</div>
</form> </form>
</div> </div>
</ng-container> </ng-container>
......
...@@ -84,6 +84,13 @@ export class SearchInputComponent implements OnInit, OnDestroy { ...@@ -84,6 +84,13 @@ export class SearchInputComponent implements OnInit, OnDestroy {
this.searchInputEvent.emit(this.searchInput); this.searchInputEvent.emit(this.searchInput);
}); });
} }
getSelectedTypes(): string[] {
const result: string[] = [];
this.typeValues.forEach(
type => {if(this.paramGroup.queryParams[type].value) result.push(type)});
return result;
}
ngOnInit(): void {} ngOnInit(): void {}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment