include includes/flashMessages

doctype html
html
  head
    meta(charset="utf-8")
    meta(name="viewport", content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width")
    meta(name="csrf-token", content="#{csrf_token_value}")
    title= title
    include includes/css/components
    link(rel="stylesheet", href="#{adminPath}/styles/keystone.min.css")
    link(rel="shortcut icon", href="/favicon.ico", type="image/x-icon")

  body
    #list-view
    //- Common
    script(src="#{adminPath}/js/lib/underscore/underscore-1.5.1.min.js")
    script(src="#{adminPath}/js/lib/jquery/jquery-1.10.2.min.js")

    //- Components
    include includes/script/keystone
    include includes/script/components
    script.
      Keystone.lists = !{JSON.stringify(lists)};
      Keystone.list = Keystone.lists[!{JSON.stringify(list.key)}];
      Keystone.wysiwyg = { options: !{JSON.stringify(wysiwygOptions)} };
      // Support for the POST-based create process
      Keystone.showCreateForm = !{JSON.stringify(showCreateForm)};
      Keystone.createFormData = !{JSON.stringify(submitted)};
      Keystone.createFormErrors = !{JSON.stringify(createErrors || null)};
      Keystone.previewOrigin = !{JSON.stringify(previewOrigin)};
    script(src='#{adminPath}/js/packages.js')
    script(src='#{adminPath}/js/fields.js')
    script(src='#{adminPath}/js/list.js')
    include includes/script/ga
