Skip to content

Content List v1.4.3

Phil Taylor requested to merge patch/content_lists_v1.4.3 into master

Done:

  • Added field and operator to the search. This allows the page to have select boxes to define the operator (equals, contains, begins with, ends with) and a singular field to search on.

Note:

Test:

  1. Confirm the admin area works with this version of content list
  2. Edit one of the admin content lists and add select boxes to define the operator and field. Something like:
<select class="js__search_operator" for="{{id}}" name="search_operator">
    <option value="=" {{#if-equals search.operator "="}} selected="selected" {{/if-equals}}>Equal</option>
    <option value="~" {{#if-equals search.operator "~"}} selected="selected" {{/if-equals}}>Contains</option>
    <option value="^" {{#if-equals search.operator "^"}} selected="selected" {{/if-equals}}>Begins With</option>
    <option value="$" {{#if-equals search.operator "$"}} selected="selected" {{/if-equals}}>Ends With</option>
</select>

<input class="content_list__search js__search" type="text" for="{{id}}" value="{{search.value}}" autocomplete="on" placeholder="{{search.placeholder}}">

<select class="js__search_field" for="{{id}}" name="search_field">
    <option value="q" {{#if-equals search.field "q"}} selected="selected" {{/if-equals}}>All</option>
    <option value="field_name" {{#if-equals search.field "field_name"}} selected="selected" {{/if-equals}}>Field Name</option>
</select>
  1. Confirm the admin area works with a range of operator and field searches
Edited by Phil Taylor

Merge request reports