diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/common/_left_sidebar.html.erb | 9 | ||||
-rw-r--r-- | app/views/common/_sidebar_module.html.erb | 10 |
2 files changed, 11 insertions, 8 deletions
diff --git a/app/views/common/_left_sidebar.html.erb b/app/views/common/_left_sidebar.html.erb index bf3b3a8..968f1fa 100644 --- a/app/views/common/_left_sidebar.html.erb +++ b/app/views/common/_left_sidebar.html.erb @@ -1,10 +1,3 @@ <div id="left_sidebar"> - <% @sidebar_contents.keys.each do |c| -%> - <div class="sidebar_content"> - <h1><%= c %></h1> - <ul><%- @sidebar_contents[c].each do |p| %> - <li><%= p.title %></li> - <% end %></ul> - </div> - <% end -%> + <%= render "common/sidebar_module", :modules => @sidebar_modules[:left] %> </div> diff --git a/app/views/common/_sidebar_module.html.erb b/app/views/common/_sidebar_module.html.erb new file mode 100644 index 0000000..41f51e7 --- /dev/null +++ b/app/views/common/_sidebar_module.html.erb @@ -0,0 +1,10 @@ + <% modules.keys.each do |c| -%> + <div class="sidebar_content"> + <h1><%= c %></h1> + <%- modules[c].each do |entry| %> + <%= entry.title %> + <%= entry.body %> + <% end %> + </div> + <% end -%> + |