!!!

- $app = Yii::app()
- $baseUrl = $app->request->baseUrl
- $environment = $app->params['environment']
- new JsTrans('app', $app->language)

%html
  %head
    %meta(http-equiv="Content-type" content="text/html; charset=UTF-8")
    %meta(name="viewport" content="width=device-width, initial-scale=1.0")
    %meta(http-equiv="X-UA-Compatible" content="chrome=1")
    - $app->bootstrap->register() #it must be before %title
    %title= $this->pageTitle
    %link(rel="stylesheet" type="text/css" href="#{$baseUrl}/css/application.min.css")
    %link(rel="stylesheet" type="text/css" href="#{$baseUrl}/css/custom.css")
    %link(rel="shortcut icon" href="#{$baseUrl}/favicon.ico")

    %script
      var settings = {                 |
        baseUrl: "#{$baseUrl}",        |
        language: "#{$app->language}", |
        environment: "#{$environment}", |
        datetimepicker_format: "#{$app->params['datetimeselect_format'][$app->language]['view']}", |
        timepicker_format: "#{$app->params['timeselect_format'][$app->language]['view']}", |
        dayofyearpicker_format: "#{$app->params['dayoftheyearselect_format'][$app->language]['view']}", |
        gate_status_refresh_time: "#{$app->params['gate_status_refresh_time']}", |
        system_status_refresh_time: "#{$app->params['system_status_refresh_time']}" |
      }                                |

    /[if lt IE 9]
      %script(type="text/javascript" src="#{$baseUrl}/js/html5shiv.js")
      %script(type="text/javascript" src="#{$baseUrl}/js/respond.min.js")

    %script(type="text/javascript" src="#{$baseUrl}/js/application.min.js")
    %script(type="text/javascript" src="#{$baseUrl}/js/openseadragon.min.js")
    %script(type="text/javascript" src="#{$baseUrl}/js/openseadragonselection.js")
    %script(type="text/javascript" src="#{$baseUrl}/js/openseadragon-filtering.js")
    %script(type="text/javascript" src="#{$baseUrl}/js/openseadragonimagefilter.js")
    %script(type="text/javascript" src="#{$baseUrl}/js/openseadragon-scalebar-mod.js")

    -if(DebugController::isInDebugMode() || user()->checkAccess('context_menu_enabled'))
      %script(type="text/javascript")
        !="document.oncontextmenu = function() { return true; }; "
    -else
      %script(type="text/javascript")
        !="document.oncontextmenu = function() { return false; }; "

  %body
    -DebugController::initDebugUser()
    %header
      -if(MaintenanceModeController::userCanSee())
        - $this->renderPartial("//layouts/_header")

    .container
      .breadcrumbs
        - if(isset($this->breadcrumbs))
          - $this->widget('bootstrap.widgets.TbBreadcrumbs', array('links' => $this->breadcrumbs))

      #content(style="top: 40px; position: relative; padding-bottom: 40px;")
        #flash-container
          - $flashMessages = Yii::app()->user->getFlashes();
          - if ($flashMessages && !paramdeep('notification', 'hideFlashMessage'))
            - foreach($flashMessages as $flash)
              .alert(class="alert-#{$flash->level}")
                .icon-time(title="#{$flash->timestamp}")
                -if(!$flash->permanent)
                  %button.close(type="button" data-dismiss="alert") &times;
                %span.message!= $flash->content
        != $content
    
      -if(MaintenanceModeController::userCanSee())
        -if(paramdeep('notification','enabled') && !user()->isGuest && user()->checkAccess('notification'))
          -$this->renderPartial('//shared/_notification')

    %footer
      - $this->renderPartial("//layouts/_footer")

