- $showViolationsList = paramdeep('gateStatus','showViolationsList') && user()->checkAccess('gate_status_view_violations');
- $showAlertsList = paramdeep('gateStatus','showAlertsList') && user()->checkAccess('gate_status_view_alerts');

-if($showAlertsList && $showViolationsList)
  -$showViolationsList = false

-$viewMode = 'none'

-if($showViolationsList)
  -$viewMode = 'violations'

-if($showAlertsList)
  -$viewMode = 'alerts'

#gates-status-page

  .row
    -if(user()->checkAccess('gate_status_view_gates'))
      #gates-status-container.span4
        - $this->renderPartial('gates/_gateList', array('gateGroups' => $gateGroups, 'viewMode' => $viewMode))

    -if($showViolationsList)
      #violations-container.span8(data-behavior="ViolationsPreview")
        - $this->renderPartial('violations/_violationsTable', array('violations' => $violations, 'gate' => null, 'viewMode' => 'violations'))
     
    -if($showAlertsList)
      #alerts-container.span8(data-behavior="AlertsPreview")
        - $this->renderPartial('alerts/_alertsTable', array('alerts' => $alerts, 'gate' => null, 'viewMode' => 'alerts'))
