Permalink
Browse files

Updated theme layout to include a :head_content block

  • Loading branch information...
1 parent bb94f1d commit 734c8f25cc14686b461576fc26d0f68d476e1d88 @awd committed Apr 23, 2012
Showing with 12 additions and 7 deletions.
  1. +2 −2 Gemfile.lock
  2. +2 −4 app/views/layouts/theme.html.erb
  3. +8 −1 spec/dummy/app/views/browse/course.html.erb
View
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
- woople-theme (0.2.0)
+ woople-theme (0.2.1)
less-rails-bootstrap
rails (~> 3.2.2)
@@ -137,7 +137,7 @@ GEM
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
- tzinfo (0.3.32)
+ tzinfo (0.3.33)
xpath (0.1.4)
nokogiri (~> 1.3)
@@ -10,10 +10,8 @@
<%= javascript_include_tag "woople-theme/theme" %>
<%= application_javascript %>
<%= csrf_meta_tags %>
-
- <script>
- <%= 'var showingPlayer = true;' if @video.present? %>
- </script>
+
+ <%= yield :head_content %>
</head>
<body>
@@ -1,3 +1,10 @@
+<% content_for(:head_content) do %>
+ <% if @video.present? %>
+ <script>
+ var showingPlayer = true;
+ </script>
+ <% end %>
+<% end %>
<% content_for(:body_content) do %>
<%= video_modal(@video) if @video.present? %>
<% end %>
@@ -13,4 +20,4 @@
<%= outline.assessment %>
<% end %>
<% end %>
-</section>
+</section>

0 comments on commit 734c8f2

Please sign in to comment.