 
 module = angular.module("taigaProject")
 
-CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, $loading, lightboxService, $cacheFactory, $translate, projectsService) ->
+CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, $loading, lightboxService, $cacheFactory, $translate, currentUserService) ->
     link = ($scope, $el, attrs) ->
         $scope.data = {}
         $scope.templates = []


module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm",
    "$location", "$tgNavUrls", "$tgResources", "$projectUrl", "$tgLoading",
    "lightboxService", "$cacheFactory", "$translate", "tgProjectsService", CreateProject])


#############################################################################
## Delete Project Lightbox Directive
#############################################################################

DeleteProjectDirective = ($repo, $rootscope, $auth, $location, $navUrls, $confirm, lightboxService, tgLoader, projectsService) ->
    link = ($scope, $el, $attrs) ->
        projectToDelete = null
        $scope.$on "deletelightbox:new", (ctx, project)->


            $location.url($projectUrl.get(response))
            lightboxService.close($el)
            currentUserService._loadProjects()

        onErrorSubmit = (response) ->
            $loading.finish(submitButton)
