diff options
author | Justin Ricaurte <justin@justinricaurte.com> | 2011-07-30 13:11:22 -0700 |
---|---|---|
committer | Justin Ricaurte <justin@justinricaurte.com> | 2011-07-30 13:11:22 -0700 |
commit | 999f9e7c0e15610f7f36a6044fd0005f9fa8f258 (patch) | |
tree | 6d791b7cdf3089b712bdacf8917399b8d400a3fc /app | |
parent | bd3591c6d16c8910937695161daa4bc1f35d4aea (diff) | |
download | refinerycms-blog-999f9e7c0e15610f7f36a6044fd0005f9fa8f258.tar.gz refinerycms-blog-999f9e7c0e15610f7f36a6044fd0005f9fa8f258.tar.bz2 refinerycms-blog-999f9e7c0e15610f7f36a6044fd0005f9fa8f258.zip |
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.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/refinery/blog/posts/_comments.html.erb | 40 | ||||
-rw-r--r-- | app/views/refinery/blog/shared/_body_content_right.html.erb | 9 |
2 files changed, 49 insertions, 0 deletions
diff --git a/app/views/refinery/blog/posts/_comments.html.erb b/app/views/refinery/blog/posts/_comments.html.erb new file mode 100644 index 0000000..5157ed9 --- /dev/null +++ b/app/views/refinery/blog/posts/_comments.html.erb @@ -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> diff --git a/app/views/refinery/blog/shared/_body_content_right.html.erb b/app/views/refinery/blog/shared/_body_content_right.html.erb new file mode 100644 index 0000000..bd73d1c --- /dev/null +++ b/app/views/refinery/blog/shared/_body_content_right.html.erb @@ -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 %> |