 
     return {link:link, require:"ngModel"}
 
-module.directive("tgAssignedTo", ["$rootScope", AssignedToDirective])
+module.directive("tgAssignedTo", ["$rootScope", "$tgConfirm", AssignedToDirective])

        </div>
    """)

    renderAssignedTo = ($scope, $el, assignedToId, editable) ->
        assignedTo = null
        assignedTo = $scope.usersById[assignedToId] if assignedToId?
        html = template({assignedTo: assignedTo, editable:editable})
        $el.html(html)

    link = ($scope, $el, $attrs, $model) ->
        editable = $attrs.editable?
        $scope.$watch $attrs.ngModel, (assignedToId) ->
            renderAssignedTo($scope, $el, assignedToId, editable)

        $el.on "click", ".icon-edit", (event) ->
            event.preventDefault()

## Assigned to directive
#############################################################################

AssignedToDirective = ($rootscope, $confirm) ->
    #TODO: i18n
    template = _.template("""
        <% if (assignedTo) { %>
