{% load i18n %}
<!-- ko if: $data.search -->
<div class="col-md-4 col-lg-3">
    <select class="resources" data-bind="
        attr: {'data-label': node.label},
        select2Query: {
            select2Config:{
                data: [
                    { text: '=', id: 'eq' },
                    { text: '&gt;', id: 'gt' },
                    { text: '&lt;', id: 'lt' },
                    { text: '&ge;', id: 'gte' },
                    { text: '&le;', id: 'lte' },
                    { text: $root.translations.hasNoValue, id: 'null' },
                    { text: $root.translations.hasAnyValue, id: 'not_null' },
                ],
                value: op
            }}">
    </select>
</div>

<div class="col-md-8 col-lg-9" data-bind="visible: op() !== 'null' && op() !== 'not_null'">
    <input 
        class="form-control input-lg widget-input" 
        data-bind="
            attr: {placeholder: $root.translations.date, 'aria-label': node.label},
            value: searchValue, 
            datepicker: {format: dateFormat, viewMode: 'days', minDate: false, maxDate: false}
        "
    >
</div>
<!-- /ko -->


<!-- ko ifnot: $data.search -->
<div class="control-label">
    <span data-bind="text: $root.translations.dateFormat"></span>
</div>
<div class="col-xs-12 pad-no crud-widget-container">
    <select data-bind="
        attr: {'data-label': $root.translations.dateFormat},
        select2Query: {
            select2Config:{
                value: dateFormat,
                data: dateFormatOptions,
                allowClear: false,
                minimumResultsForSearch: -1,
                placeholder: $root.translations.dateFormat
        }}">
    </select>
</div>
<!-- /ko -->