#alerts-page

  .page-header
    %h2= t('Alerts')

  .row
    .span6.pull-right
      %select#gate-filter.selectpicker.span4(multiple="multiple" data-live-search="true" title="#{t('Select gates...')}")
        - foreach($gateList as $theGate)
          - if(isset($selectedGates)  && in_array($theGate->Gate, $selectedGates))
            %option(value="#{$theGate->Gate}" selected="selected")
              = $theGate->Descrizione
          - else    
            %option(value="#{$theGate->Gate}" )
              = $theGate->Descrizione
        
        
      .btn-group#alert-filter-buttons.pull-right(style="margin-bottom: 10px")
        - if(isset($types)  && in_array('alarm', $types))
          %button#alert-alarm-filter-button.filter-buttons.btn.active(type="button" data-filter="alarm")
            %i.icon-exclamation-sign.alarm.alarm-icon
        -else    
          %button#alert-alarm-filter-button.filter-buttons.btn(type="button" data-filter="alarm")
            %i.icon-exclamation-sign.alarm.alarm-icon
        - if(isset($types)  && in_array('warning', $types))    
          %button#alert-warning-filter-button.filter-buttons.btn.active(type="button" data-filter="warning")
            %i.icon-warning-sign.alarm.warning-icon
        -else    
          %button#alert-warning-filter-button.filter-buttons.btn(type="button" data-filter="warning")
            %i.icon-warning-sign.alarm.warning-icon

        - if(isset($types)  && in_array('info', $types))    
          %button#alert-info-filter-button.filter-buttons.btn.active(type="button" data-filter="info")
            %i.icon-info-sign.alarm.info-icon
        - else    
          %button#alert-info-filter-button.filter-buttons.btn(type="button" data-filter="info")
            %i.icon-info-sign.alarm.info-icon
       
        - if(isset($bookmark)  && $bookmark > 0)                 
          %button#alert-info-filter-button.filter-buttons.btn.active(type="button" data-filter="bookmark")
            %i.icon-bookmark
        - else                 
          %button#alert-info-filter-button.filter-buttons.btn(type="button" data-filter="bookmark")
            %i.icon-bookmark
            
  .row                     
    #event-reporting-list(data-behavior="SlidePagination")
      - $this->renderPartial('_alertsTable', array('dataProvider' => $dataProvider))
