diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-01-08 05:27:47 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-01-08 05:27:47 +0300 |
commit | 6e92f58bbe7c0d4ee5a8da54bee3f898363ab6cd (patch) | |
tree | da0b2fa746a04adbb38fd744c5944a1dbf0e3836 | |
parent | 9a79d2fd8e17d7646895e6bf194beb4a4d20536b (diff) |
change the layout on the engagement page to show all the reports next to each other
-rw-r--r-- | plugins/VisitFrequency/templates/_sparklines.twig | 4 | ||||
-rw-r--r-- | plugins/VisitorInterest/VisitorInterest.php | 10 | ||||
-rw-r--r-- | plugins/VisitorInterest/templates/index.twig | 30 |
3 files changed, 23 insertions, 21 deletions
diff --git a/plugins/VisitFrequency/templates/_sparklines.twig b/plugins/VisitFrequency/templates/_sparklines.twig index 2c2c0f81a2..f497c970e5 100644 --- a/plugins/VisitFrequency/templates/_sparklines.twig +++ b/plugins/VisitFrequency/templates/_sparklines.twig @@ -1,3 +1,4 @@ +<div id="leftcolumn"> <div class="sparkline"> {{ sparkline(urlSparklineNbVisitsReturning) }} {{ 'VisitFrequency_ReturnVisits'|translate("<strong>"~nbVisitsReturning~"</strong>")|raw }} @@ -10,6 +11,7 @@ {{ sparkline(urlSparklineActionsPerVisitReturning) }} {{ 'VisitFrequency_ReturnAvgActions'|translate("<strong>"~nbActionsPerVisitReturning~"</strong>")|raw }} </div> + </div><div id="rightcolumn"> <div class="sparkline"> {{ sparkline(urlSparklineAvgVisitDurationReturning) }} {% set avgVisitDurationReturning=avgVisitDurationReturning|sumtime %} @@ -20,3 +22,5 @@ {{ 'VisitFrequency_ReturnBounceRate'|translate("<strong>"~bounceRateReturning~"</strong>")|raw }} </div> {% include "_sparklineFooter.twig" %} +</div> +<div style="clear:both"></div>
\ No newline at end of file diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php index b1efd31d0f..c5fdac3711 100644 --- a/plugins/VisitorInterest/VisitorInterest.php +++ b/plugins/VisitorInterest/VisitorInterest.php @@ -30,22 +30,12 @@ class VisitorInterest extends \Piwik\Plugin function postLoad() { - Piwik::addAction('Template.headerVisitsFrequency', array('Piwik\Plugins\VisitorInterest\VisitorInterest', 'headerVisitsFrequency')); Piwik::addAction('Template.footerVisitsFrequency', array('Piwik\Plugins\VisitorInterest\VisitorInterest', 'footerVisitsFrequency')); } - public static function headerVisitsFrequency(&$out) - { - $out = '<div id="leftcolumn">'; - } - public static function footerVisitsFrequency(&$out) { - $out = '</div> - <div id="rightcolumn"> - '; $out .= FrontController::getInstance()->fetchDispatch('VisitorInterest', 'index'); - $out .= '</div>'; } public function extendVisitorDetails(&$visitor, $details) diff --git a/plugins/VisitorInterest/templates/index.twig b/plugins/VisitorInterest/templates/index.twig index 359d43608f..2ffae16c8f 100644 --- a/plugins/VisitorInterest/templates/index.twig +++ b/plugins/VisitorInterest/templates/index.twig @@ -1,11 +1,19 @@ -<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerDuration'|translate }}</h2> -{{ dataTableNumberOfVisitsPerVisitDuration|raw }} - -<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerNbOfPages'|translate }}</h2> -{{ dataTableNumberOfVisitsPerPage|raw }} - -<h2 piwik-enriched-headline>{{ 'VisitorInterest_visitsByVisitCount'|translate }}</h2> -{{ dataTableNumberOfVisitsByVisitNum|raw }} - -<h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsByDaysSinceLast'|translate }}</h2> -{{ dataTableNumberOfVisitsByDaysSinceLast|raw }} +<br /> +<div id="leftcolumn"> + <h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerDuration'|translate }}</h2> + {{ dataTableNumberOfVisitsPerVisitDuration|raw }} +</div> +<div id="rightcolumn"> + <h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsPerNbOfPages'|translate }}</h2> + {{ dataTableNumberOfVisitsPerPage|raw }} +</div> +<div style="clear:both"></div> +<div id="leftcolumn"> + <h2 piwik-enriched-headline>{{ 'VisitorInterest_visitsByVisitCount'|translate }}</h2> + {{ dataTableNumberOfVisitsByVisitNum|raw }} +</div> +<div id="rightcolumn"> + <h2 piwik-enriched-headline>{{ 'VisitorInterest_VisitsByDaysSinceLast'|translate }}</h2> + {{ dataTableNumberOfVisitsByDaysSinceLast|raw }} +</div> +<div style="clear:both"></div>
\ No newline at end of file |