       @editor.setContent Encoder.htmlDecode template.rawContent
       @readme.setContent description
       @variables.setContent ''
-      @logsController.set 'stack template loaded'
+      @controllers.logs.set 'stack template loaded'
 
       @_saveSnapshot id
       @_current = id

      @statusbar
    }

    @logsController = new LogsController
      editor: @logs

    @variablesController = new VariablesController
      editor: @variables
      logs  : @logsController

    # SideView for Search and Credentials
    @credentialsController = new CredentialsController
      logs  : @logsController

    @sideView       = new SideView
      title         : yes

        credentials :
          title     : 'Credentials'
          cssClass  : 'credentials show-controls has-markdown'
          view      : @controllers.credentials.getView()
          controls  :
            plus    : =>
              @controllers.credentials.getCredentialAddButton()

    @emit 'ready'


  setTemplateData: (data, reset = no) ->

    debug 'setTemplateData with args:', data, reset

    { _id: id, title, description, template } = data
    unless id or description or template
