Skip to content

Commit

Permalink
use new svg icons in visitor log
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiehl committed Dec 28, 2018
1 parent 2846096 commit 4a1d0c5
Show file tree
Hide file tree
Showing 15 changed files with 63 additions and 20 deletions.
14 changes: 7 additions & 7 deletions plugins/Actions/VisitorDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)

switch ($action['type']) {
case 'goal':
$action['icon'] = 'plugins/Morpheus/images/goal.png';
$action['icon'] = 'plugins/Morpheus/images/goal.svg';
$action['title'] = Piwik::translate('Goals_GoalConversion');
$action['subtitle'] = $action['goalName'];
if (!empty($action['revenue'])) {
Expand All @@ -156,7 +156,7 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)
break;
case Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER:
case Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_CART:
$action['icon'] = 'plugins/Morpheus/images/' . $action['type'] . '.png';
$action['icon'] = 'plugins/Morpheus/images/' . $action['type'] . '.svg';
if ($action['type'] == Piwik::LABEL_ID_GOAL_IS_ECOMMERCE_ORDER) {
$action['title'] = Piwik::translate('CoreHome_VisitStatusOrdered') . ' (' . $action['orderId'] . ')';
} else {
Expand All @@ -169,10 +169,10 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)
break;
case Action::TYPE_CONTENT:
if (!empty($action['contentInteraction'])) {
$action['icon'] = 'plugins/Morpheus/images/contentinteraction.png';
$action['icon'] = 'plugins/Morpheus/images/contentinteraction.svg';
$action['title'] = Piwik::translate('Contents_ContentInteraction') . ' (' . $action['contentInteraction'] . ')';
} else {
$action['icon'] = 'plugins/Morpheus/images/contentimpression.png';
$action['icon'] = 'plugins/Morpheus/images/contentimpression.svg';
$action['title'] = Piwik::translate('Contents_ContentImpression');
}

Expand All @@ -183,19 +183,19 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)
break;
case Action::TYPE_DOWNLOAD:
$action['type'] = 'download';
$action['icon'] = 'plugins/Morpheus/images/download.png';
$action['icon'] = 'plugins/Morpheus/images/download.svg';
$action['title'] = Piwik::translate('General_Download');
$action['subtitle'] = $action['url'];
break;
case Action::TYPE_OUTLINK:
$action['type'] = 'outlink';
$action['icon'] = 'plugins/Morpheus/images/link.png';
$action['icon'] = 'plugins/Morpheus/images/link.svg';
$action['title'] = Piwik::translate('General_Outlink');
$action['subtitle'] = $action['url'];
break;
case Action::TYPE_SITE_SEARCH:
$action['type'] = 'search';
$action['icon'] = 'plugins/Morpheus/images/search_ico.png';
$action['icon'] = 'plugins/Morpheus/images/search.svg';
$action['title'] = Piwik::translate('Actions_SubmenuSitesearch');
$action['subtitle'] = $action['siteSearchKeyword'];
break;
Expand Down
6 changes: 4 additions & 2 deletions plugins/Contents/templates/_actionContent.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
title="{{ postEvent('Live.renderActionTooltip', action, visitInfo) }}">
<div>
{% if action.contentInteraction %}
<span class="icon-document action-list-action-icon" title="{{ 'Contents_ContentInteraction'|translate }}"></span>
<img src='{{ action.icon }}' title='{{ 'Contents_ContentInteraction'|translate }}'
class="action-list-action-icon content-interaction">
{% else %}
<span class="icon-show action-list-action-icon" title="{{ 'Contents_ContentImpression'|translate }}"></span>
<img src='{{ action.icon }}' title='{{ 'Contents_ContentImpression'|translate }}'
class="action-list-action-icon content-impression">
{% endif %}
{% if action.contentInteraction %}
[{{ action.contentInteraction }}]
Expand Down
4 changes: 2 additions & 2 deletions plugins/CoreHome/VisitorDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ protected function getVisitEcommerceStatusIcon()
$status = $this->getVisitEcommerceStatus();

if (in_array($status, array('ordered', 'orderedThenAbandonedCart'))) {
return "plugins/Morpheus/images/ecommerceOrder.png";
return "plugins/Morpheus/images/ecommerceOrder.svg";
} elseif ($status == 'abandonedCart') {
return "plugins/Morpheus/images/ecommerceAbandonedCart.png";
return "plugins/Morpheus/images/ecommerceAbandonedCart.svg";
}
// Note: it is important that there is no icon when there was no ecommerce conversion
return null;
Expand Down
2 changes: 1 addition & 1 deletion plugins/Events/VisitorDetails.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function extendActionDetails(&$action, $nextAction, $visitorDetails)
{
if (!empty($action['eventType'])) {
$action['type'] = 'event';
$action['icon'] = 'plugins/Morpheus/images/event.png';
$action['icon'] = 'plugins/Morpheus/images/event.svg';
$action['title'] = Piwik::translate('Events_Event');
$action['subtitle'] = Piwik::translate('Event_Category') . ': "' . $action['eventCategory'] . "'";

Expand Down
2 changes: 1 addition & 1 deletion plugins/Events/templates/_actionEvent.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% if action.pageTitle|default(false) is not empty %}
<span class="truncated-text-line">{{ action.pageTitle|rawSafeDecoded }}</span>
{% endif %}
<img src='plugins/Morpheus/images/event.png' title='{{ 'Events_Event'|translate }}' class="action-list-action-icon event">
<img src='plugins/Morpheus/images/event.svg' title='{{ 'Events_Event'|translate }}' class="action-list-action-icon event">
<span class="truncated-text-line event">{{ action.eventCategory|rawSafeDecoded }}
- {{ action.eventAction|rawSafeDecoded }} {% if action.eventName is defined %}- {{ action.eventName|rawSafeDecoded }}{% endif %} {% if action.eventValue is defined %}[{{ action.eventValue }}]{% endif %}</span>
{% if action.url is not empty %}
Expand Down
10 changes: 3 additions & 7 deletions plugins/Live/stylesheets/live.less
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ ol.visitorLog > li {
margin-bottom: 7px;
line-height: 20px;
position: relative;
min-height: 25px;

&:before {
vertical-align: top;
Expand Down Expand Up @@ -363,16 +364,11 @@ a.visitor-log-visitor-profile-link {

.action-list-action-icon {
display: inline;
margin: 2px 3px 0 0;
max-height: 16px;
max-height: 18px;
position: absolute;
left: -16px;
left: -18px;
background-color: #fff;
z-index: 3;

&.outlink {
border: 3px solid #fff;
}
}

.action-list-url {
Expand Down
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/contentimpression.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/contentinteraction.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/ecommerceAbandonedCart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/ecommerceOrder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/event.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/goal.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions plugins/Morpheus/images/search.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4a1d0c5

Please sign in to comment.