2017-12-19 13:53:46 +01:00
2018-06-01 14:28:49 +02:00
< form [ class ] = " ( isDisabled ) ? ' uk-disabled advancedSearchForm uk-tile uk-margin-small-top ' : ' advancedSearchForm uk-tile uk-margin-small-top ' " >
< table class = " uk-table uk-table-responsive uk-table-small" >
2017-12-19 13:53:46 +01:00
< tr * ngFor = "let selectedField of selectedFields; let i = index" class = "-row " >
< td * ngIf = "i==0 " class = "" > Search for:< / td >
< 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 > < / date-filter >
< / td >
< td * ngIf = " selectedField.id && selectedField.type == 'vocabulary'" >
2018-02-05 14:14:59 +01:00
< static-autocomplete [ ( properties ) ] = properties * ngIf = " selectedField.id" [ ( vocabularyId ) ] = selectedField . param [ fieldId ] = selectedField . id
2017-12-19 13:53:46 +01:00
[(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'" >
2018-02-05 14:14:59 +01:00
< 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
2017-12-19 13:53:46 +01:00
[placeHolderMessage] = "'Search for '+selectedField.name" [title] = "selectedField.name" [multipleSelections]=false
(selectedValueChanged)="valueChanged($event,i)" (listUpdated) = "listUpdated($event,selectedField.id)" >
< / entities-autocomplete > < / td >
< td * ngIf = "selectedField.type == 'boolean'" class = "input-group" >
< span class = "input-group-addon" >
< input type = "radio" [ ( ngModel ) ] = " selectedField . value " [ name ] = selectedField . param value = "true" > Yes< br >
< / span >
< span class = "input-group-addon" >
< input type = "radio" [ ( ngModel ) ] = " selectedField . value " [ name ] = selectedField . param value = "false" > No< br >
< / span >
< / td >
< td class = " " >
< span * ngIf = "selectedFields.length > 1" type = "button" class = "uk-icon-button" ( click ) = " removeField ( i ) " >
2018-05-09 15:54:30 +02:00
< span class = "" > < svg width = "20" height = "20" viewBox = "0 0 20 20" xmlns = "http://www.w3.org/2000/svg" icon = "minus" ratio = "1" > < rect height = "3" width = "18" y = "9" x = "2" > < / rect > < / svg > < / span >
2017-12-19 13:53:46 +01:00
< / span >
< span * ngIf = "selectedFields.length == 1" type = "button" class = "uk-icon-button" disabled >
2018-05-09 15:54:30 +02:00
< span class = "uk-icon" > < svg width = "20" height = "20" viewBox = "0 0 20 20" xmlns = "http://www.w3.org/2000/svg" icon = "minus" ratio = "1" > < rect height = "3" width = "18" y = "9" x = "1" > < / rect > < / svg > < / span >
2017-12-19 13:53:46 +01:00
< / span >
< / td >
< td * ngIf = "i == selectedFields.length-1 " class = " " > < span type = "button" class = "uk-icon-button" ( click ) = " addField ( ) " >
2018-05-09 15:54:30 +02:00
< span > < svg width = "20" height = "20" viewBox = "0 0 20 20" xmlns = "http://www.w3.org/2000/svg" icon = "plus" ratio = "1" > < rect x = "9" y = "1" width = "3" height = "17" > < / rect > < rect x = "1" y = "9" width = "17" height = "3" > < / rect > < / svg > < / span >
2017-12-19 13:53:46 +01:00
< / span > < / td >
< / tr >
< / table >
< div class = "-row uk-text-right" >
2018-06-01 14:28:49 +02:00
< button ( click ) = " queryChanged ( ) " type = "submit" class = "uk-button uk-button-danger" > Search< / button >
2017-12-19 13:53:46 +01:00
< / div >
< / form >