From 6dc13f229e59cd0b0b6913a9e4f7a7f606f55804 Mon Sep 17 00:00:00 2001 From: yuri Date: Fri, 15 Jan 2016 13:27:49 +0200 Subject: [PATCH] is not read --- application/Espo/Resources/i18n/en_US/Email.json | 1 + .../Espo/Resources/layouts/Email/filters.json | 2 +- .../Espo/Resources/metadata/entityDefs/Email.json | 7 +++++++ application/Espo/SelectManagers/Email.php | 14 ++++++++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/application/Espo/Resources/i18n/en_US/Email.json b/application/Espo/Resources/i18n/en_US/Email.json index 167f1437b2..54a26b9bb6 100644 --- a/application/Espo/Resources/i18n/en_US/Email.json +++ b/application/Espo/Resources/i18n/en_US/Email.json @@ -24,6 +24,7 @@ "replied": "Replied", "replies": "Replies", "isRead": "Is Read", + "isNotRead": "Is Not Read", "isImportant": "Is Important", "isUsers": "Is User's", "inTrash": "In Trash" diff --git a/application/Espo/Resources/layouts/Email/filters.json b/application/Espo/Resources/layouts/Email/filters.json index 6d7e3446fa..1e3eaffc88 100644 --- a/application/Espo/Resources/layouts/Email/filters.json +++ b/application/Espo/Resources/layouts/Email/filters.json @@ -2,7 +2,7 @@ "account", "dateSent", "emailAddress", - "isRead", + "isNotRead", "isImportant", "name", "status", diff --git a/application/Espo/Resources/metadata/entityDefs/Email.json b/application/Espo/Resources/metadata/entityDefs/Email.json index 4dfa53344c..ab36a37e7b 100644 --- a/application/Espo/Resources/metadata/entityDefs/Email.json +++ b/application/Espo/Resources/metadata/entityDefs/Email.json @@ -57,6 +57,13 @@ "notStorable": true, "default": true }, + "isNotRead": { + "type": "bool", + "notStorable": true, + "layoutListDisabled": true, + "layoutDetailDisabled": true, + "layoutMassUpdateDisabled": true + }, "isImportant": { "type": "bool", "notStorable": true, diff --git a/application/Espo/SelectManagers/Email.php b/application/Espo/SelectManagers/Email.php index ae3f856e70..bef5ffdbe7 100644 --- a/application/Espo/SelectManagers/Email.php +++ b/application/Espo/SelectManagers/Email.php @@ -268,6 +268,20 @@ class Email extends \Espo\Core\SelectManagers\Base } + protected function getWherePartIsNotReadIsTrue() + { + return array( + 'usersMiddle.isRead' => false + ); + } + + protected function getWherePartIsNotReadIsFalse() + { + return array( + 'usersMiddle.isRead' => true + ); + } + protected function getWherePartIsReadIsTrue() { return array(