Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.7' into 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed May 20, 2015
2 parents ba0ab43 + 2cb66c6 commit ef3107e
Show file tree
Hide file tree
Showing 27 changed files with 575 additions and 86 deletions.
3 changes: 3 additions & 0 deletions UPGRADE-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ UPGRADE FROM 1.5 to 1.6
####OroUserBundle:
- Added `oro_user_organization_acl_select` form type which selects users by assigned organizations, not by owned organization.
- Added `oro_user_organization_acl_multiselect` multi select form type which selects users by assigned organizations, not by owned organization.

####OroReminderBundle:
- Added parameter `NameFormatter $nameFormatter` to constructor of `Oro\Bundle\ReminderBundle\Model\Email\EmailNotification`
3 changes: 3 additions & 0 deletions UPGRADE-1.7.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ UPGRADE FROM 1.6 to 1.7
- Added parameter `DoctrineHelper $doctrineHelper` to constructor of `Oro\Bundle\EntityExtendBundle\Form\Extension\DynamicFieldsExtension` class

- Integration import processors may be tagged with `oro_integration.sync_processor` DIC tag with `integration` name. During integration import appropriate processor will be used if registered.

####OroReminderBundle:
- Added parameter `NameFormatter $nameFormatter` to constructor of `Oro\Bundle\ReminderBundle\Model\Email\EmailNotification`
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import "../../../oroui/css/less/mixins";
.activity-list-widget {
min-width: 700px;
position: relative;
.actions-bottom {
border-top: 1px solid #ddd;
Expand Down Expand Up @@ -93,7 +92,7 @@
}
}
.accordion-heading {
height: 46px;
min-height: 46px;
width: 100%;
padding: 5px 10px;
cursor: pointer;
Expand All @@ -103,7 +102,6 @@
}

>.icon, >.accordion-icon, >.details, >.comment-count, >.message, >.created-at, >.actions {
position: absolute;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -112,6 +110,9 @@
> .accordion-icon {
padding: 0;
margin: 7px 0 0 5px;
float: left;
line-height: 20px;
height: 20px;
&:before {
content: '\f117';
font-family: FontAwesome;
Expand All @@ -126,40 +127,44 @@
}
}
> .icon {
float: left;
width: 27px;
font-size: 18px;
color: #999;
margin: 8px 0 0 26px;
margin: 8px 0 0 10px;
}

> .actions{
right: 5px;
margin: 8px 0px 0px 0px;
float: right;
margin: 8px 0 0 8px;
overflow: visible;
.horizontal-icon-menu;
}
> .details {
margin: 9px 0px 0px 55px;
padding: 0px 5px;
width: 247px;
margin: 7px 7px 0 0;
max-width: 247px;
min-width: 247px;
padding-bottom: 1px;
float: left;
}
> .details:hover {
background: #fafafa;
width: auto;
z-index: 1;
}
> .created-at {
right: 41px;
margin-top: 8px;
float: right;
margin: 7px 0 -1px 8px;
color: #888;
}
> .comment-count {
right: 165px;
float: right;
margin-top: 8px;
}
> .message-item {
margin: 9px 215px 0 318px;
width: calc(~"100% - 545px");
margin: 7px 0 0 0;
float: left;
width: calc(~"100% - 510px");
color: #888;
}
}
Expand Down Expand Up @@ -199,3 +204,42 @@
}
}
}
@media screen and (max-width: 650px){
.mobile-version .activity-list-widget {
.grid-toolbar .btn-group {
margin: 0 10px 10px 0;
}
.pagination {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
.accordion > .items {
.message-item {
clear: left;
margin-left: 4px;
width: calc(~"100% - 186px");
}
.details {
min-width: 0;
max-width: calc(~"100% - 72px");
margin-right: 0;
}
.actions {
margin-left: 0;
margin-right: -10px;
}
}
.accordion-body {
.widget-content > .responsive-block {
min-width: 100%;
}
.message .comment {
padding: 0 ;
}
}
}
}
.mobile-version .activity-list-widget .accordion-body .message .comment {
padding-right: 0;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script type="text/html" id="{{ id|e('html_attr')|raw }}">
<div class="accordion-group">
<div class="accordion-heading">
<div class="accordion-heading clearfix">
<a href="#accordion-item<%= id %>" data-toggle="collapse"
class="accordion-icon accordion-toggle<% if (collapsed) { %> collapsed<% } %>"></a>
<div class="icon">
Expand All @@ -11,20 +11,6 @@
{% block activityDetails %}
{% endblock %}
</div>
<div class="comment-count"<% if (!commentCount) { %> style="display:none"<% } %>
title="<%= _.__('oro.activitylist.comment.quantity_label') %>">
<i class="icon icon-comment"></i><span class="count"><%= commentCount %></span>
</div>
<div class="message-item message">
{% block activityShortMessage %}
<%= subject %>
{% endblock %}
</div>
<div class="created-at">
{% block activityDate %}
<i class="date"><%= updatedAt %></i>
{% endblock %}
</div>
<div class="actions">
{% block activityActions %}
<div class="more-bar-holder">
Expand All @@ -38,6 +24,20 @@
</div>
{% endblock %}
</div>
<div class="message-item message">
{% block activityShortMessage %}
<%= subject %>
{% endblock %}
</div>
<div class="created-at">
{% block activityDate %}
<i class="date"><%= updatedAt %></i>
{% endblock %}
</div>
<div class="comment-count"<% if (!commentCount) { %> style="display:none"<% } %>
title="<%= _.__('oro.activitylist.comment.quantity_label') %>">
<i class="icon icon-comment"></i><span class="count"><%= commentCount %></span>
</div>
</div>
<div class="accordion-body collapse<% if (!collapsed) { %> in<% } %>" id="accordion-item<%= id %>">
<div class="message">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}

.ajax-loading {
position: absolute;
position: block;
display: none;
}

Expand Down Expand Up @@ -294,3 +294,7 @@ table.table {
.control-group .actions {
padding-left: 10px;
}

#page {
overflow: auto;
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,18 @@ public function process($object, $notifications, LoggerInterface $logger = null)

$senderEmail = $this->cm->get('oro_notification.email_notification_sender_email');
$senderName = $this->cm->get('oro_notification.email_notification_sender_name');
$type = $emailTemplate->getType() == 'txt' ? 'text/plain' : 'text/html';
$recipients = $notification->getRecipientEmails();
foreach ((array)$recipients as $email) {
if ($notification instanceof SenderAwareEmailNotificationInterface && $notification->getSenderEmail()) {
$senderEmail = $notification->getSenderEmail();
$senderName = $notification->getSenderName();
}

if ($emailTemplate->getType() == 'txt') {
$type = 'text/plain';
} else {
$type = 'text/html';
}

foreach ((array)$notification->getRecipientEmails() as $email) {
$message = \Swift_Message::newInstance()
->setSubject($subjectRendered)
->setFrom($senderEmail, $senderName)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Oro\Bundle\NotificationBundle\Processor;

interface SenderAwareEmailNotificationInterface extends EmailNotificationInterface
{
/**
* @return string|null
*/
public function getSenderEmail();

/**
* @return string|null
*/
public function getSenderName();
}
Loading

0 comments on commit ef3107e

Please sign in to comment.