Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-04-02 06:04:07 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-04-02 06:04:07 +0400
commitcbd340ede613295215f3778fe66cbf0883f6a4c1 (patch)
treea9290354675238b370f25f9dd628910d87f5cee8 /core/ViewDataTable
parent934caa2362def0de5f6d1fcb4c0987835e3e0dfb (diff)
display insights icon in its own footer icon section. the footer icon definition is a hack and needs to be refactored... having maybe a look after the next release
Diffstat (limited to 'core/ViewDataTable')
-rw-r--r--core/ViewDataTable/Manager.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/core/ViewDataTable/Manager.php b/core/ViewDataTable/Manager.php
index aeb666d21c..8f05f8b17f 100644
--- a/core/ViewDataTable/Manager.php
+++ b/core/ViewDataTable/Manager.php
@@ -16,6 +16,7 @@ use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Bar;
use Piwik\Plugins\CoreVisualizations\Visualizations\JqplotGraph\Pie;
use Piwik\Plugins\Goals\Visualizations\Goals;
+use Piwik\Plugins\Insights\Visualizations\Insight;
/**
* ViewDataTable Manager.
@@ -194,6 +195,12 @@ class Manager
$result[] = $normalViewIcons;
}
+ // add insight views
+ $insightsViewIcons = array(
+ 'class' => 'tableInsightViews',
+ 'buttons' => array(),
+ );
+
// add graph views
$graphViewIcons = array(
'class' => 'tableGraphViews tableGraphCollapsed',
@@ -218,12 +225,21 @@ class Manager
foreach ($nonCoreVisualizations as $id => $klass) {
if ($klass::canDisplayViewDataTable($view)) {
- $graphViewIcons['buttons'][] = static::getFooterIconFor($id);
+ $footerIcon = static::getFooterIconFor($id);
+ if (Insight::ID == $footerIcon['id']) {
+ $insightsViewIcons['buttons'][] = static::getFooterIconFor($id);
+ } else {
+ $graphViewIcons['buttons'][] = static::getFooterIconFor($id);
+ }
}
}
$graphViewIcons['buttons'] = array_filter($graphViewIcons['buttons']);
+ if (!empty($insightsViewIcons['buttons'])) {
+ $result[] = $insightsViewIcons;
+ }
+
if (!empty($graphViewIcons['buttons'])) {
$result[] = $graphViewIcons;
}