- $app = Yii::app()
- $user = $app->user
- $homeUrl = $app->homeUrl
- $controller = $app->controller

#myCanvasContainer
  %canvas#myCanvas(width="1000" height="600")
    %p Anything in here will be replaced on browsers that support the canvas element
    %ul
      %li
        %a(href="http://www.kria.biz" target='_blank')
          %img(src="#{Yii::app()->baseUrl}/images/kria_logo.png")
            
      %li(class="#{$controller instanceof DashboardController ? 'active' : ''}")
        %a(href="#{$homeUrl}")= onNull(paramdeep('menuTitles','dashboard'),Yii::t("app", "Home"))

      - if (Yii::app()->user->checkAccess('view_gates_status'))
        %li(class="#{$controller instanceof GatesStatusController ? 'active' : ''}")
          %a(href="#{$app->createUrl('gatesStatus')}")= onNull(paramdeep('menuTitles','gateStatus'),Yii::t("app", 'Gates Status'))

      - if (Yii::app()->user->checkAccess('view_alerts'))
        %li(class="#{$controller instanceof AlertController ? 'active' : ''}")
          %a(href="#{$app->createUrl('alert/search')}")= onNull(paramdeep('menuTitles','alerts'),Yii::t('app', 'Alerts'))

      - if (Yii::app()->user->checkAccess('view_map'))
        %li(class="#{$controller instanceof CartographyController ? 'active' : ''}")
          %a(href="#{$app->createUrl('cartography')}")= onNull(paramdeep('menuTitles','map'),Yii::t('app', 'Maps'))

      - if (Yii::app()->user->checkAccess('view_live'))
        %li(class="#{$controller instanceof LiveController ? 'active' : ''}")
          %a(href="#{$app->createUrl('live')}")= onNull(paramdeep('menuTitles','live'),Yii::t('app', 'Live'))

      - if (Yii::app()->user->checkAccess('verify_events') || Yii::app()->user->checkAccess('check_events_data'))
        %li(class="#{$controller instanceof ServiceController ? 'active' : ''}")
          %a(href="#{$app->createUrl('service')}")= onNull(paramdeep('menuTitles','services'),Yii::t('app', 'Tasks'))

      - if (Yii::app()->user->checkAccess('search_violations'))
        %li(class="#{$controller instanceof SearchController ? 'active' : ''}")
          %a(href="#{$app->createUrl('search')}")= Yii::t('app', 'Detections - Fast search')

      - if (Yii::app()->user->checkAccess('search_violations_advanced'))
        %li(class="#{$controller instanceof EventController ? 'active' : ''}")
          %a(href="#{$app->createUrl('event/admin')}")= Yii::t('app', 'Detections - Advanced search')

      - if (Yii::app()->user->checkAccess('search_transits'))
        %li(class="#{$controller instanceof VehicleTraceController ? 'active' : ''}")
          %a(href="#{$app->createUrl('vehicleTrace/admin')}")= Yii::t('app', 'Transits')

      - if($user->checkAccess('statistics'))
        %li(class="#{$controller instanceof StatsController ? 'active' : ''}")
          %a(href="#{$app->createUrl('stats')}")= onNull(paramdeep('menuTitles','stats'),Yii::t('app', 'Stats'))

      - if($user->checkAccessLike('plate_list_*'))
        %li(class="#{$controller instanceof PlateAuthorizationController ? 'active' : ''}")
          %a(href="#{$app->createUrl('plateAuthorization')}")= getBWListsLabels(paramdeep('menuTitles','plateAuthorizationWL'),paramdeep('menuTitles','plateAuthorizationBL'),paramdeep('menuTitles','plateAuthorizationBWL'))

      - if(paramdeep('ztl','active') && Yii::app()->user->checkAccess('ztl_view'))
        %li(class="#{$controller instanceof ZtlController ? 'active' : ''}")
          %a(href="#{$app->createUrl('ztl/index')}")= onNull(paramdeep('menuTitles','ztl'),Yii::t('app', paramdeep('ztl','name')))

      - if($user->checkAccess('manage_gates') || $user->checkAccess('manage_auth') || $user->checkAccess('manage_users') || $user->checkAccess('manage_special_day') || $user->checkAccess('manage_time_schedule'))
        %li(class="#{$controller instanceof AdminController ? 'active' : ''}")
          %a(href="#{$app->createUrl('admin')}")= onNull(paramdeep('menuTitles','admin'),Yii::t('app', 'Admin'))

      - if((user()->isGuest && paramdeep('support','visible_to_guest')) || (!user()->isGuest && paramdeep('support','visible_to_user'))) 
        %li(class="#{$controller instanceof SupportController ? 'active' : ''}")
          %a(title="#{t('Support')}" href="#{$app->createUrl('support')}")
            .icon-question-sign
