 
     return {link:link}
 
+module.directive("tgLbCreateIssue", ["$tgRepo", "$tgConfirm", "$rootScope", "lightboxService",
+                                     CreateIssueDirective])
 
-CreateBulkIssuesDirective = ($repo, $rs, $rootscope, lightboxService) ->
+
+#############################################################################
+## Issue Bulk Create Lightbox Directive
+#############################################################################
+
+CreateBulkIssuesDirective = ($repo, $rs, $confirm, $rootscope, lightboxService) ->
     link = ($scope, $el, attrs) ->
         $scope.$on "issueform:bulk", (ctx, projectId, status)->
             lightboxService.open($el)

            promise = $repo.create("issues", $scope.issue)

            promise.then (data) ->
                lightboxService.close($el)
                console.log "succcess", data
                $rootscope.$broadcast("issueform:new:success", data)

            # FIXME: error handling?
            promise.then null, ->
                console.log "FAIL"

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

## Issue Create Lightbox Directive
#############################################################################

CreateIssueDirective = ($repo, $confirm, $rootscope, lightboxService) ->
    link = ($scope, $el, $attrs) ->
        form = $el.find("form").checksley()
        $scope.issue = {}
