diff options
author | Julien Moumné <julien@piwik.org> | 2013-05-19 12:18:32 +0400 |
---|---|---|
committer | Julien Moumné <julien@piwik.org> | 2013-05-19 12:18:32 +0400 |
commit | 8a8ce3eccb13c11037b79112513bcbe6ef7e2ccf (patch) | |
tree | 83792550c0d26696acd9a48a2780fc435b822842 /core/ReportRenderer/Html.php | |
parent | 1ec86574db8537a1290043820455205e9863ad64 (diff) |
ref #71, #3934 - segment selection for scheduled html, pdf & sms reports
Diffstat (limited to 'core/ReportRenderer/Html.php')
-rw-r--r-- | core/ReportRenderer/Html.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/core/ReportRenderer/Html.php b/core/ReportRenderer/Html.php index 24339d2d57..1dab763f13 100644 --- a/core/ReportRenderer/Html.php +++ b/core/ReportRenderer/Html.php @@ -82,7 +82,7 @@ class Piwik_ReportRenderer_Html extends Piwik_ReportRenderer $this->rendering .= $smarty->fetch(self::prefixTemplatePath("html_report_footer.tpl")); } - public function renderFrontPage($reportTitle, $prettyDate, $description, $reportMetadata) + public function renderFrontPage($reportTitle, $prettyDate, $description, $reportMetadata, $segment) { $smarty = new Piwik_Smarty(); $this->assignCommonParameters($smarty); @@ -93,6 +93,13 @@ class Piwik_ReportRenderer_Html extends Piwik_ReportRenderer $smarty->assign("description", $description); $smarty->assign("reportMetadata", $reportMetadata); + // segment + $displaySegment = ($segment != null); + $smarty->assign("displaySegment", $displaySegment); + if ($displaySegment) { + $smarty->assign("segmentName", $segment['name']); + } + $this->rendering .= $smarty->fetch(self::prefixTemplatePath("html_report_header.tpl")); } @@ -139,7 +146,13 @@ class Piwik_ReportRenderer_Html extends Piwik_ReportRenderer $smarty->assign("renderImageInline", $this->renderImageInline); if ($this->renderImageInline) { - $staticGraph = parent::getStaticGraph($reportMetadata, self::IMAGE_GRAPH_WIDTH, self::IMAGE_GRAPH_HEIGHT, $evolutionGraph); + $staticGraph = parent::getStaticGraph( + $reportMetadata, + self::IMAGE_GRAPH_WIDTH, + self::IMAGE_GRAPH_HEIGHT, + $evolutionGraph, + $processedReport['segment'] + ); $smarty->assign("generatedImageGraph", base64_encode($staticGraph)); unset($generatedImageGraph); } |