Skip to content

Commit

Permalink
BAP-13527: Emails and Thread Emails are displayed in duplicate (#7246)
Browse files Browse the repository at this point in the history
  • Loading branch information
mccar authored and Krushelnitskiy committed Feb 7, 2017
1 parent c22b7d1 commit 958c548
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Oro/Bundle/EmailBundle/Resources/config/datagrid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ datagrid:
- { name: oro.use_index, value: user_owner_id_mailbox_owner_id_organization_id }

columns:
mailbox:
data_name: origin
label: oro.email.mailbox.entity_label
type: twig
frontend_type: html
template: OroEmailBundle:Email:Datagrid/Property/mailbox.html.twig
renderable: false
contacts:
data_name: email.contacts
type: twig
Expand All @@ -168,6 +175,7 @@ datagrid:
label:
frontend_type: html
template: OroEmailBundle:Email:Datagrid/Property/attachments.html.twig
manageable: false
receivedAt:
data_name: receivedAt
type: twig
Expand All @@ -180,6 +188,7 @@ datagrid:
columns:
subject: { data_name: e.subject }
receivedAt: { data_name: receivedAt }
mailbox: { data_name: eu.origin }
default: { receivedAt: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_DESC }
options:
entityHint: email
Expand Down Expand Up @@ -302,8 +311,6 @@ datagrid:
label: oro.email.datagrid.emails.action.mark_as_unread
icon: minus
options:
toolbarOptions:
addColumnManager: false
entity_pagination: true
entity_pagination_target: Oro\Bundle\EmailBundle\Entity\Email

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ oro:

email:
imap.folder.checkAll: All
mailbox_name.personal: Personal
autocomplete:
recently_used: Recently used
contexts: Contexts
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% set origin = record.getValue('origin') %}
{% set mailboxName = record.getValue('origin.mailboxName') %}
{% set mailbox = record.getValue('origin.mailbox') %}
{% if mailbox is not null %}
{% set mailboxName = mailbox.label %}
{% elseif oro_class_name(origin) != 'Oro\\Bundle\\EmailBundle\\Entity\\InternalEmailOrigin' %}
{% set mailboxName = 'oro.email.mailbox_name.personal'|trans %}
{% endif %}
<span class="nowrap">
{{ mailboxName }}
</span>

0 comments on commit 958c548

Please sign in to comment.