diff --git a/src/app/annotationLibrary/annotationItem.tpl.html b/src/app/annotationLibrary/annotationItem.tpl.html index e296afdd..419b5ecb 100644 --- a/src/app/annotationLibrary/annotationItem.tpl.html +++ b/src/app/annotationLibrary/annotationItem.tpl.html @@ -1,4 +1,4 @@ -
+

Annotation {{model.audioEventId}}

- Coming soon... +
    +
  • + + + + +
    +

    + link | report +

    +

    + UserName + time ago in words +

    +

    + Comment body +

    +
    +
  • +
  • + + + + +
    +

    + link | report +

    +

    + UserName + time ago in words +

    +

    + Comment body +

    +
    +
  • +
+
    +
  • + + + + +
    +

    + {{profile.userName}} + now +

    + +
    +
    + +
    + +
    + +
    +
  • +
+ +
diff --git a/src/app/annotationLibrary/annotationLibrary.js b/src/app/annotationLibrary/annotationLibrary.js index b67bf0a8..900f5fdb 100644 --- a/src/app/annotationLibrary/annotationLibrary.js +++ b/src/app/annotationLibrary/annotationLibrary.js @@ -29,7 +29,8 @@ baw.annotationLibrary.addCalculatedProperties = function addCalculatedProperties '&end=' + audioEvent.calcOffsetEnd, listenWithoutPadding: '/listen/' + audioEvent.audioRecordingId + '?start=' + audioEvent.startTimeSeconds + - '&end=' + audioEvent.endTimeSeconds + '&end=' + audioEvent.endTimeSeconds, + audioRecording: '/library?' + $url.toKeyValue({audioRecordingId: audioEvent.audioRecordingId}, true), }; return audioEvent; @@ -269,8 +270,14 @@ angular.module('bawApp.annotationLibrary', ['bawApp.configuration']) .controller('AnnotationItemCtrl', ['$scope', '$location', '$resource', '$routeParams', '$url', 'conf.paths', 'conf.constants', 'bawApp.unitConverter', - 'AudioEvent', 'Tag', 'Media', - function ($scope, $location, $resource, $routeParams, $url, paths, constants, unitConverter, AudioEvent, Tag, Media) { + 'AudioEvent', 'Tag', 'Media', 'UserProfile', + function ($scope, $location, $resource, $routeParams, $url, + paths, constants, unitConverter, AudioEvent, Tag, Media, UserProfile) { + + $scope.$on(UserProfile.eventKeys.loaded, profileLoaded); + if (UserProfile.profile && UserProfile.profile.preferences) { + profileLoaded(null, UserProfile); + } var parameters = { audioEventId: $routeParams.audioEventId, @@ -311,4 +318,8 @@ angular.module('bawApp.annotationLibrary', ['bawApp.configuration']) return '/projects/' + projectId; }; + function profileLoaded(event, userProfile){ + $scope.profile = userProfile.profile; + } + }]); \ No newline at end of file