             callback? err
       ]
     , app
+
+    appsController = @getSingleton("kodingAppsController")
 
     if KD.checkFlag 'super-admin'
       @approveButton = new KDToggleButton

      else
        @likeButton.setState "Like"

    appsController = @getSingleton("kodingAppsController")

    if app.versions?.length > 1
      menu =

        defaultState    : if app.approved then "Disapprove" else "Approve"
        states          : [
          "Approve", (callback)->
            appsController.approveApp app, (err)=>
              if not err
                app.approve yes, (err)->
                  if err then warn err
                  callback? err
              else
                callback? err
          "Disapprove", (callback)->
            app.approve no, (err)->
              callback? err
