2020-02-13 15:44:51 +01:00
|
|
|
<div *ngIf="!simpleView">
|
2020-08-13 13:15:10 +02:00
|
|
|
<a *ngIf="showSwitchSearchLink && simpleSearchLink && simpleSearchLink.length > 0"
|
|
|
|
routerLinkActive="router-link-active"
|
2020-02-13 15:44:51 +01:00
|
|
|
[routerLink]=simpleSearchLink style="z-index:1;"
|
2020-11-23 17:08:36 +01:00
|
|
|
[queryParams]="customFilter?customFilter.getParameters():{}"
|
2020-02-13 15:44:51 +01:00
|
|
|
[class]="(isDisabled)?'uk-float-right uk-disabled uk-link-muted portal-link uk-margin-right ':'uk-float-right portal-link uk-margin-right '">Quick search
|
|
|
|
</a>
|
2020-10-13 21:04:50 +02:00
|
|
|
<h6 class="uk-margin-small-bottom">
|
2020-02-13 15:44:51 +01:00
|
|
|
Advanced search in
|
|
|
|
<entities-selection [simpleView]="false" [currentEntity]="entityType"
|
2020-04-03 18:00:19 +02:00
|
|
|
[properties]="properties" [customFilter]="customFilter" ></entities-selection>
|
2020-02-13 15:44:51 +01:00
|
|
|
|
2020-10-13 21:04:50 +02:00
|
|
|
</h6>
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
|
|
|
<form *ngIf="!simpleView"
|
2020-02-25 16:40:56 +01:00
|
|
|
[class]="((isDisabled )?'uk-disabled ':'')
|
|
|
|
+' advancedSearchForm uk-tile uk-padding-small uk-margin-medium-bottom'">
|
2020-02-13 15:44:51 +01:00
|
|
|
<div>
|
|
|
|
|
|
|
|
|
2020-06-01 11:02:16 +02:00
|
|
|
<!-- <quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
|
2020-02-11 12:58:51 +01:00
|
|
|
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
2020-04-23 09:33:23 +02:00
|
|
|
[properties]="properties" class="uk-grid "
|
2020-02-11 12:58:51 +01:00
|
|
|
></quick-selections>
|
2020-06-01 11:02:16 +02:00
|
|
|
<hr *ngIf="resultTypes || quickFilter" class="uk-margin-small">-->
|
2020-02-25 16:40:56 +01:00
|
|
|
<table class=" uk-table uk-table-responsive uk-table-small uk-margin-remove">
|
|
|
|
<tr>
|
|
|
|
<td class="uk-text-muted uk-text-uppercase">Field to search</td>
|
2020-03-17 17:16:21 +01:00
|
|
|
<td class="uk-text-muted uk-text-uppercase uk-width-1-2">Term</td>
|
2020-02-25 16:40:56 +01:00
|
|
|
</tr>
|
2020-07-10 10:37:17 +02:00
|
|
|
<tr *ngFor="let selectedField of selectedFields; let i = index">
|
2020-06-01 11:02:16 +02:00
|
|
|
<td><mat-select [(ngModel)]="selectedField.id" name="selectField_{{i}}" [disableOptionCentering]="true" class="matSelection" panelClass="matSelectionPanel"
|
2020-01-31 16:12:51 +01:00
|
|
|
(ngModelChange)="fieldIdsChanged(i,selectedField.id)"><!--(click)="fieldIdsChanged(i)" -->
|
2020-03-05 14:21:01 +01:00
|
|
|
<mat-option *ngFor="let id of fieldIds" [value]="id">{{fieldIdsMap[id].name}} </mat-option>
|
|
|
|
</mat-select></td>
|
2021-02-10 10:05:37 +01:00
|
|
|
<td *ngIf="selectedField.type == 'keyword' || selectedField.type == 'identifier'">
|
2020-03-04 13:42:52 +01:00
|
|
|
<div class="uk-inline uk-width-expand">
|
2020-02-25 16:40:56 +01:00
|
|
|
<a *ngIf="selectedField.value.length > 0" class="uk-form-icon uk-form-icon-flip"
|
|
|
|
(click)="selectedField.value = ''"
|
|
|
|
uk-icon="icon: close"></a>
|
2020-07-10 10:37:17 +02:00
|
|
|
<input type="text" class="form-control uk-input"
|
2020-02-25 16:40:56 +01:00
|
|
|
placeholder="Type keywords..."
|
|
|
|
[(ngModel)]="selectedField.value" name="value[{{i}}]">
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</td>
|
2020-01-31 16:12:51 +01:00
|
|
|
<td *ngIf="selectedField.type == 'date'">
|
2020-03-05 14:21:01 +01:00
|
|
|
<date-filter [dateValue]=selectedField.dateValue [validDateFrom]=validDateFrom class="uk-width-expand"
|
2020-02-25 16:40:56 +01:00
|
|
|
[validDateTo]=validDateTo></date-filter>
|
2020-01-31 16:12:51 +01:00
|
|
|
</td>
|
|
|
|
<td *ngIf=" selectedField.id && selectedField.type == 'vocabulary'">
|
2020-02-25 16:40:56 +01:00
|
|
|
<static-autocomplete [properties]=properties *ngIf=" selectedField.id" [vocabularyId]=selectedField.param
|
2020-01-31 16:12:51 +01:00
|
|
|
[fieldId]=selectedField.id
|
2020-02-25 16:40:56 +01:00
|
|
|
[list]=this.fieldList[selectedField.id] [entityName]="entityType"
|
2020-01-31 16:12:51 +01:00
|
|
|
[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">
|
2020-02-25 16:40:56 +01:00
|
|
|
<static-autocomplete [properties]=properties [list]=this.fieldList[selectedField.id]
|
2020-01-31 16:12:51 +01:00
|
|
|
[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)"
|
2020-07-21 14:41:08 +02:00
|
|
|
(listUpdated)="listUpdated($event,selectedField.id)"
|
|
|
|
(updateValueLabel)="updatedValueLabel($event, i)"></static-autocomplete>
|
2020-01-31 16:12:51 +01:00
|
|
|
</td>
|
|
|
|
<td *ngIf="selectedField.type == 'entity'">
|
2020-02-25 16:40:56 +01:00
|
|
|
<entities-autocomplete [properties]=properties [fieldId]=selectedField.id [entityType]=selectedField.param
|
2020-01-31 16:12:51 +01:00
|
|
|
[selectedValue]=selectedField.value [showSelected]=true
|
|
|
|
[placeHolderMessage]="'Search for '+selectedField.name" [title]="selectedField.name"
|
|
|
|
[multipleSelections]=false
|
|
|
|
(selectedValueChanged)="valueChanged($event,i)"
|
2020-07-21 14:41:08 +02:00
|
|
|
(updateValueLabel)="updatedValueLabel($event, i)">
|
2020-01-31 16:12:51 +01:00
|
|
|
</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>
|
2020-03-05 14:21:01 +01:00
|
|
|
<td style="min-width: 75px;"><mat-select *ngIf="i+1 <selectedFields.length"
|
2020-03-04 13:42:52 +01:00
|
|
|
[(ngModel)]="selectedFields[i+1].operatorId"
|
2020-03-05 14:21:01 +01:00
|
|
|
name="selectOp_{{i}}" [disableOptionCentering]="true" class="matSelection uk-input" panelClass="matSelectionPanel">
|
|
|
|
<mat-option *ngFor="let op of operators" (change)="fieldOperatorChanged(i+1, op.id, op.id)"
|
|
|
|
(click)="fieldOperatorChanged(i+1, op.id, op.id)" [value]="op.id">{{op.id}}</mat-option>
|
|
|
|
</mat-select>
|
2020-02-25 16:40:56 +01:00
|
|
|
<div *ngIf="i == selectedFields.length-1 " class=" uk-text-right" style="margin-top: 55px;">
|
|
|
|
<span class="uk-text-muted uk-text-uppercase uk-margin-small-right " > Add rule</span>
|
|
|
|
</div>
|
|
|
|
</td>
|
2020-01-31 16:12:51 +01:00
|
|
|
<td class=" ">
|
2020-03-17 17:16:21 +01:00
|
|
|
<span type="button" class="uk-icon-button portal-button-reverse clickable "
|
2020-01-31 16:12:51 +01:00
|
|
|
(click)="removeField(i)">
|
2020-07-21 14:41:08 +02:00
|
|
|
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
|
|
|
xmlns="http://www.w3.org/2000/svg" data-svg="minus"><rect height="1" width="18" y="9" x="1"></rect></svg></span>
|
2017-12-19 13:53:46 +01:00
|
|
|
</span>
|
2020-02-25 16:40:56 +01:00
|
|
|
<div *ngIf="i == selectedFields.length-1 " class="uk-margin-small-top">
|
|
|
|
<span type="button"
|
2020-03-17 17:16:21 +01:00
|
|
|
class="uk-icon-button portal-button clickable "
|
2020-01-31 16:12:51 +01:00
|
|
|
(click)="addField()">
|
2020-07-21 14:41:08 +02:00
|
|
|
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20"
|
|
|
|
xmlns="http://www.w3.org/2000/svg" data-svg="plus"><rect x="9" y="1" width="1" height="17"></rect><rect x="1" y="9" width="17" height="1"></rect></svg></span>
|
2020-02-25 16:40:56 +01:00
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</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>
|
|
|
|
</div>
|
2020-02-25 16:40:56 +01:00
|
|
|
<button (click)="queryChanged()" type="submit"
|
|
|
|
class=" uk-button uk-padding uk-padding-remove-top uk-padding-remove-bottom portal-button uk-padding uk-padding-remove-top uk-padding-remove-bottom " style="position: absolute;bottom: -19px;left: 45%;"> Search
|
|
|
|
</button>
|
2020-01-31 16:12:51 +01:00
|
|
|
</div>
|
2020-02-11 12:58:51 +01:00
|
|
|
</form>
|
2020-02-13 15:44:51 +01:00
|
|
|
<div *ngIf="simpleView">
|
2022-04-12 16:20:51 +02:00
|
|
|
<form>
|
|
|
|
<div class="uk-margin-small-bottom uk-flex uk-flex-right" *ngIf="showSwitchSearchLink">
|
|
|
|
<a *ngIf ="this.entityType !='all' && this.entityType == this.selectedEntity && advancedSearchLink"
|
|
|
|
[routerLink]="advancedSearchLink" [queryParams]="advancedSearchLinkParameters"
|
|
|
|
[ngClass]="(isDisabled)?'uk-disabled uk-link-muted':null">Advanced search
|
|
|
|
</a>
|
|
|
|
<a *ngIf =" this.entityType !='all' && this.entityType != this.selectedEntity && selectedEntityAdvancedUrl "
|
|
|
|
[routerLink]="selectedEntityAdvancedUrl"
|
|
|
|
[queryParams]="{q:this.selectedFields[0].value,op:'and'}"
|
|
|
|
[ngClass]="(isDisabled)?'uk-disabled uk-link-muted':null">Advanced search
|
|
|
|
</a>
|
|
|
|
<ng-container *ngIf="this.entityType=='all'">
|
|
|
|
<a>Advanced Search</a>
|
|
|
|
<div uk-dropdown class="uk-dropdown">
|
|
|
|
<ul class="uk-list uk-margin-remove-bottom">
|
|
|
|
<li><a
|
2020-06-29 13:10:32 +02:00
|
|
|
[routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="advancedSearchLinkParameters"
|
2022-04-12 16:20:51 +02:00
|
|
|
>Research
|
|
|
|
outcomes</a></li>
|
|
|
|
<li><a
|
2020-06-29 13:10:32 +02:00
|
|
|
[routerLink]="properties.searchLinkToAdvancedProjects" [queryParams]="advancedSearchLinkParameters" >
|
2022-04-12 16:20:51 +02:00
|
|
|
Projects</a></li>
|
|
|
|
<li><a
|
2020-06-29 13:10:32 +02:00
|
|
|
[routerLink]="properties.searchLinkToAdvancedDataProviders" [queryParams]="advancedSearchLinkParameters">
|
2022-04-12 16:20:51 +02:00
|
|
|
Content providers</a></li>
|
|
|
|
<li><a
|
2020-06-29 13:10:32 +02:00
|
|
|
[routerLink]="properties.searchLinkToAdvancedOrganizations" [queryParams]="advancedSearchLinkParameters">
|
2022-04-12 16:20:51 +02:00
|
|
|
Organizations</a></li>
|
|
|
|
</ul>
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
2022-04-12 16:20:51 +02:00
|
|
|
</ng-container>
|
|
|
|
</div>
|
|
|
|
<div class="uk-flex uk-flex-center">
|
|
|
|
<div *ngIf="entitiesSelection">
|
|
|
|
<entities-selection [simpleView]="true" [currentEntity]="entityType"
|
|
|
|
[properties]="properties"
|
|
|
|
(selectionChange)=" simpleEntityChanged($event)"
|
|
|
|
[onChangeNavigate]="true" [customFilter]="customFilter"></entities-selection>
|
|
|
|
</div>
|
|
|
|
<div *ngIf="selectedFields[0] && entitiesSelection" search-input [disabled]="isDisabled" [(value)]="selectedFields[0].value"
|
|
|
|
[placeholder]="formPlaceholderText" (searchEmitter)="simpleKeywordChanged()" class="uk-width-xlarge@l uk-width-large"></div>
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|