- $preferences = param('gateStatus')
- $lastViolationMinutes = $preferences['lastViolationMinutes'];
- $hours = $lastViolationMinutes / 60
- $days = $hours / 24

%h3
  = t('Gates')
  %small
    -if($days >= 1)
      = t('Last {qty_days} days summary', array('{qty_days}' => $days))
    -else
      = t('Last {qty_hours} hours summary', array('{qty_hours}' => $hours))

.gate-list-update-info
  %span
    = t('Updated at:')
  %span#gate-last-update-time  
    = DateHelper::formatLocalDateTime()

%script{:type => "text/javascript",
        :src  => "js/closableGates.js"}

#gates-container
  - if(!is_null($gateGroups) && count($gateGroups)>0)      
    - foreach($gateGroups as $gateGroup)
      - $gateGroup = new GateGroupPresenter($gateGroup)
      .gate-group-all.panel.panel-default
        .gate-group-all-name.panel-heading
          %a.gate-group-all-name.panel-heading.custom-head(data-toggle="collapse" 
          href="##{$gateGroup->ID}"
          class="#{$gateGroup->getStatusClass()}")
            %span.panel-title(title="#{t('Gate group')}")=$gateGroup->name
        .panel-collapse.collapse(id="#{$gateGroup->ID}"
        class="collapse #{$gateGroup->getStatusClass()}")
          %div.spinner
            %div.bounce1
            %div.bounce2
            %div.bounce3