!!! %head

%title= @title
:javascript
  var ROOT = "#{url('/')}";
= include_gon
- %w{dygraph-combined.js jquery-1.7.2.min.js jquery-ui-1.8.16.bootstrap.min.js jquery-ui-timepicker-addon.js json2.js underscore-min.js backbone-min.js application.js bootstrap.js}.each do |jsfile|
  %script{type: 'text/javascript', src: url("/js/#{jsfile}")}
- %w{bootstrap.min.css application.css jquery-ui-1.8.16.bootstrap.css}.each do |cssfile|
  %link{rel: 'stylesheet', href: url("/css/#{cssfile}"), type: 'text/css', media: 'screen'}
%script{type: 'text/javascript', src: "https://www.google.com/jsapi"}
:javascript
  google.load("visualization", "1", {packages:["corechart"]});
  google.setOnLoadCallback(drawChart);
  function drawChart() {
    document.startApp();
  }

%body

- %w(line stack).each do |wtype|
  = partial "widgets/#{wtype}"
= partial "sensors"

.navbar.navbar-fixed-top
  .navbar-inner
    .container-fluid
      %table
        %tr
          %td.brand-container
            %a.brand{href: '#/custom'}= @title
          %td
            %ul.nav#page-titles

.container-fluid#main
  .row-fluid#widgets