From 7838a06e5521db39aee8b3b87785fcb5e32cd7ad Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 10 Jan 2013 07:32:02 +0100 Subject: o Creating a single (awarded) badge view. --- src/main/webapp/apps/frontPageApp/badge.html | 30 +++++++++++++++++++++++ src/main/webapp/apps/frontPageApp/frontPageApp.js | 8 ++++++ 2 files changed, 38 insertions(+) create mode 100755 src/main/webapp/apps/frontPageApp/badge.html (limited to 'src/main/webapp/apps/frontPageApp') diff --git a/src/main/webapp/apps/frontPageApp/badge.html b/src/main/webapp/apps/frontPageApp/badge.html new file mode 100755 index 0000000..92fc7ae --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/badge.html @@ -0,0 +1,30 @@ +
+ + + + + +
+
+ The badge was awarded to at + {{badge.badge.createdDate | date:'medium'}}. +
+
+ +
+
+

Details

+

+ The badge was awarded for having {{badge.personalBadge.builds.length}} successful builds in a row: +

+ +
+
+ +
diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js index a67e2dc..6f80d0f 100755 --- a/src/main/webapp/apps/frontPageApp/frontPageApp.js +++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js @@ -4,6 +4,7 @@ var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge', $routeProvider. when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.html?noCache=' + noCache}). when('/badge/', {controller: BadgeListCtrl, templateUrl: '/apps/frontPageApp/badgeList.html?noCache=' + noCache}). + when('/badge/:badgeUuid', {controller: BadgeCtrl, templateUrl: '/apps/frontPageApp/badge.html?noCache=' + noCache}). when('/person/', {controller: PersonListCtrl, templateUrl: '/apps/frontPageApp/personList.html?noCache=' + noCache}). when('/person/:personUuid', {controller: PersonCtrl, templateUrl: '/apps/frontPageApp/person.html?noCache=' + noCache}). when('/build/', {controller: BuildListCtrl, templateUrl: '/apps/frontPageApp/buildList.html?noCache=' + noCache}); @@ -56,6 +57,13 @@ function BadgeListCtrl($scope, Badge, PagingTableService) { $scope.badgeGroups = []; } +function BadgeCtrl($scope, $routeParams, Badge) { + var badgeUuid = $routeParams.badgeUuid; + Badge.get({uuid: badgeUuid}, function (badge) { + $scope.badge = badge; + }); +} + function PersonListCtrl($scope, Person, PagingTableService) { var groupSize = 4; var personsWatcher = function () { -- cgit v1.2.3