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

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

      else
        @likeButton.setState "Like"


    if app.versions?.length > 1
      menu =
