2020-02-11 12:58:51 +01:00
|
|
|
<form
|
|
|
|
[class]="(isDisabled )?'uk-disabled advancedSearchForm uk-tile uk-margin-small-top uk-padding-small':'advancedSearchForm uk-tile uk-margin-small-top uk-padding-small'">
|
2020-01-31 16:12:51 +01:00
|
|
|
<div *ngIf="!simpleView">
|
|
|
|
<div class="uk-article-title custom-article-title uk-text-center">
|
|
|
|
{{pageTitle}}
|
|
|
|
</div>
|
|
|
|
<a *ngIf="simpleSearchLink && simpleSearchLink.length > 0" routerLinkActive="router-link-active"
|
|
|
|
[routerLink]=simpleSearchLink style="z-index:1;"
|
|
|
|
[class]="(isDisabled)?'uk-float-right uk-disabled uk-link-muted portal-link uk-margin-right ':'uk-float-right portal-link uk-margin-right '">Simple search
|
|
|
|
<!--span class="uk-icon">
|
|
|
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="chevron-right" ratio="1"><polyline fill="none" stroke="#000" stroke-width="1.03" points="7 4 13 10 7 16"></polyline></svg>
|
|
|
|
</span-->
|
2018-10-01 17:02:14 +02:00
|
|
|
</a>
|
2020-02-11 12:58:51 +01:00
|
|
|
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
|
|
|
|
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
|
|
|
></quick-selections>
|
2020-01-31 16:12:51 +01:00
|
|
|
<table class=" uk-table uk-table-responsive uk-table-small">
|
|
|
|
<tr *ngFor="let selectedField of selectedFields; let i = index" class="-row ">
|
|
|
|
<td *ngIf="i==0 " class="">Search for:</td>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2020-01-31 16:12:51 +01:00
|
|
|
<td *ngIf="i != 0" class=""><select [(ngModel)]="selectedField.operatorId" name="selectOp_{{i}}">
|
|
|
|
<option *ngFor="let op of operators" (change)="fieldOperatorChanged(i, op.id, op.id)"
|
|
|
|
(click)="fieldOperatorChanged(i, op.id, op.id)" [value]="op.id">{{op.id}}</option>
|
|
|
|
</select></td>
|
|
|
|
<td><select [(ngModel)]="selectedField.id" name="selectField_{{i}}"
|
|
|
|
(ngModelChange)="fieldIdsChanged(i,selectedField.id)"><!--(click)="fieldIdsChanged(i)" -->
|
|
|
|
<option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}} </option>
|
|
|
|
</select></td>
|
|
|
|
<td *ngIf="selectedField.type == 'keyword'"><input type="text" class="form-control"
|
|
|
|
placeholder="Type keywords..."
|
|
|
|
[(ngModel)]="selectedField.value" name="value[{{i}}]"></td>
|
|
|
|
<td *ngIf="selectedField.type == 'date'">
|
|
|
|
<date-filter [(dateValue)]=selectedField.dateValue [(validDateFrom)]=validDateFrom
|
|
|
|
[(validDateTo)]=validDateTo></date-filter>
|
|
|
|
</td>
|
|
|
|
<td *ngIf=" selectedField.id && selectedField.type == 'vocabulary'">
|
|
|
|
<static-autocomplete [(properties)]=properties *ngIf=" selectedField.id" [(vocabularyId)]=selectedField.param
|
|
|
|
[fieldId]=selectedField.id
|
|
|
|
[(list)]=this.fieldList[selectedField.id] [entityName]="entityType"
|
|
|
|
[selectedValue]=selectedField.value [showSelected]=true
|
|
|
|
[placeHolderMessage]="'Search for '+selectedField.name" [title]="selectedField.name"
|
|
|
|
[multipleSelections]=false
|
|
|
|
(selectedValueChanged)="valueChanged($event,i)"
|
|
|
|
(listUpdated)="listUpdated($event,selectedField.id)"></static-autocomplete>
|
|
|
|
</td>
|
|
|
|
<td *ngIf=" selectedField.id && selectedField.type == 'refine'" class="uk-width-1-3">
|
|
|
|
<static-autocomplete [(properties)]=properties [(list)]=this.fieldList[selectedField.id]
|
|
|
|
[fieldId]=selectedField.id [entityName]="entityType" [fieldName]=[selectedField.id]
|
|
|
|
[selectedValue]=selectedField.value [showSelected]=true
|
|
|
|
[placeHolderMessage]="'Search for '+selectedField.name" [title]="selectedField.name"
|
|
|
|
[multipleSelections]=false (selectedValueChanged)="valueChanged($event,i)"
|
|
|
|
(listUpdated)="listUpdated($event,selectedField.id)"></static-autocomplete>
|
|
|
|
</td>
|
|
|
|
<td *ngIf="selectedField.type == 'entity'">
|
|
|
|
<entities-autocomplete [(properties)]=properties [fieldId]=selectedField.id [entityType]=selectedField.param
|
|
|
|
[selectedValue]=selectedField.value [showSelected]=true
|
|
|
|
[placeHolderMessage]="'Search for '+selectedField.name" [title]="selectedField.name"
|
|
|
|
[multipleSelections]=false
|
|
|
|
(selectedValueChanged)="valueChanged($event,i)"
|
|
|
|
(listUpdated)="listUpdated($event,selectedField.id)">
|
|
|
|
</entities-autocomplete>
|
|
|
|
</td>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2020-01-31 16:12:51 +01:00
|
|
|
<td *ngIf="selectedField.type == 'boolean'" class="input-group">
|
2017-12-19 13:53:46 +01:00
|
|
|
<span class="input-group-addon">
|
2020-01-31 16:12:51 +01:00
|
|
|
<input type="radio" [(ngModel)]="selectedField.value" [name]=selectedField.param
|
|
|
|
value="true">Yes<br>
|
2017-12-19 13:53:46 +01:00
|
|
|
</span>
|
2020-01-31 16:12:51 +01:00
|
|
|
<span class="input-group-addon">
|
|
|
|
<input type="radio" [(ngModel)]="selectedField.value" [name]=selectedField.param
|
|
|
|
value="false">No<br>
|
2018-07-26 12:09:06 +02:00
|
|
|
</span>
|
2020-01-31 16:12:51 +01:00
|
|
|
</td>
|
|
|
|
<td class=" ">
|
2020-02-11 12:58:51 +01:00
|
|
|
<span type="button" class="uk-icon-button icon-button-small"
|
2020-01-31 16:12:51 +01:00
|
|
|
(click)="removeField(i)">
|
|
|
|
<span class=""><svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
icon="minus" ratio="0.8"><rect height="1" width="18" y="9"
|
|
|
|
x="1"></rect></svg></span>
|
2017-12-19 13:53:46 +01:00
|
|
|
</span>
|
2020-02-11 12:58:51 +01:00
|
|
|
<!-- <span *ngIf="selectedFields.length == 1" type="button" class="uk-icon-button icon-button-small" disabled>-->
|
|
|
|
<!-- <span class="uk-icon">-->
|
|
|
|
<!-- <svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="minus"-->
|
|
|
|
<!-- ratio="0.8"><rect height="1" width="18" y="9" x="1"></rect></svg>-->
|
|
|
|
<!-- </span>-->
|
|
|
|
<!-- </span>-->
|
2020-01-31 16:12:51 +01:00
|
|
|
<span *ngIf="i == selectedFields.length-1 " type="button" class="uk-icon-button icon-button-small"
|
|
|
|
(click)="addField()">
|
2018-07-19 12:52:29 +02:00
|
|
|
<span class="uk-icon">
|
2020-01-31 16:12:51 +01:00
|
|
|
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="plus"
|
|
|
|
ratio="0.8"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17"
|
|
|
|
height="1"></rect></svg>
|
2018-07-19 12:52:29 +02:00
|
|
|
</span>
|
2017-12-19 13:53:46 +01:00
|
|
|
</span></td>
|
2020-01-31 16:12:51 +01:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<div class=" uk-text-center">
|
|
|
|
<div *ngIf="!validDateFrom && validDateTo" class="uk-text-danger">
|
|
|
|
Please check your <u>from</u> date
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!validDateTo && validDateFrom" class="uk-text-danger">
|
|
|
|
Please check your <u>to</u> date
|
|
|
|
</div>
|
|
|
|
<div *ngIf="!validDateFrom && !validDateTo" class="uk-text-danger">
|
|
|
|
Please check your dates
|
|
|
|
</div>
|
2019-05-22 12:50:32 +02:00
|
|
|
|
2020-01-31 16:12:51 +01:00
|
|
|
<button (click)="queryChanged()" type="submit"
|
|
|
|
class=" uk-button uk-padding uk-padding-remove-top uk-padding-remove-bottom ">
|
|
|
|
<span class="uk-icon"><svg width="30" height="30" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
|
|
|
icon="search" ratio="1.5"><circle fill="none" stroke="#000" stroke-width="1.1" cx="9"
|
|
|
|
cy="9" r="7"></circle><path fill="none"
|
|
|
|
stroke="#000"
|
|
|
|
stroke-width="1.1"
|
|
|
|
d="M14,14 L18,18 L14,14 Z"></path></svg></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="simpleView">
|
2020-02-11 12:58:51 +01:00
|
|
|
<a routerLinkActive="router-link-active"
|
2020-01-31 16:12:51 +01:00
|
|
|
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="advancedSearchLinkParameters"
|
|
|
|
[class]="(isDisabled)?'uk-float-right uk-disabled uk-link-muted portal-link uk-margin-right ':'uk-float-right portal-link uk-margin-right '">Advanced search
|
|
|
|
</a>
|
2020-02-04 14:27:42 +01:00
|
|
|
<search-form *ngIf="selectedFields.length > 0" [isDisabled]="isDisabled" [(keyword)]="selectedFields[0].value"
|
2020-01-31 16:12:51 +01:00
|
|
|
(keywordChange)="simpleKeywordChanged($event)"
|
|
|
|
[placeholderText]="formPlaceholderText"></search-form>
|
2020-02-11 12:58:51 +01:00
|
|
|
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
|
|
|
|
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null">
|
|
|
|
</quick-selections>
|
2020-01-31 16:12:51 +01:00
|
|
|
</div>
|
2017-12-19 13:53:46 +01:00
|
|
|
|
2020-02-11 12:58:51 +01:00
|
|
|
</form>
|