Made it so that comments and the body_content_right have been further refactored out, so that they can be easily overridden. body_content_right can also now have things prepended and appended to it.

This commit is contained in:
Justin Ricaurte 2011-07-30 13:11:22 -07:00
parent bd3591c6d1
commit 999f9e7c0e
2 changed files with 49 additions and 0 deletions

View file

@ -0,0 +1,40 @@
<aside id="comments">
<h2><%= t('.comments.title') %></h2>
<% if (comments = @blog_post.comments.approved).any? %>
<%= render :partial => "comment", :collection => comments %>
<% else %>
<p>
<%= t('none', :scope => 'refinery.blog.shared.comments') %>.
</p>
<% end %>
<% flash.each do |key, value| %>
<div id='flash' class="flash flash_<%= key %>">
<%= value %>
</div>
<% end %>
<h2><%= t('.comments.add') %></h2>
<%= form_for [main_app, :blog_post, @blog_comment] do |f| %>
<%= render :partial => "/refinery/admin/error_messages",
:locals => {
:object => f.object,
:include_object_name => true
} %>
<div class='field'>
<%= f.label :name %>
<%= f.text_field :name %>
</div>
<div class='field'>
<%= f.label :email %>
<%= f.email_field :email %>
</div>
<div class='field message_field'>
<%= f.label :message %>
<%= f.text_area :message, :rows => 6 %>
</div>
<div class='field form-actions'>
<%= f.submit t('.submit') %>
</div>
<% end %>
</aside>

View file

@ -0,0 +1,9 @@
<% content_for :body_content_right do %>
<%= yield(:body_content_right_prepend) %>
<%= render :partial => "/refinery/blog/shared/rss_feed" %>
<%= render :partial => "/refinery/blog/shared/categories" %>
<%= render :partial => "/refinery/blog/shared/tags" %>
<%= render :partial => "/refinery/blog/shared/posts" %>
<%= blog_archive_widget %>
<%= yield(:body_content_right_append) %>
<% end %>