From 37207267bf3a1149f78a5022ed8e016cac6b85ca Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 6 Jan 2013 12:43:09 +0100 Subject: o Adding a view for showing a list of people. --- src/main/webapp/apps/frontPageApp/frontPage.html | 2 +- src/main/webapp/apps/frontPageApp/frontPageApp.js | 11 ++- src/main/webapp/apps/frontPageApp/person.html | 102 +++++++++++----------- src/main/webapp/apps/frontPageApp/personList.html | 35 ++++++++ 4 files changed, 94 insertions(+), 56 deletions(-) create mode 100755 src/main/webapp/apps/frontPageApp/personList.html (limited to 'src/main/webapp/apps/frontPageApp') diff --git a/src/main/webapp/apps/frontPageApp/frontPage.html b/src/main/webapp/apps/frontPageApp/frontPage.html index 84e991b..c3db55c 100755 --- a/src/main/webapp/apps/frontPageApp/frontPage.html +++ b/src/main/webapp/apps/frontPageApp/frontPage.html @@ -22,7 +22,7 @@

Newcomers

diff --git a/src/main/webapp/apps/frontPageApp/frontPageApp.js b/src/main/webapp/apps/frontPageApp/frontPageApp.js index ef0de81..c973983 100755 --- a/src/main/webapp/apps/frontPageApp/frontPageApp.js +++ b/src/main/webapp/apps/frontPageApp/frontPageApp.js @@ -3,15 +3,20 @@ var frontPageApp = angular.module('frontPageApp', ['ngGrid', 'person', 'badge', 'build', 'pagingTableService', 'core.directives']).config(function ($routeProvider, $locationProvider) { $routeProvider. when('/', {controller: FrontPageCtrl, templateUrl: '/apps/frontPageApp/frontPage.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}); }); -function FrontPageCtrl($scope, Person, Badge, PagingTableService) { - $scope.persons = PagingTableService.create($scope, PagingTableService.defaultCallback(Person)); +function FrontPageCtrl($scope, Person, Badge) { + $scope.persons = Person.query(); $scope.recentBadges = Badge.query(); } -function PersonCtrl($scope, $routeParams, Person, Badge, Build, PagingTableService) { +function PersonListCtrl($scope, Person, PagingTableService) { + $scope.persons = PagingTableService.create($scope, PagingTableService.defaultCallback(Person, {orderBy: "name"})); +} + +function PersonCtrl($scope, $routeParams, Person, Build, PagingTableService) { var personUuid = $routeParams.personUuid; $scope.mode = 'overview'; diff --git a/src/main/webapp/apps/frontPageApp/person.html b/src/main/webapp/apps/frontPageApp/person.html index 8573afe..0ca5679 100755 --- a/src/main/webapp/apps/frontPageApp/person.html +++ b/src/main/webapp/apps/frontPageApp/person.html @@ -11,60 +11,58 @@
  • Builds
  • -
    -
    -
    -

    Upcoming

    - - - - - -
    {{badge.name}} -
    -
    -
    -
    +
    +
    +

    Upcoming

    + + + + + +
    {{badge.name}} +
    +
    +
    +
    -

    Badges

    -
      -
    • - - {{badge.name}} - - - - +

      Badges

      +
        +
      • + + {{badge.name}} + + + + - {{badge.createdDate | date:'medium'}} -
      • -
      -
    -
    -

    Recent builds

    - - - - - - - - - - - -
    {{build.timestamp | date:'medium'}}{{{true: 'Success', false: 'Failure'}[build.success]}}Details
    -
    + {{badge.createdDate | date:'medium'}} + + +
    +
    +

    Recent builds

    + + + + + + + + + + + +
    {{build.timestamp | date:'medium'}}{{{true: 'Success', false: 'Failure'}[build.success]}}Details
    diff --git a/src/main/webapp/apps/frontPageApp/personList.html b/src/main/webapp/apps/frontPageApp/personList.html new file mode 100755 index 0000000..a4f48c1 --- /dev/null +++ b/src/main/webapp/apps/frontPageApp/personList.html @@ -0,0 +1,35 @@ +
    + + + + + +
    +
    + + + + + + + + + + + +
    {{person.person.name}}
    + +
    +
    +
    +
    -- cgit v1.2.3