0012234: add salutation filter
authorsstamer <s.stamer@metaways.de>
Tue, 4 Oct 2016 11:56:53 +0000 (13:56 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 5 Oct 2016 09:20:06 +0000 (11:20 +0200)
https://forge.tine20.org/view.php?id=12234

Change-Id: Iabcc304e66604d1966927db520a6459be8c8de8c
Reviewed-on: http://gerrit.tine20.com/customers/3639
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
Tested-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Addressbook/Model/ContactFilter.php
tine20/Addressbook/js/Model.js

index 0c5ba58..73c5977 100644 (file)
@@ -119,7 +119,7 @@ class Addressbook_Model_ContactFilter extends Tinebase_Model_Filter_FilterGroup
         'showDisabled'         => array('filter' => 'Addressbook_Model_ContactDisabledFilter', 'options' => array(
             'requiredCols'  => array('account_id' => 'accounts.id')
         )),
-        
+        'salutation'           => array('filter' => 'Tinebase_Model_Filter_Text'),
         //'bday'               => array('filter' => 'Tinebase_Model_Filter_Date'),
     );
 }
index 8c12dfb..ad89ea0 100644 (file)
@@ -182,7 +182,15 @@ Tine.Addressbook.Model.Contact.getFilterModel = function() {
         {label: _('Last Modified Time'),                                                field: 'last_modified_time', valueType: 'date'},
         {label: _('Last Modified By'),                                                  field: 'last_modified_by',   valueType: 'user'},
         {label: _('Creation Time'),                                                     field: 'creation_time',      valueType: 'date'},
-        {label: _('Created By'),                                                        field: 'created_by',         valueType: 'user'}
+        {label: _('Created By'),                                                        field: 'created_by',         valueType: 'user'},
+        {
+            label: app.i18n._('Salutation'),
+            field: 'salutation',
+            filtertype: 'tine.widget.keyfield.filter',
+            app: app,
+            keyfieldName: 'contactSalutation',
+            defaultOperator: 'in'
+        }
     ];
 };