.admin-menu-container.span3
  .admin-menu-title
    =t("Actions")
  %section
    %span.title
      %a(href="#{Yii::app()->createUrl('plateList/view', array('id' => $plateList->id))}" target="_blank")
        = Yii::t("app", ("Details")) 
  -if(Yii::app()->user->checkAccess("plate_list_management") && $plateList->editable && user()->checkAccess("edit_plate_list"))              
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateList/update', array('id' => $plateList->id, 'from'=>$this->getAbsoluteUrl()))}")
          = Yii::t("app", ("Update"))
  -if(Yii::app()->user->checkAccess("plate_list_management") && $plateList->editable && Yii::app()->user->checkAccess("clear_plate_list"))       
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateList/clearList', array('id' => $plateList->id))}" onclick="return confirm('#{t('Are you sure you want to clear this list?')}')")
          = Yii::t("app", ("Clear")) 
  -if(Yii::app()->user->checkAccess("plate_list_management") && $plateList->editable && Yii::app()->user->checkAccess("delete_plate_list"))       
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateList/delete', array('id' => $plateList->id))}" onclick="return confirm('#{t('Are you sure you want to delete this list?')}')")
          = Yii::t("app", ("Delete"))        
  -if($plateList->editable && $plateList->mode==PlateList::MODE_WHITE_LIST)
    -if($plateList->maxsize > 0 && user()->checkAccess('plate_auth_scheduler'))
      %section
        %span.title
          %a.icon-table(href="#{url('plateAuthorization/scheduler',array('plateListId' => $plateList->id))}")
            = t("Scheduler")
    -if(user()->checkAccess('plate_auth_insert') && user()->checkAccess('plate_auth_insert_wizard'))
      %section
        %span.title
          %a(target="_blank" href="#{Yii::app()->createUrl('plateAuthorization/whiteListWizard', array('plateListId' => $plateList->code))}")
            = Yii::t("app", ("Add plate authorization wizard"))              
    -if(user()->checkAccess('plate_auth_insert') && user()->checkAccess('plate_auth_insert_fast'))
      %section
        %span.title
          %a(target="_blank" href="#{Yii::app()->createUrl('plateAuthorization/newWhitelist', array('plateListId' => $plateList->id))}")
            = Yii::t("app", ("Plate authorization fast insert"))
    -if(user()->checkAccess('plate_auth_insert') && user()->checkAccess('plate_auth_insert_profile'))
      -foreach(PlateAuthInsertProfile::model()->findAll() as $paip)
        -if(user()->checkAccess("plate_auth_insert_profile_".$paip->id) && ($paip->list_code==-1 || $paip->list_code==$plateList->code))
          %section
            %span.title
              %a(href="#{Yii::app()->createUrl('plateAuthorization/NewPlateAuthProfile', array('plateListId' => $plateList->code, 'profileId'=>$paip->id))}" target="_blank")
                = Yii::t("app", $paip->description)                
  -if($plateList->mode==PlateList::MODE_WHITE_LIST && user()->checkAccess('plate_auth_status'))
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateAuthorization/whitelistStatus', array('plateListId' => $plateList->code))}")
          = Yii::t("app", ("Manage plate authorizations"))             
  -if($plateList->editable && $plateList->mode==PlateList::MODE_BLACK_LIST)
    %section
      %span.title
        %a(target='_blank' href="#{Yii::app()->createUrl('plateAuthorization/newBlacklist', array('plateListId' => $plateList->id))}")
          = Yii::t("app", ("Add vehicle"))
  -if(Yii::app()->user->checkAccess("plate_auth_diagnostic"))
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateAuthorization/diagnostic', array('plateListId' => $plateList->code))}")
          = t("Diagnostic")
  -if(user()->checkAccess("plate_auth_export_list_$code"))
    %section
      %span.title
        %a(href="#{Yii::app()->createUrl('plateAuthorization/PlateAuthInfoExportList', array('code' => $plateList->code))}")
          = t("Export")