diff options
author | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-01-22 07:31:23 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-22 07:31:23 +0300 |
commit | 111d605c31a7d530bb1082881799a3ad828be8ed (patch) | |
tree | 2ea0d4379c4c42c211d863e39a03d877aa3f804a /core/ReportRenderer | |
parent | 50cd6ffb9d340a635744ffcae3b01805a5dafbd3 (diff) |
Email reports in HTML: Updated styling to be consistent with new Custom Alerts emails design (#11251)
* Updated Email Report/Downloaded Report. Added new styling found in the Alert Email. i.e navigation bar uptop, styled tables, added powered by piwik footer. Note: "back to top" link only works on downloaded version, not on the email.
* Fixed the back to top link not working in emails.
* Fixed a bug where logo was not centered in gmail
* Translations
* Code cleanup and making PDF generation work
* removed htaccess
* fix unit test
* Some test fixes
* UI Test
Diffstat (limited to 'core/ReportRenderer')
-rw-r--r-- | core/ReportRenderer/Html.php | 13 | ||||
-rw-r--r-- | core/ReportRenderer/Pdf.php | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/core/ReportRenderer/Html.php b/core/ReportRenderer/Html.php index 9915f255e9..36d9c4f3f3 100644 --- a/core/ReportRenderer/Html.php +++ b/core/ReportRenderer/Html.php @@ -12,7 +12,10 @@ use Piwik\Piwik; use Piwik\Plugins\API\API; use Piwik\ReportRenderer; use Piwik\SettingsPiwik; +use Piwik\Site; +use Piwik\Date; use Piwik\View; +use Piwik\Plugins\ScheduledReports\ScheduledReports; /** * HTML report renderer @@ -90,10 +93,20 @@ class Html extends ReportRenderer $frontPageView = new View('@CoreHome/ReportRenderer/_htmlReportHeader'); $this->assignCommonParameters($frontPageView); + $period = $this->report['period']; + + $periods = ScheduledReports::getPeriodToFrequencyAsAdjective(); + $frontPageView->assign("period", $periods[$period]); $frontPageView->assign("reportTitle", $reportTitle); $frontPageView->assign("prettyDate", $prettyDate); $frontPageView->assign("description", $description); $frontPageView->assign("reportMetadata", $reportMetadata); + $frontPageView->assign("websiteName", Site::getNameFor($this->idSite)); + $frontPageView->assign("idSite", $this->idSite); + $frontPageView->assign("period", $period); + + $date = Date::now()->setTimezone(Site::getTimezoneFor($this->idSite))->toString(); + $frontPageView->assign("date", $date); // segment $displaySegment = ($segment != null); diff --git a/core/ReportRenderer/Pdf.php b/core/ReportRenderer/Pdf.php index 59fb862650..837d6be50f 100644 --- a/core/ReportRenderer/Pdf.php +++ b/core/ReportRenderer/Pdf.php @@ -65,7 +65,6 @@ class Pdf extends ReportRenderer private $tableCellBorderColor; private $tableBackgroundColor; private $rowTopBottomBorder = array(231, 231, 231); - private $report; private $reportMetadata; private $displayGraph; private $evolutionGraph; |