doctype html
html lang="en"
  head
    title= content_for?(:title) ? yield(:title) : application_title
    meta charset="utf-8"
    meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"
    meta name="viewport" content="width=device-width, initial-scale=1.0"
    link href="/favicon.ico" rel="shortcut icon"
    = csrf_meta_tags
    javascript:
      var tinymce_language = '#{I18n.locale}';

    /! Le HTML5 shim, for IE6-8 support of HTML elements
    /[if lt IE 9]
      = javascript_include_tag "http://html5shim.googlecode.com/svn/trunk/html5.js"
    = stylesheet_link_tag "cmtool/application", :media => "all"
    = javascript_include_tag "cmtool/application"
    = yield(:head)
    javascript:
      $(function(){
        //Onload
        #{yield(:onload_javascript)}
      });

  body
    = render 'cmtool/application/menu'
    .container

      .content
        - if flash[:alert].present?
          .alert.alert-error
            a.close data-dismiss="alert" &#215;
            div= flash[:alert]
        - if flash[:notice].present?
          .alert.alert-success
            a.close data-dismiss="alert" &#215;
            div= flash[:notice]
        .row
          .span9
            = content_for?(:content) ? yield(:content) : yield
            - if content_for?(:page_links)
              #sub-navigation-container.form-actions = yield(:page_links)
          .span3
            .well.sidebar-nav
              h3= content_for?(:page_title) ? yield(:page_title) : application_title
              ul.nav.nav-list
                li.nav-header Links
                li= link_to "Home", root_path
                li= link_to 'Wiki', 'https://github.com/bterkuile/cmtool/wiki', target: :_blank
            = yield :sidebar
      footer
        p &copy; Cmtool 2013
    = yield :footer
    #hidden-html.hide= yield :hidden_html
