Permalink
Browse files

Changed chapters html to view layer

  • Loading branch information...
1 parent af6f300 commit 82f36c2b82dffa97797e6df236017237c0bd943b @felipefontoura felipefontoura committed with wagenet Mar 18, 2011
Showing with 5 additions and 9 deletions.
  1. +1 −8 lib/guides/generator.rb
  2. +4 −1 lib/guides/templates/source/layout.html.erb
View
@@ -195,11 +195,7 @@ def set_header_section(body, view, processor)
end
def set_index(body, view, processor)
- index = <<-INDEX
- <div id="subCol">
- <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
- <ol class="chapters">
- INDEX
+ index = ""
i = Indexer.new(body, warnings, @production)
i.index
@@ -223,9 +219,6 @@ def set_index(body, view, processor)
index << view.content_tag(:li, link.html_safe + children_ul.html_safe)
end
- index << '</ol>'
- index << '</div>'
-
view.content_for(:index_section) { index.html_safe }
i.result
@@ -54,7 +54,10 @@
<h2><%= Guides.meta["title"] %></h2>
<p><%= Guides.meta["description"] %></p>
<% end %>
- <%= yield(:index_section) %>
+ <div id="subCol">
+ <h3 class="chapter"><img src="images/chapters_icon.gif" alt="" />Chapters</h3>
+ <ol class="chapters"><%= yield(:index_section) %></ol>
+ </div>
</div>
</div>

0 comments on commit 82f36c2

Please sign in to comment.