From 97101633ca5f0a94560d18adc0df41ca8f60eed7 Mon Sep 17 00:00:00 2001 From: Philip Arndt Date: Tue, 23 Nov 2010 09:34:11 +1300 Subject: Consistent whitespace. --- app/controllers/blog/categories_controller.rb | 4 ++-- app/controllers/blog/posts_controller.rb | 8 ++++---- app/controllers/blog_controller.rb | 4 ++-- app/helpers/blog_posts_helper.rb | 6 +++--- app/models/blog/comment_mailer.rb | 2 +- app/models/blog_category.rb | 8 ++++---- app/models/blog_comment.rb | 2 +- app/views/admin/blog/_submenu.html.erb | 2 +- app/views/admin/blog/categories/_form.html.erb | 4 ++-- app/views/admin/blog/categories/edit.html.erb | 2 +- app/views/admin/blog/categories/index.html.erb | 2 +- app/views/admin/blog/categories/new.html.erb | 2 +- app/views/admin/blog/comments/_comment.html.erb | 4 ++-- app/views/admin/blog/comments/index.html.erb | 10 +++++----- app/views/admin/blog/comments/show.html.erb | 2 +- app/views/admin/blog/posts/_form.css.erb | 2 +- app/views/admin/blog/posts/_form.js.erb | 2 +- app/views/admin/blog/posts/index.html.erb | 2 +- app/views/blog/categories/show.html.erb | 2 +- app/views/blog/posts/_nav.html.erb | 2 +- app/views/blog/posts/_post.html.erb | 4 ++-- app/views/blog/posts/archive.html.erb | 2 +- app/views/blog/posts/index.html.erb | 2 +- app/views/blog/posts/show.html.erb | 2 +- app/views/blog/shared/_categories.html.erb | 2 +- app/views/blog/shared/_post.html.erb | 2 +- app/views/blog/shared/_posts.html.erb | 2 +- app/views/blog/shared/_rss_feed.html.erb | 2 +- 28 files changed, 45 insertions(+), 45 deletions(-) (limited to 'app') diff --git a/app/controllers/blog/categories_controller.rb b/app/controllers/blog/categories_controller.rb index 71ceec1..4795e99 100644 --- a/app/controllers/blog/categories_controller.rb +++ b/app/controllers/blog/categories_controller.rb @@ -3,5 +3,5 @@ class Blog::CategoriesController < BlogController def show @category = BlogCategory.find(params[:id]) end - -end \ No newline at end of file + +end diff --git a/app/controllers/blog/posts_controller.rb b/app/controllers/blog/posts_controller.rb index 95ccbbe..8dd8ada 100644 --- a/app/controllers/blog/posts_controller.rb +++ b/app/controllers/blog/posts_controller.rb @@ -1,8 +1,8 @@ class Blog::PostsController < BlogController - + before_filter :find_all_blog_posts, :except => [:archive] before_filter :find_blog_post, :only => [:show, :comment, :update_nav] - + respond_to :html, :js, :rss if Rails.version >= '3.0.0' def index @@ -18,7 +18,7 @@ class Blog::PostsController < BlogController def show @blog_comment = BlogComment.new - + if Rails.version < '3.0.0' # TODO: respond_to block else @@ -55,7 +55,7 @@ class Blog::PostsController < BlogController render :action => 'show' end end - + def archive date = "#{params[:month]}/#{params[:year]}" @archive_date = Time.parse(date) diff --git a/app/controllers/blog_controller.rb b/app/controllers/blog_controller.rb index 2efeaa4..f51d5bb 100644 --- a/app/controllers/blog_controller.rb +++ b/app/controllers/blog_controller.rb @@ -1,5 +1,5 @@ class BlogController < ApplicationController - + helper :blog_posts before_filter :find_page, :find_all_blog_categories @@ -13,4 +13,4 @@ protected @blog_categories = BlogCategory.all end -end \ No newline at end of file +end diff --git a/app/helpers/blog_posts_helper.rb b/app/helpers/blog_posts_helper.rb index a74ec33..e690a51 100644 --- a/app/helpers/blog_posts_helper.rb +++ b/app/helpers/blog_posts_helper.rb @@ -4,10 +4,10 @@ module BlogPostsHelper return nil if posts.blank? html = '

Archives

' html.html_safe end - + def next_or_previous?(post) post.next.present? or post.prev.present? end diff --git a/app/models/blog/comment_mailer.rb b/app/models/blog/comment_mailer.rb index dac526d..acef313 100644 --- a/app/models/blog/comment_mailer.rb +++ b/app/models/blog/comment_mailer.rb @@ -1 +1 @@ -require File.expand_path('../../../mailers/blog/comment_mailer', __FILE__) \ No newline at end of file +require File.expand_path('../../../mailers/blog/comment_mailer', __FILE__) diff --git a/app/models/blog_category.rb b/app/models/blog_category.rb index c78a7a4..89bff27 100644 --- a/app/models/blog_category.rb +++ b/app/models/blog_category.rb @@ -8,16 +8,16 @@ class BlogCategory < ActiveRecord::Base validates_uniqueness_of :title has_friendly_id :title, :use_slug => true - + # this might be able to be optimised a little more def post_count count = 0 - + self.posts.each do |p| count += 1 if p.live? end - + count end - + end diff --git a/app/models/blog_comment.rb b/app/models/blog_comment.rb index 7a4af50..63f9731 100644 --- a/app/models/blog_comment.rb +++ b/app/models/blog_comment.rb @@ -119,4 +119,4 @@ class BlogComment < ActiveRecord::Base end end -end \ No newline at end of file +end diff --git a/app/views/admin/blog/_submenu.html.erb b/app/views/admin/blog/_submenu.html.erb index 6f27722..dcf2f4e 100644 --- a/app/views/admin/blog/_submenu.html.erb +++ b/app/views/admin/blog/_submenu.html.erb @@ -86,4 +86,4 @@ <% end %> <% else %> <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog')%> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/blog/categories/_form.html.erb b/app/views/admin/blog/categories/_form.html.erb index 247f31b..28227ae 100644 --- a/app/views/admin/blog/categories/_form.html.erb +++ b/app/views/admin/blog/categories/_form.html.erb @@ -8,7 +8,7 @@ :include_object_name => true } %> <% end %> - +
<%= f.label :title -%> <%= f.text_field :title, :class => 'larger widest' -%> @@ -20,4 +20,4 @@ :continue_editing => false, :delete_title => t('admin.blog.categories.category.delete') } %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/blog/categories/edit.html.erb b/app/views/admin/blog/categories/edit.html.erb index 42509a2..2872e82 100644 --- a/app/views/admin/blog/categories/edit.html.erb +++ b/app/views/admin/blog/categories/edit.html.erb @@ -1 +1 @@ -<%= render :partial => "form" %> \ No newline at end of file +<%= render :partial => "form" %> diff --git a/app/views/admin/blog/categories/index.html.erb b/app/views/admin/blog/categories/index.html.erb index 9bd50a8..d9ccae6 100644 --- a/app/views/admin/blog/categories/index.html.erb +++ b/app/views/admin/blog/categories/index.html.erb @@ -27,4 +27,4 @@

<% end %> <% end %> -
\ No newline at end of file + diff --git a/app/views/admin/blog/categories/new.html.erb b/app/views/admin/blog/categories/new.html.erb index 42509a2..2872e82 100644 --- a/app/views/admin/blog/categories/new.html.erb +++ b/app/views/admin/blog/categories/new.html.erb @@ -1 +1 @@ -<%= render :partial => "form" %> \ No newline at end of file +<%= render :partial => "form" %> diff --git a/app/views/admin/blog/comments/_comment.html.erb b/app/views/admin/blog/comments/_comment.html.erb index 52a8167..1817c48 100644 --- a/app/views/admin/blog/comments/_comment.html.erb +++ b/app/views/admin/blog/comments/_comment.html.erb @@ -10,10 +10,10 @@ :target => "_blank" unless comment.unmoderated? %> <%= link_to refinery_icon_tag('zoom.png'), admin_blog_comment_path(comment), :title => t('.read') %> - <%= link_to refinery_icon_tag("cross.png"), + <%= link_to refinery_icon_tag("cross.png"), rejected_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), :title => t('.reject') unless comment.rejected? %> - <%= link_to refinery_icon_tag("tick.png"), + <%= link_to refinery_icon_tag("tick.png"), approved_admin_blog_comment_path(comment, :return_to => request.path.split('/').last.gsub(/^comments$/, 'index')), :title => t('.approve') unless comment.approved? %> diff --git a/app/views/admin/blog/comments/index.html.erb b/app/views/admin/blog/comments/index.html.erb index c1596a6..fbf268d 100644 --- a/app/views/admin/blog/comments/index.html.erb +++ b/app/views/admin/blog/comments/index.html.erb @@ -3,7 +3,7 @@ <% if searching? %>

<%= t('shared.admin.search.results_for', :query => params[:search]) %>

<% if @blog_comments.any? %> - <%=# will_paginate @blog_comments + <%=# will_paginate @blog_comments %> - <%=# will_paginate @blog_comments + <%=# will_paginate @blog_comments %> <% else %>

<%= t('admin.search_no_results') %>

<% end %> <% else %> <% if @blog_comments.any? %> - <%=# will_paginate @blog_comments + <%=# will_paginate @blog_comments %> <%= render :partial => "sortable_list" %> - <%=# will_paginate @blog_comments + <%=# will_paginate @blog_comments %> <% else %>

@@ -32,4 +32,4 @@

<% end %> <% end %> - \ No newline at end of file + diff --git a/app/views/admin/blog/comments/show.html.erb b/app/views/admin/blog/comments/show.html.erb index 82a5f6f..4faa2de 100644 --- a/app/views/admin/blog/comments/show.html.erb +++ b/app/views/admin/blog/comments/show.html.erb @@ -63,4 +63,4 @@ <% content_for :head, stylesheet_link_tag('refinery/refinerycms-blog') %> <% else %> <% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog') %> -<% end %> \ No newline at end of file +<% end %> diff --git a/app/views/admin/blog/posts/_form.css.erb b/app/views/admin/blog/posts/_form.css.erb index d6f2c20..05c18cf 100644 --- a/app/views/admin/blog/posts/_form.css.erb +++ b/app/views/admin/blog/posts/_form.css.erb @@ -4,4 +4,4 @@ margin: 0px; padding: 0px; } - \ No newline at end of file + diff --git a/app/views/admin/blog/posts/_form.js.erb b/app/views/admin/blog/posts/_form.js.erb index 394975f..1d65448 100644 --- a/app/views/admin/blog/posts/_form.js.erb +++ b/app/views/admin/blog/posts/_form.js.erb @@ -10,4 +10,4 @@ }, 250); }); }); - \ No newline at end of file + diff --git a/app/views/admin/blog/posts/index.html.erb b/app/views/admin/blog/posts/index.html.erb index ae825eb..d8c45a9 100644 --- a/app/views/admin/blog/posts/index.html.erb +++ b/app/views/admin/blog/posts/index.html.erb @@ -27,4 +27,4 @@

<% end %> <% end %> - \ No newline at end of file + diff --git a/app/views/blog/categories/show.html.erb b/app/views/blog/categories/show.html.erb index 54b5169..324c0fe 100644 --- a/app/views/blog/categories/show.html.erb +++ b/app/views/blog/categories/show.html.erb @@ -17,4 +17,4 @@ <% end %> <%= render :partial => "/shared/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> \ No newline at end of file +<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> diff --git a/app/views/blog/posts/_nav.html.erb b/app/views/blog/posts/_nav.html.erb index 309cd64..e478ca6 100644 --- a/app/views/blog/posts/_nav.html.erb +++ b/app/views/blog/posts/_nav.html.erb @@ -10,4 +10,4 @@ <%= link_to "« ".html_safe + truncate(@blog_post.prev.title), @blog_post.prev, :class => 'prev', :"data-nav-url" => update_blog_nav_path(@blog_post.prev) %> <% end -%> -<% end -%> \ No newline at end of file +<% end -%> diff --git a/app/views/blog/posts/_post.html.erb b/app/views/blog/posts/_post.html.erb index 3af89a8..b3efbe9 100644 --- a/app/views/blog/posts/_post.html.erb +++ b/app/views/blog/posts/_post.html.erb @@ -8,7 +8,7 @@

<%= @blog_post.title %>

<% if (categories = @blog_post.categories).any? %>