         return @rs.history.undeleteComment(type, objectId, activityId).then => @.loadHistory(type, objectId)
 
 
-HistoryDirective = ($log) ->
+HistoryDirective = ($log, $loading) ->
     templateChangeDiff = _.template("""
     <div class="change-entry">
         <div class="activity-changed">

        $el.on "click", ".add-comment a.button-green", (event) ->
            event.preventDefault()

            $el.find(".comment-list").addClass("activeanimation")
            onSuccess = ->
                $ctrl.loadHistory(type, objectId)

            onError = ->
                $confirm.notify("error")

            model = $scope.$eval($attrs.ngModel)
            $ctrl.repo.save(model).then(onSuccess, onError)

        $el.on "click", ".show-more", (event) ->

    }


module.directive("tgHistory", ["$log", "$tgLoading", HistoryDirective])
