     @addSubView @main = new kd.CustomHTMLView
       tagName : 'main'
 
+    @main.addSubView expandButton = new kd.ButtonView
+      cssClass : 'solid compact light-gray expand-button'
+      title : 'Expand'
+      callback : =>
+        @unsetClass 'stack-template-preview'
+        @setClass 'expanded-stack-template-preview'
+        @setModalHeight '98%'
+        @setModalWidth '99%'
+        @setOption 'position', { top:10, left:10 }
+        @setPositions()
+        @minimizeButton.show()
+        @resizeOpenPane()
+
+
+    @main.addSubView @minimizeButton = new kd.ButtonView
+      cssClass : 'solid compact light-gray minimize-button hidden'
+      title : 'Minimize'
+      callback : =>
+        @setClass 'stack-template-preview'
+        @unsetClass 'expanded-stack-template-preview'
+        @setOption 'position', 'absolute'
+        @setModalHeight defaultHeight
+        @setModalWidth defaultWidth
+        @setPositions()
+        @minimizeButton.hide()
+
+
+    @main.addSubView new kd.CustomHTMLView
+      partial : "<p class='preview-label'>This Preview is generated from your account data.</p>"
+
     @main.addSubView new kd.CustomHTMLView
       cssClass : 'has-markdown'
       partial  : applyMarkdown """

    @createJSONView()

    @tabView.showPaneByIndex 0


  createYamlView: ->

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

    options.title           = 'Template Preview'
    options.cssClass        = kd.utils.curry 'stack-template-preview content-modal', options.cssClass
    options.overlay         = yes
    options.overlayOptions  = { cssClass : 'second-overlay' }
