diff --git a/admin-translations.json b/admin-translations.json index 9368e416..1f27fd14 100644 --- a/admin-translations.json +++ b/admin-translations.json @@ -120,7 +120,8 @@ "replace": "replace metadata" }, "lyrics": "Lyrics", - "transcription": "Transcription" + "transcription": "Transcription", + "analytics": "Analytics" }, "waitings": { "link": "Link", diff --git a/admin/app/scripts/controllers/track.js b/admin/app/scripts/controllers/track.js index 8a2514cc..5b270452 100644 --- a/admin/app/scripts/controllers/track.js +++ b/admin/app/scripts/controllers/track.js @@ -100,7 +100,10 @@ angular.module('bmmApp') tags: [], cover: null, cover_upload: null, - rel: [] + rel: [], + analytics: false, + analyticsData: { + } }; return; } @@ -165,6 +168,15 @@ angular.module('bmmApp') }; $scope.refreshModel(); + $scope.getAnalytics = function() { + _api.getAnalytics($routeParams.id) + .done(function(response) { + $scope.model.analyticsData = response; + }); + }; + + $scope.getAnalytics(); + var saveModel = function() { //Delete parts that's unexpected by the API diff --git a/admin/app/views/pages/track.html b/admin/app/views/pages/track.html index 8e7a16c6..903a40cd 100644 --- a/admin/app/views/pages/track.html +++ b/admin/app/views/pages/track.html @@ -262,6 +262,30 @@