From 9310b4176047dc24fce5841237441882ffee2e2f Mon Sep 17 00:00:00 2001 From: Kyle Wilkinson Date: Mon, 13 Jun 2011 18:06:26 -0700 Subject: Modify the category view of the blog to show a paged view, rather than all blog posts. --- app/views/blog/categories/show.html.erb | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'app/views') diff --git a/app/views/blog/categories/show.html.erb b/app/views/blog/categories/show.html.erb index 324c0fe..caecbfd 100644 --- a/app/views/blog/categories/show.html.erb +++ b/app/views/blog/categories/show.html.erb @@ -1,14 +1,13 @@ <% content_for :body_content_title, @category.title %> <% content_for :body_content_left do %> - <% if @category.posts.any? %> -
- <%= render :partial => "/blog/shared/post", :collection => @category.posts %> -
+ <% if @blog_posts.any? %> +
+ <%= render :partial => "/blog/shared/post", :collection => @blog_posts %> + <%= will_paginate @blog_posts %> +
<% else %> -

- <%= t('.no_posts') %> -

+

<%= t('.no_blog_articles_yet') %>

<% end %> <% end %> -- cgit v1.2.3 From a31f28126a0099fbf3f4f694c52b109e73c92e08 Mon Sep 17 00:00:00 2001 From: Kyle Wilkinson Date: Mon, 13 Jun 2011 18:12:51 -0700 Subject: Use the correct message for no posts on category show page. --- app/views/blog/categories/show.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views') diff --git a/app/views/blog/categories/show.html.erb b/app/views/blog/categories/show.html.erb index caecbfd..40444ec 100644 --- a/app/views/blog/categories/show.html.erb +++ b/app/views/blog/categories/show.html.erb @@ -7,7 +7,9 @@ <%= will_paginate @blog_posts %> <% else %> -

<%= t('.no_blog_articles_yet') %>

+

+ <%= t('.no_posts') %> +

<% end %> <% end %> -- cgit v1.2.3