 
 module = angular.module("greenmine.controllers.project", [])
 module.controller("ProjectListController", ['$scope', '$rootScope', 'resource', ProjectListController])
-module.controller("ProjectAdminController", ["$scope", "$rootScope", "$routeParams", "$data", "resource", ProjectAdminController])
+module.controller("ProjectAdminController", ["$scope", "$rootScope", "$routeParams", "$data",
+                                             "$gmFlash", "resource", ProjectAdminController])

    $scope.submit = ->
        promise = $scope.project.save()
        promise.then (data) ->
            console.log data
        promise.then null, (data) ->
            console.error data
            $scope.checksleyErrors = data

        $scope.projects = projects


ProjectAdminController = ($scope, $rootScope, $routeParams, $data, $gmFlash, rs) ->
    $rootScope.pageSection = 'admin'
    $rootScope.pageBreadcrumb = ["", "Project Admin"]
    $rootScope.projectId = parseInt($routeParams.pid, 10)
