%h2
  .icon-road
  =t(paramdeep('ztl','name'))
-if(user()->checkAccess('ztl_edit'))
  %a(href="#{url('ztlEditor/admin')}")
    %h5
      =t('Edit')
  
%h4
  =t('Gates').':'

%table.table.table-condensed
  %thead
    %tr
      %th=t('Current status')
      %th=t('Description')
      %th=t('Time Schedules')
      %th=t('Code')
      %th=t('Actions')
  %tbody
  -foreach(Gate::getAllGates() as $gate)
    %tr
      %td
        -if(!$gate->isZtlLimited())
          %font(color="green")
            =t('Free access')
        -else
          %font(color="red")
            =t('Limited access')
      %td
        !=SystemInfoHelper::getGateCoolName($gate->ID)
      %td
        !=$gate->getZtlIconTags()
      %td
        =$gate->Gate
      %td
        %a(href="gateSchedule?gate=#{$gate->Gate}")
          .icon-eye-open(title="#{t('View scheduling')}")
        -if(user()->checkAccess('ztl_edit'))
          %a(href="#{url('ztleditor/admin?Ztl[GateID]='.$gate->Descrizione)}")
            .icon-pencil(title="#{t('Update')}")
          