diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-12-03 23:13:45 +0300 |
---|---|---|
committer | Stefan Giehl <stefan@piwik.org> | 2018-12-03 23:13:45 +0300 |
commit | 8b247a856e14ee5a246182ecf808804bf029b7e0 (patch) | |
tree | 0d4b5a35108462f5f1e910074112feca1d8067bb /plugins/Events/VisitorDetails.php | |
parent | ed877857e59ec5434153e7142b75f67208ef428e (diff) |
Add title, subtitle, and icon to all live actions (#13454)
* add title, subtitle, and icon to all live actions
* Add translations and tweak wording
* fix possible error
* fix incorrect closed if statement
* updates expected test files
* update submodule
Diffstat (limited to 'plugins/Events/VisitorDetails.php')
-rw-r--r-- | plugins/Events/VisitorDetails.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/Events/VisitorDetails.php b/plugins/Events/VisitorDetails.php index ecf76847d8..5644874469 100644 --- a/plugins/Events/VisitorDetails.php +++ b/plugins/Events/VisitorDetails.php @@ -9,8 +9,8 @@ namespace Piwik\Plugins\Events; +use Piwik\Piwik; use Piwik\Plugins\Live\VisitorDetailsAbstract; -use Piwik\Tracker\Action; use Piwik\View; class VisitorDetails extends VisitorDetailsAbstract @@ -22,6 +22,18 @@ class VisitorDetails extends VisitorDetailsAbstract if (!empty($action['eventType'])) { $action['type'] = 'event'; $action['icon'] = 'plugins/Morpheus/images/event.png'; + $action['title'] = Piwik::translate('Events_Event'); + $action['subtitle'] = Piwik::translate('Event_Category') . ': "' . $action['eventCategory'] . "'"; + + if (!empty($action['eventName'])) { + $action['subtitle'] .= ', ' . Piwik::translate('General_Name') . ': "' . $action['eventName'] . '"'; + } + if (!empty($action['eventAction'])) { + $action['subtitle'] .= ', ' . Piwik::translate('General_Action') . ': "' . $action['eventAction'] . '"'; + } + if (!empty($action['eventValue'])) { + $action['subtitle'] .= ', ' . Piwik::translate('General_Value') . ': "' . $action['eventValue'] . '"'; + } if (strlen($action['pageTitle']) > 0) { $action['eventName'] = $action['pageTitle']; |