             when 'top'
               v = info.metric.options[v]
             when 'summary'
-              if info.d.global
-                if Editing
-                  cell.classList.add('spreadsheet-global-record-cell')
-                  del = cell.appendChild(document.createElement('a'))
-                  del.className = 'button mini global-record white icon-text'
-                  delicon = del.appendChild(document.createElement('span'))
-                  delicon.className = 'icon trash'
-                  del.appendChild(document.createTextNode('Remove'))
-                  $(del).on 'click', $scope.$lift(clickGlobal)
+              if info.d.global && Editing
+                cell.classList.add('spreadsheet-global-record-cell')
+                del = cell.appendChild(document.createElement('a'))
+                del.className = 'button mini global-record white icon-text'
+                delicon = del.appendChild(document.createElement('span'))
+                delicon.className = 'icon trash'
+                del.appendChild(document.createTextNode('Remove'))
+                $(del).on 'click', $scope.$lift(clickGlobal)
             else
               if info.metric.type == 'void' && info.d
                 cell.className = 'clickable' if Editing && Key.id != info.c

'use strict'

app.directive 'spreadsheet', [
  'constantService', 'displayService', 'messageService', 'tooltipService', 'styleService', '$compile', '$templateCache', '$timeout', '$document', '$location', '$filter', 'routerService', 'storageService', 'Segment',
  (constants, display, messages, tooltips, styles, $compile, $templateCache, $timeout, $document, $location, $filter, router, storage, Segment) ->
    restrict: 'E'
    scope: true
    templateUrl: 'volume/spreadsheet.html'

            else if info.count
              router.http(router.controllers.deleteRecordAllSlot, rec.id).then () ->
                volume.top.addRecord(rec).then () ->
                  true
            else
              volume.top.addRecord(rec).then () ->
                rec.global = true
                info.row.set(info.c, info.n, populateSlotData(volume.top))
                return
          saveRun info.cell, act.then (r) ->
            if r
              $route.reload()
              return
            collapse()
            generateRow(info.i)
            expand(info) if info.n
