doctype html
html(lang='en')
    head
        meta(charset='utf-8')
        title!= pageTitle

        link(rel='stylesheet', href='#{rootPath}/lightness/jquery-ui.css')
        link(rel='stylesheet', href='#{rootPath}/vendor/bootstrap/docs/assets/css/bootstrap.css')

        link(rel='stylesheet', href='#{rootPath}/css/main.css')

        script(src='#{rootPath}/vendor/jquery/jquery.js')
        script(src='#{rootPath}/lightness/jquery-ui.js')
        script(src='#{rootPath}/vendor/bootstrap/docs/assets/js/bootstrap.js')
        script(src='#{rootPath}/js/clienstrum.js')

        script var root = '#{rootPath}';

        != renderedHead

        block head

        !{global_head}
        script(src='#{rootPath}/js/maps.js')


    body
        - if (!dialog)
            header.navbar.navbar-static-top
                .navbar-inner
                    .container
                        block nav
                            .btn-group.pull-right
                                a.btn.btn-inverse(href='#{rootPath}/')
                                    i.icon-home.icon-white
                                    | &nbsp;Admin
                                a.btn(href="/")
                                    i.icon-share
                                    | &nbsp;Site
                                a.btn(href='#{rootPath}/logout')
                                    .icon-lock
                                    | &nbsp;Logout
                        h1
                            block title
                                a(href='#{rootPath}/') #{adminTitle}
                            block breadcrumb

        .container-fluid.formage
            #content
                block body

            - if (!dialog)
                footer.footer
                    - if (userPanel)
                        p.user-panel
                            !{userPanel}
                    p
                        a(href='http://github.com/Empeeric/formage') Formage
                        | &nbsp;#{version}, from&nbsp;
                        a(href='http://empeeric.com') Empeeric
                    a(href='http://github.com/Empeeric/formage')
                        img(src='#{rootPath}/images/logo-40.png')

            #old-version.alert.alert-error(hidden)
                button.close(type='button',data-dismiss='alert') &times;
                strong Warning;
                | There is a newer version of formage.

        block scripts

        !{global_script}
