       @header class: 'preview-header', =>
         @span outlet: 'previewCount', class: 'preview-count inline-block'
         @div class: 'preview-controls', =>
-            @div class: 'btn-group', =>
-                @button outlet: 'previewCollapse', class: 'btn'
-                @button outlet: 'previewExpand', class: 'btn'
+          @div class: 'btn-group', =>
+            @button outlet: 'previewCollapse', class: 'btn'
+            @button outlet: 'previewExpand', class: 'btn'
         @div outlet: 'loadingMessage', class: 'inline-block', =>
           @div class: 'loading loading-spinner-tiny inline-block'
           @div outlet: 'searchedCountBlock', class: 'inline-block', =>


  collapseAllResults: =>
    i=0
    while i != @resultsView.lastRenderedResultIndex
      @resultsView.collapseResult()
      @resultsView.selectNextResult()
      i++


  expandAllResults: =>
    i=0
    while i isnt @resultsView.lastRenderedResultIndex
      @resultsView.expandResult()
      @resultsView.selectNextResult()
      i++
