 
     @addSubView @addButton, '.kdmodal-content'
 
+
+  createAddYourVMButton: ->
+
     if checkFlag 'super-admin'
-      
+
       @setClass 'managed'
       @addManagedButton = new KDButtonView
         title    : "Add Your own VM"

kd = require 'kd'
KDButtonView = kd.ButtonView
SidebarSearchModal = require './sidebarsearchmodal'
ModalMachineItem = require './modalmachineitem'
{handleNewMachineRequest} = require '../../providers/computehelpers'
checkFlag = require 'app/util/checkFlag'

module.exports = class MoreVMsModal extends SidebarSearchModal

  constructor: (options = {}, data = []) ->

    hasContainer             = options.container?

    options.cssClass         = kd.utils.curry 'more-modal more-vms', options.cssClass
    options.width            = 462
    options.title          or= 'Your VMs'
    options.disableSearch    = yes
    options.itemClass      or= ModalMachineItem
    options.bindModalDestroy = no
    options.appendToDomBody  = !hasContainer
    options.draggable        = no
    options.overlay          = !hasContainer

    super options, data

    if container = @getOption 'container'
      kd.utils.defer => container.addSubView this

  viewAppended: ->

    @addButton = new KDButtonView
      title    : "Create a Koding VM"


      @addSubView @addManagedButton, '.kdmodal-content'

  listMachines: ->

    for machine in @getData()
      view = new ModalMachineItem {}, machine.data
      view.once 'ModalItemSelected', @bound 'destroy'
      @addSubView view
