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

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

Fixing Parent Contraint

parent f0ba0061
Branches
2 merge requests!188Merging Peer Reviewing et. al to Master,!164211 peer reviewing functionality
......@@ -50,8 +50,8 @@
<div class="input-group w-100 mt-3">
<input type="text" class="form-control" queryParamName="author" name="author" [ngbTypeahead]="autoCompleteContributorCreator"
placeholder="{{ 'search.filters.author' | translate }}"/>
<ng-template #helpauthorContritbutors data-container="body"> {{ 'search.help.authorContritbutors' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpauthorContritbutors" container="body" [icon]="questionIcon"></fa-icon>
<ng-template #helpauthorContributors data-container="body"> {{ 'search.help.authorContributors' | translate}}</ng-template>
<fa-icon style="padding: 10px 0px 0px 10px;" [ngbTooltip]="helpauthorContributors" container="body" [icon]="questionIcon"></fa-icon>
</div>
</form>
</div>
......@@ -66,9 +66,11 @@
</div>
</form>
</div>
<div>
<div *ngIf="searchInput.metadata.parentId">
<form name="searchForm" class="form-inline">
<div class="input-group w-100 mt-3"><span jhiTranslate="search.filters.parentId"></span>: {{searchInput.metadata.parentId}}
<ng-template #helpParent data-container="body"> {{ 'search.help.helpParent' | translate}}</ng-template>
<fa-icon style="padding: 1px 0px 0px 1px;float:right;" [ngbTooltip]="helpParent" container="body" [icon]="crossIcon" (click)="clearParentId()"></fa-icon>
</div>
</form>
</div>
......
......@@ -5,7 +5,7 @@ import { QueryParam, QueryParamBuilder, QueryParamGroup } from '@ngqp/core';
import { takeUntil } from 'rxjs/operators';
import { SearchInput } from 'app/shared/model/search/search-input.model';
import { SearchService } from '../service/search-service';
import { faQuestion } from '@fortawesome/free-solid-svg-icons';
import { faQuestion, faEraser } from '@fortawesome/free-solid-svg-icons';
import { Observable } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, switchMap } from 'rxjs/operators';
......@@ -31,6 +31,8 @@ export class SearchInputComponent implements OnInit, OnDestroy {
languageValues = Object.keys(ILanguages);
questionIcon = faQuestion;
crossIcon = faEraser;
public paramGroup: QueryParamGroup;
private componentDestroyed$ = new Subject<void>();
......@@ -134,6 +136,10 @@ export class SearchInputComponent implements OnInit, OnDestroy {
public onPageChange(page: number): void {
this.pageParam.setValue(page);
}
public clearParentId(): void {
this.searchInput.metadata.parentId = "";
}
/*
public itemSelected(): void {
......
......@@ -7,9 +7,10 @@
"fulltext": "dieses Feld sucht im Titel, der Beschreibung und den Schlüsselwörtern (Präfixsuche)",
"programmingLanguage": "Bitte geben die gewünschte Programmiersprache ein (Präfixsuche)",
"keywords": "Suche nach relevanten Schlüsselwörtern (Präfixsuche)",
"authorContritbutors": "Suche nach Autoren (und Beitragenden) (Präfixsuche)",
"authorContributors": "Suche nach Autoren (und Beitragenden) (Präfixsuche)",
"license": "Suche nach Lizenztyp (Präfixsuche)",
"formats": "Suche nach dem gewünschten Format (z.B latex, pdf etc.)"
"formats": "Suche nach dem gewünschten Format (z.B latex, pdf etc.)",
"helpParent": "Einschränkung aufheben"
},
"noResults": "Keine Suchergebnisse gefunden.",
"noResultsAnonymous": "Sie finden vielleicht mehr Resultate, wenn Sie sich anmelden",
......
......@@ -7,9 +7,10 @@
"fulltext": "this field searches in all the title, the decription, and the keywords (prefix search)",
"programmingLanguage": "please enter the programming language (prefix search)",
"keywords": "please enter relevant keywords (prefix search)",
"authorContritbutors": "please enter authors or contributors (prefix search)",
"authorContributors": "please enter authors or contributors (prefix search)",
"license": "please enter a license type (prefix search)",
"formats": "search for the wanted format (e.g. latex, pdf etc.)"
"formats": "search for the wanted format (e.g. latex, pdf etc.)",
"helpParent": "reset the parent constraint"
},
"noResults": "No results found.",
"noResultsAnonymous": "You may find more results, if logged in",
......
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