Skip to content

Commit

Permalink
Implement different FilterTypes for ListBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
danrot committed Feb 12, 2020
1 parent 85055c4 commit fe791d2
Show file tree
Hide file tree
Showing 29 changed files with 868 additions and 74 deletions.
Expand Up @@ -3,11 +3,11 @@
<key>target_groups</key>

<properties>
<property name="id" filter-type="integer" translation="sulu_admin.id" type="string">
<property name="id" translation="sulu_admin.id" type="string">
<field-name>id</field-name>
<entity-name>%sulu.model.target_group.class%</entity-name>
</property>
<property name="title" filter-type="string" translation="sulu_admin.title" visibility="always">
<property name="title" filter-type="text" translation="sulu_admin.title" visibility="always">
<field-name>title</field-name>
<entity-name>%sulu.model.target_group.class%</entity-name>
</property>
Expand All @@ -23,7 +23,7 @@
</property>
<property
name="priority"
filter-type="integer"
filter-type="number"
translation="sulu_audience_targeting.priority"
visibility="yes"
>
Expand All @@ -33,7 +33,6 @@
<group-concat-property
name="webspaceKeys"
visibility="no"
filter-type="tags"
translation="sulu_page.webspaces"
glue=", "
>
Expand Down
Expand Up @@ -3,7 +3,7 @@
<key>target_groups_selection</key>

<properties>
<property name="title" filter-type="string" translation="sulu_admin.title" visibility="always">
<property name="title" filter-type="text" translation="sulu_admin.title" visibility="always">
<field-name>title</field-name>
<entity-name>%sulu.model.target_group.class%</entity-name>
</property>
Expand Down
39 changes: 19 additions & 20 deletions src/Sulu/Bundle/ContactBundle/Resources/config/lists/accounts.xml
Expand Up @@ -41,7 +41,7 @@

<property
name="number"
filter-type="string"
filter-type="text"
translation="sulu_contact.number"
>
<field-name>number</field-name>
Expand All @@ -52,7 +52,7 @@
name="name"
visibility="always"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.name"
>
<field-name>name</field-name>
Expand All @@ -61,7 +61,7 @@

<property
name="corporation"
filter-type="string"
filter-type="text"
translation="sulu_contact.corporation"
>
<field-name>corporation</field-name>
Expand All @@ -70,7 +70,7 @@

<property
name="city"
filter-type="string"
filter-type="text"
visibility="always"
translation="sulu_contact.city"
>
Expand All @@ -82,7 +82,7 @@

<property
name="zip"
filter-type="string"
filter-type="text"
visibility="no"
translation="sulu_contact.zip"
>
Expand All @@ -94,7 +94,7 @@

<property
name="street"
filter-type="string"
filter-type="text"
translation="sulu_contact.street"
>
<field-name>street</field-name>
Expand All @@ -103,7 +103,7 @@
<joins ref="address"/>
</property>

<property name="streetNumber" filter-type="string" translation="sulu_contact.number">
<property name="streetNumber" filter-type="text" translation="sulu_contact.number">
<field-name>number</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

Expand All @@ -112,7 +112,7 @@

<concatenation-property
name="addressLine"
filter-type="string"
filter-type="text"
translation="sulu_contact.address_line"
sortable="false"
glue=" "
Expand All @@ -123,7 +123,7 @@

<property
name="state"
filter-type="string"
filter-type="text"
visibility="no"
translation="sulu_contact.state"
>
Expand All @@ -135,7 +135,7 @@

<property
name="countryCode"
filter-type="string"
filter-type="text"
visibility="no"
translation="sulu_contact.country"
>
Expand All @@ -147,7 +147,7 @@

<concatenation-property
name="mainContact"
filter-type="string"
filter-type="text"
translation="sulu_contact.main_contact"
sortable="false"
glue=" "
Expand All @@ -167,7 +167,7 @@
</field>
</concatenation-property>

<property name="mainPhone" filter-type="string" translation="sulu_contact.phone">
<property name="mainPhone" filter-type="text" translation="sulu_contact.phone">
<field-name>mainPhone</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>
Expand All @@ -176,19 +176,19 @@
name="mainEmail"
visibility="always"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.email"
>
<field-name>mainEmail</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>

<property name="mainFax" filter-type="string" translation="sulu_contact.fax">
<property name="mainFax" filter-type="text" translation="sulu_contact.fax">
<field-name>mainFax</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>

<property name="mainUrl" filter-type="string" translation="sulu_contact.website">
<property name="mainUrl" filter-type="text" translation="sulu_contact.website">
<field-name>mainUrl</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>
Expand All @@ -203,19 +203,19 @@
<entity-name>%sulu.model.account.class%</entity-name>
</property>

<property name="id" filter-type="integer" translation="sulu_admin.id" type="string">
<property name="id" translation="sulu_admin.id" type="string">
<field-name>id</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>

<property name="uid" filter-type="string" translation="sulu_contact.uid" type="string">
<property name="uid" translation="sulu_contact.uid" type="string">
<field-name>uid</field-name>
<entity-name>%sulu.model.account.class%</entity-name>
</property>

<property
name="registerNumber"
filter-type="string"
filter-type="text"
translation="sulu_contact.register_number"
type="string"
>
Expand All @@ -225,7 +225,7 @@

<property
name="placeOfJurisdiction"
filter-type="string"
filter-type="text"
translation="sulu_contact.jurisdiction"
type="string"
>
Expand All @@ -236,7 +236,6 @@
<group-concat-property
name="tagIds"
visibility="never"
filter-type="tags"
translation="sulu_tag.tags"
glue=","
>
Expand Down
49 changes: 26 additions & 23 deletions src/Sulu/Bundle/ContactBundle/Resources/config/lists/contacts.xml
Expand Up @@ -46,7 +46,7 @@
<concatenation-property
name="fullName"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.name"
sortable="false"
glue=" "
Expand All @@ -59,7 +59,7 @@
name="firstName"
visibility="always"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.first_name"
>
<field-name>firstName</field-name>
Expand All @@ -70,7 +70,7 @@
name="lastName"
visibility="always"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.last_name"
>
<field-name>lastName</field-name>
Expand All @@ -81,7 +81,7 @@
name="mainEmail"
visibility="always"
searchability="yes"
filter-type="string"
filter-type="text"
translation="sulu_contact.email"
>
<field-name>mainEmail</field-name>
Expand All @@ -100,8 +100,12 @@
</joins>
</property>

<identity-property name="accountId" visibility="never" filter-type="auto-complete"
translation="sulu_contact.organization">
<identity-property
name="accountId"
visibility="never"
filter-type="selection"
translation="sulu_contact.organization"
>
<field-name>account</field-name>
<entity-name>SuluContactBundle:AccountContact</entity-name>

Expand All @@ -117,28 +121,28 @@
</filter-type-parameters>
</identity-property>

<property name="city" visibility="always" filter-type="string" translation="sulu_contact.city">
<property name="city" visibility="always" filter-type="text" translation="sulu_contact.city">
<field-name>city</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

<joins ref="address"/>
</property>

<property name="zip" filter-type="string" translation="sulu_contact.zip">
<property name="zip" filter-type="text" translation="sulu_contact.zip">
<field-name>zip</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

<joins ref="address"/>
</property>

<property name="street" filter-type="string" translation="sulu_contact.street">
<property name="street" filter-type="text" translation="sulu_contact.street">
<field-name>street</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

<joins ref="address"/>
</property>

<property name="number" filter-type="string" translation="sulu_contact.number">
<property name="number" filter-type="text" translation="sulu_contact.number">
<field-name>number</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

Expand All @@ -147,7 +151,7 @@

<concatenation-property
name="addressLine"
filter-type="string"
filter-type="text"
translation="sulu_contact.address_line"
sortable="false"
glue=" "
Expand All @@ -156,36 +160,36 @@
<field property-ref="number"/>
</concatenation-property>

<property name="state" filter-type="string" translation="sulu_contact.state">
<property name="state" filter-type="text" translation="sulu_contact.state">
<field-name>state</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

<joins ref="address"/>
</property>

<property name="countryCode" filter-type="string" translation="sulu_contact.country">
<property name="countryCode" filter-type="text" translation="sulu_contact.country">
<field-name>countryCode</field-name>
<entity-name>SuluContactBundle:Address</entity-name>

<joins ref="address"/>
</property>

<property name="mainPhone" visibility="always" filter-type="string" translation="sulu_contact.phone">
<property name="mainPhone" visibility="always" filter-type="text" translation="sulu_contact.phone">
<field-name>mainPhone</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property name="id" filter-type="integer" translation="sulu_admin.id" type="string">
<property name="id" translation="sulu_admin.id" type="text">
<field-name>id</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property name="mainFax" filter-type="string" translation="sulu_contact.fax">
<property name="mainFax" filter-type="text" translation="sulu_contact.fax">
<field-name>mainFax</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property name="mainUrl" filter-type="string" translation="sulu_contact.website">
<property name="mainUrl" filter-type="text" translation="sulu_contact.website">
<field-name>mainUrl</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>
Expand All @@ -200,7 +204,7 @@
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property name="birthday" filter-type="date" translation="sulu_contact.birthday" type="date">
<property name="birthday" filter-type="datetime" translation="sulu_contact.birthday" type="date">
<field-name>birthday</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>
Expand All @@ -220,7 +224,7 @@
<identity-property
name="titleId"
visibility="never"
filter-type="auto-complete"
filter-type="selection"
translation="sulu_contact.title"
>
<field-name>title</field-name>
Expand All @@ -234,19 +238,19 @@
</filter-type-parameters>
</identity-property>

<property name="salutation" filter-type="string" translation="sulu_contact.salutation">
<property name="salutation" filter-type="text" translation="sulu_contact.salutation">
<field-name>salutation</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property name="formOfAddress" filter-type="string" translation="sulu_contact.form_of_address">
<property name="formOfAddress" filter-type="text" translation="sulu_contact.form_of_address">
<field-name>formOfAddress</field-name>
<entity-name>%sulu.model.contact.class%</entity-name>
</property>

<property
name="position"
filter-type="string"
filter-type="text"
translation="sulu_contact.position"
sortable="false"
>
Expand All @@ -268,7 +272,6 @@
<group-concat-property
name="tagIds"
visibility="never"
filter-type="tags"
translation="sulu_tag.tags"
glue=","
>
Expand Down

0 comments on commit fe791d2

Please sign in to comment.