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">
|
2020-07-14 15:13:44 +02:00
|
|
|
<form [class]="((isDisabled )?'uk-disabled ':'') + ' uk-margin-medium-bottom uk-margin-top' ">
|
2020-06-29 15:15:52 +02:00
|
|
|
<div class="uk-grid uk-margin-small-left uk-flex" [class.uk-flex-center]="entityType != 'community' && entityType !== 'stakeholder'">
|
2020-03-26 13:19:48 +01:00
|
|
|
<div
|
2020-03-27 13:39:18 +01:00
|
|
|
[class]="((entitiesSelection)?'':'uk-width-small@s')+' uk-margin-small-top uk-padding-remove-left'">
|
2020-02-25 16:40:56 +01:00
|
|
|
<entities-selection *ngIf="entitiesSelection" [simpleView]="true" [currentEntity]="entityType"
|
2020-02-13 15:44:51 +01:00
|
|
|
[properties]="properties"
|
2020-03-05 14:21:01 +01:00
|
|
|
(selectionChange)=" simpleEntityChanged($event)"
|
2020-04-03 18:00:19 +02:00
|
|
|
[onChangeNavigate]="true" [customFilter]="customFilter"></entities-selection>
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
2020-05-11 11:37:00 +02:00
|
|
|
<div class="uk-padding-remove-left uk-margin-small-top">
|
2020-02-13 15:44:51 +01:00
|
|
|
<div class="uk-inline">
|
|
|
|
<a *ngIf="selectedFields[0].value.length > 0" class="uk-form-icon uk-form-icon-flip"
|
|
|
|
(click)="selectedFields[0].value = ''"
|
|
|
|
uk-icon="icon: close"></a>
|
2020-02-25 16:40:56 +01:00
|
|
|
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
|
2020-02-13 15:44:51 +01:00
|
|
|
[placeholder]="formPlaceholderText" aria-describedby="sizing-addon2"
|
|
|
|
[(ngModel)]="selectedFields[0].value" name="keyword">
|
|
|
|
</div>
|
2020-06-01 11:02:16 +02:00
|
|
|
<!-- <div class=" uk-width-xlarge@l uk-width-large@m uk-width-medium" [class.quickSelectionsBox]="(resultTypes || quickFilter)">
|
2020-02-13 15:44:51 +01:00
|
|
|
<quick-selections [resultTypes]="resultTypes" (typeChange)="queryChanged()" [isDisabled]="isDisabled"
|
|
|
|
[quickFilter]="quickFilter" [QFselected]="(quickFilter)?quickFilter.selected:null"
|
|
|
|
[properties]="properties">
|
|
|
|
</quick-selections>
|
2020-06-01 11:02:16 +02:00
|
|
|
</div>-->
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
2020-03-26 13:19:48 +01:00
|
|
|
<div class="uk-padding-remove-left uk-margin-small-top">
|
2020-02-13 15:44:51 +01:00
|
|
|
<button (click)="simpleKeywordChanged(null)" type="submit"
|
|
|
|
class=" uk-button portal-button uk-margin-small-left uk-text-bold uk-padding uk-padding-remove-top uk-padding-remove-bottom">
|
|
|
|
Search
|
|
|
|
</button>
|
2020-08-13 13:15:10 +02:00
|
|
|
<div class="uk-margin-small-top" *ngIf="showSwitchSearchLink">
|
2020-06-29 13:10:32 +02:00
|
|
|
<a *ngIf ="this.entityType !='all' && this.entityType == this.selectedEntity && advancedSearchLink" routerLinkActive="router-link-active"
|
2020-02-13 15:44:51 +01:00
|
|
|
[routerLink]="advancedSearchLink" style="z-index:1;" [queryParams]="advancedSearchLinkParameters"
|
|
|
|
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
|
|
|
</a>
|
2020-06-29 13:10:32 +02:00
|
|
|
<a *ngIf =" this.entityType !='all' && this.entityType != this.selectedEntity && selectedEntityAdvancedUrl "
|
|
|
|
routerLinkActive="router-link-active"
|
2020-02-13 15:44:51 +01:00
|
|
|
[routerLink]="selectedEntityAdvancedUrl" style="z-index:1;"
|
|
|
|
[queryParams]="{q:this.selectedFields[0].value,op:'and'}"
|
|
|
|
[class]="(isDisabled)?' uk-disabled uk-link-muted portal-link uk-margin-left ':' portal-link uk-margin-left '">Advanced search
|
|
|
|
</a>
|
2020-06-29 13:10:32 +02:00
|
|
|
<a *ngIf="this.entityType=='all'" class="portal-link uk-margin-left">Advanced Search</a>
|
|
|
|
<div *ngIf="this.entityType =='all'" uk-dropdown class="uk-dropdown default-dropdown">
|
|
|
|
<ul class="uk-list uk-margin-remove-bottom">
|
|
|
|
<li><a
|
|
|
|
[routerLink]="properties.searchLinkToAdvancedResults" [queryParams]="advancedSearchLinkParameters"
|
|
|
|
>Research
|
|
|
|
outcomes</a></li>
|
|
|
|
<li><a
|
|
|
|
[routerLink]="properties.searchLinkToAdvancedProjects" [queryParams]="advancedSearchLinkParameters" >
|
|
|
|
Projects</a></li>
|
|
|
|
<li><a
|
|
|
|
[routerLink]="properties.searchLinkToAdvancedDataProviders" [queryParams]="advancedSearchLinkParameters">
|
|
|
|
Content providers</a></li>
|
|
|
|
<li><a
|
|
|
|
[routerLink]="properties.searchLinkToAdvancedOrganizations" [queryParams]="advancedSearchLinkParameters">
|
|
|
|
Organizations</a></li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-02-13 15:44:51 +01:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|