
%div
  %table.table.table-striped.table-condensed
    %thead
      %tr
        %th=t('List')
        %th=t('To be confirmed')
        %th=t('Valid now')
        %th=t('Active')
        %th=t('Disabled')
        %th=t('Total')
    %tbody
      - foreach($plateLists as $pl)
        -$stats = $pl->getPlateAuthsStats();    
        %tr
          %td
            %a(href="#{url('plateAuthorization/list?plateListId='.$pl->id)}")
              =$pl->listTitle
          %td
            -if(user()->checkAccess('plate_auth_status'))
              -$params = array('plateListId'=>$pl->code,'status'=>'tobeconfirmed','sort'=>'end_time_desc')
              %a(href="#{url('plateAuthorization/whitelistStatus', $params)}")
                =$stats['to_be_confirmed']
            -else
              =$stats['to_be_confirmed']
          %td
            -if(user()->checkAccess('plate_auth_status'))
              -$params = array('plateListId'=>$pl->code,'status'=>'valid','sort'=>'end_time_desc')
              %a(href="#{url('plateAuthorization/whitelistStatus', $params)}")
                =$stats['valid']
            -else
              =$stats['valid']
          %td
            -if(user()->checkAccess('plate_auth_status'))
              -$params = array('plateListId'=>$pl->code,'status'=>'enabled','sort'=>'end_time_desc')
              %a(href="#{url('plateAuthorization/whitelistStatus', $params)}")
                =$stats['enabled']
            -else
              =$stats['enabled']
          %td
            -if(user()->checkAccess('plate_auth_status'))
              -$params = array('plateListId'=>$pl->code,'status'=>'disabled','sort'=>'end_time_desc')
              %a(href="#{url('plateAuthorization/whitelistStatus', $params)}")
                =$stats['disabled']
            -else
              =$stats['disabled']
          %td
            -if(user()->checkAccess('plate_auth_status'))
              -$params = array('plateListId'=>$pl->code,'sort'=>'end_time_desc')
              %a(href="#{url('plateAuthorization/whitelistStatus', $params)}")
                =$stats['total']
            -else
              =$stats['total']
  