Skip to content

Commit

Permalink
refs #2174 display total revenue
Browse files Browse the repository at this point in the history
  • Loading branch information
tsteur committed Feb 25, 2014
1 parent b72b505 commit 6e8086f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 1 deletion core/Metrics.php
Expand Up @@ -310,7 +310,8 @@ static public function getMetricIdsToProcessReportTotal()
self::INDEX_PAGE_ENTRY_NB_VISITS,
self::INDEX_PAGE_ENTRY_NB_ACTIONS,
self::INDEX_PAGE_EXIT_NB_VISITS,
self::INDEX_PAGE_EXIT_NB_UNIQ_VISITORS
self::INDEX_PAGE_EXIT_NB_UNIQ_VISITORS,
self::INDEX_REVENUE
);
}

Expand Down
5 changes: 3 additions & 2 deletions plugins/CoreHome/CoreHome.php
Expand Up @@ -68,8 +68,9 @@ public function getJsFiles(&$jsFiles)
$jsFiles[] = "libs/jquery/jquery.mousewheel.js";
$jsFiles[] = "libs/jquery/mwheelIntent.js";
$jsFiles[] = "libs/javascript/sprintf.js";
$jsFiles[] = "libs/angularjs/angular.js";
$jsFiles[] = "libs/angularjs/angular-sanitize.js";
$jsFiles[] = "libs/angularjs/angular.min.js";
$jsFiles[] = "libs/angularjs/angular-sanitize.min.js";
$jsFiles[] = "libs/angularjs/angular-animate.min.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/piwikHelper.js";
$jsFiles[] = "plugins/Zeitgeist/javascripts/ajaxHelper.js";
$jsFiles[] = "plugins/CoreHome/javascripts/require.js";
Expand Down
1 change: 1 addition & 0 deletions plugins/CoreHome/javascripts/piwikApp.js
@@ -1,5 +1,6 @@
angular.module('piwikApp', [
'ngSanitize',
'ngAnimate',
'piwikApp.config',
'piwikApp.service',
'piwikApp.directive',
Expand Down
Expand Up @@ -27,7 +27,7 @@ angular.module('piwikApp').controller('SiteSelectorController', function($scope,
}
};

$scope.getUrlAllSites = function () {
$scope.getUrlAllSites = function () {
var newParameters = 'module=MultiSites&action=index'
return piwik.helper.getCurrentQueryStringWithParametersModified(newParameters);
}
Expand Down
1 change: 1 addition & 0 deletions plugins/MultiSites/MultiSites.php
Expand Up @@ -53,6 +53,7 @@ public function getClientSideTranslationKeys(&$translations)
$translations[] = 'General_Previous';
$translations[] = 'General_GoTo';
$translations[] = 'Dashboard_DashboardOf';
$translations[] = 'Actions_SubmenuSitesearch';
}

public function getReportMetadata(&$reports)
Expand Down
Expand Up @@ -38,6 +38,7 @@ angular.module('piwikApp').factory('multisitesDashboardModel', function (piwikAp
model.allSites = processedReport.reportData;
model.totalVisits = processedReport.reportTotal.nb_visits;
model.totalActions = processedReport.reportTotal.nb_actions;
model.totalRevenue = processedReport.reportTotal.revenue;
model.prettyDate = processedReport.prettyDate;

var sitesByGroup = [];
Expand Down
Expand Up @@ -3,7 +3,7 @@ <h2>
{{ 'General_AllWebsitesDashboard'|translate }}
<span class='smallTitle'
title="{{ 'General_EvolutionSummaryGeneric' | translate:('General_NVisits'|translate:model.totalVisits):model.prettyDate:'lastnum':'lastprettydate':'evolution' }}"
ng-bind-html="'General_TotalVisitsPageviewsRevenue' | translate:('<strong>'+model.totalVisits+'</strong>'):('<strong>'+model.totalActions+'</strong>'):('<strong>totalRevenueTodo</strong>')">
ng-bind-html="'General_TotalVisitsPageviewsRevenue' | translate:('<strong>'+model.totalVisits+'</strong>'):('<strong>'+model.totalActions+'</strong>'):('<strong>' + model.totalRevenue + '</strong>')">
Loading
</span>
</h2>
Expand Down Expand Up @@ -45,6 +45,18 @@ <h2>

<tbody id="tb">

<tr ng-show="model.isLoading">
<td colspan="7" style="padding:20px">
Loading all websites
<span style="
background: url(plugins/Zeitgeist/images/loading-blue.gif) no-repeat right 3px;
display: inline-block;
width: 16px;
height: 16px;
"> </span>
</td>
</tr>

<tr website="website"
evolution-selector="evolutionSelector"
piwik-multisites-site
Expand All @@ -67,7 +79,7 @@ <h2>

<tr>
<td colspan="8" class="clean" style="text-align: center;">
<input type="text" ng-change="model.searchSite(searchTerm)" ng-model="searchTerm" placeholder="Search for websites" style="margin-top:20px;">
<input type="text" ng-change="model.searchSite(searchTerm)" ng-model="searchTerm" placeholder="{{ 'Actions_SubmenuSitesearch' | translate }}" style="margin-top:20px;">
</td>
</tr>

Expand Down

0 comments on commit 6e8086f

Please sign in to comment.