diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2016-03-30 00:04:57 +0300 |
---|---|---|
committer | Thomas Steur <tsteur@users.noreply.github.com> | 2016-03-30 00:04:57 +0300 |
commit | 4cf7a648999681fce3233953822bf9a43fb2f195 (patch) | |
tree | 2e15ecf661babdc73952d2bd5af2e132fc602b5a | |
parent | 238fadf286746d10a4f8ed184d44e6ca057032ed (diff) | |
parent | 6a5d6728793b0d758d2ae2c1f6d5da690782c49f (diff) |
Merge pull request #9958 from piwik/9909
Display message why no reports are shown if there are no conversions
-rw-r--r-- | plugins/Goals/lang/en.json | 1 | ||||
-rw-r--r-- | plugins/Goals/templates/getGoalReportView.twig | 16 | ||||
-rw-r--r-- | plugins/Goals/templates/getOverviewView.twig | 6 |
3 files changed, 14 insertions, 9 deletions
diff --git a/plugins/Goals/lang/en.json b/plugins/Goals/lang/en.json index dc485c94d8..4aefc3e34b 100644 --- a/plugins/Goals/lang/en.json +++ b/plugins/Goals/lang/en.json @@ -77,6 +77,7 @@ "NewGoalIntro": "Goal Conversion tracking is one of the most efficient ways to measure and improve your business objectives.", "NewVisitorsConversionRateIs": "New visitors conversion rate is %s", "NoGoalsNeedAccess": "Only an Administrator or a user with Super User access can manage Goals for a given website. Please ask your Piwik administrator to set up a Goal for your website. <br>Tracking Goals is a great way to help understand and maximize your website performance!", + "NoConversionsNoReportsMessage": "Reports are not displayed because there is no conversion data for the selected goal and period.", "NeedAccess": "Only an Administrator or a user with Super User access can manage Goals for a given website.", "Optional": "(optional)", "OverallConversionRate": "%s overall conversion rate (visits with a completed goal)", diff --git a/plugins/Goals/templates/getGoalReportView.twig b/plugins/Goals/templates/getGoalReportView.twig index 3d69cb3f5b..411b7277b0 100644 --- a/plugins/Goals/templates/getGoalReportView.twig +++ b/plugins/Goals/templates/getGoalReportView.twig @@ -57,14 +57,16 @@ </script> {% if displayFullReport %} + <h2 id='titleGoalsByDimension'> + {% if idGoal is defined %} + {{ 'Goals_GoalConversionsBy'|translate(goalName) }} + {% else %} + {{ 'Goals_ConversionsOverviewBy'|translate }} + {% endif %} + </h2> {% if nb_conversions > 0 or cart_nb_conversions is defined %} - <h2 id='titleGoalsByDimension'> - {% if idGoal is defined %} - {{ 'Goals_GoalConversionsBy'|translate(goalName) }} - {% else %} - {{ 'Goals_ConversionsOverviewBy'|translate }} - {% endif %} - </h2> {{ goalReportsByDimension|raw }} + {% else %} + <p class="alert">{{ 'Goals_NoConversionsNoReportsMessage'|translate }}</p> {% endif %} {% endif %} diff --git a/plugins/Goals/templates/getOverviewView.twig b/plugins/Goals/templates/getOverviewView.twig index ce828a8b54..2581742441 100644 --- a/plugins/Goals/templates/getOverviewView.twig +++ b/plugins/Goals/templates/getOverviewView.twig @@ -45,7 +45,6 @@ {% endfor %} {% if displayFullReport %} - {% if sum_nb_conversions != 0 %} <h2 id='titleGoalsByDimension'> {% if idGoal is defined %} {{ 'Goals_GoalConversionsBy'|translate(goalName) }} @@ -53,6 +52,9 @@ {{ 'Goals_ConversionsOverviewBy'|translate }} {% endif %} </h2> - {{ goalReportsByDimension|raw }} + {% if sum_nb_conversions != 0 %} + {{ goalReportsByDimension|raw }} + {% else %} + <p class="alert">{{ 'Goals_NoConversionsNoReportsMessage'|translate }}</p> {% endif %} {% endif %} |