Compare commits
15 commits
master
...
2-0-stable
Author | SHA1 | Date | |
---|---|---|---|
![]() |
48cdc50e31 | ||
![]() |
e1d6eb4ef1 | ||
![]() |
7856e98f6a | ||
![]() |
6359997b05 | ||
![]() |
940046daf6 | ||
![]() |
b335ea5482 | ||
![]() |
172134f971 | ||
![]() |
e9406d2693 | ||
![]() |
6cbf130c83 | ||
![]() |
01fa464c33 | ||
![]() |
87b9aacb98 | ||
![]() |
93c2726f0b | ||
![]() |
5b0828b408 | ||
![]() |
822c933f56 | ||
![]() |
bb900f1995 |
15 changed files with 24 additions and 18 deletions
2
Gemfile
2
Gemfile
|
@ -2,7 +2,7 @@ source "http://rubygems.org"
|
|||
|
||||
gemspec
|
||||
|
||||
gem 'refinerycms', '~> 2.0.0'
|
||||
gem 'refinerycms', '~> 2.0.3'
|
||||
|
||||
group :development, :test do
|
||||
require 'rbconfig'
|
||||
|
|
|
@ -2,7 +2,7 @@ module Refinery
|
|||
module Blog
|
||||
class PostsController < BlogController
|
||||
|
||||
caches_page :index
|
||||
caches_page :index, :unless => proc {|c| c.refinery_user_signed_in? || c.flash.any? || params[:page].present? }
|
||||
|
||||
before_filter :find_all_blog_posts, :except => [:archive]
|
||||
before_filter :find_blog_post, :only => [:show, :comment, :update_nav]
|
||||
|
|
|
@ -5,7 +5,7 @@ module Refinery
|
|||
def notification(comment, request)
|
||||
@comment = comment
|
||||
mail :subject => Blog::Comment::Notification.subject,
|
||||
:recipients => Blog::Comment::Notification.recipients,
|
||||
:to => Blog::Comment::Notification.recipients,
|
||||
:from => "\"#{Refinery::Core.site_name}\" <no-reply@#{request.domain}>"
|
||||
end
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ module Refinery
|
|||
|
||||
validates :title, :presence => true, :uniqueness => true
|
||||
|
||||
attr_accessible :title
|
||||
|
||||
def post_count
|
||||
posts.select(&:live?).count
|
||||
end
|
||||
|
@ -20,4 +22,4 @@ module Refinery
|
|||
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
require File.expand_path('../../../../mailers/refinery/blog/comment_mailer', __FILE__)
|
|
@ -4,6 +4,7 @@ module Refinery
|
|||
self.table_name = 'refinery_blog_categories_blog_posts'
|
||||
belongs_to :blog_post, :class_name => 'Refinery::Blog::Post', :foreign_key => :blog_post_id
|
||||
belongs_to :blog_category, :class_name => 'Refinery::Blog::Category', :foreign_key => :blog_category_id
|
||||
|
||||
|
||||
attr_accessible :blog_category_id, :blog_post_id
|
||||
end
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
<% content_for :body_content_title, @category.title %>
|
||||
|
||||
<% content_for :body_content_left do %>
|
||||
<% content_for :body do %>
|
||||
<% if @posts.any? %>
|
||||
<section id="blog_posts">
|
||||
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
|
||||
|
@ -13,7 +13,7 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :body_content_right do %>
|
||||
<% content_for :side_body do %>
|
||||
<%= render :partial => "/refinery/blog/shared/categories" %>
|
||||
<% end %>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<% content_for :title, "#{t('.blog_archive_for', :date => @archive_date.strftime('%B %Y'))}" %>
|
||||
|
||||
<% content_for :body_content_left do %>
|
||||
<% content_for :body do %>
|
||||
<h1><%= t('.blog_archive_for', :date => @archive_date.strftime('%B %Y')) %></h1>
|
||||
<% if @posts.any? %>
|
||||
<section id="blog_posts">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% content_for :body_content_left do %>
|
||||
<% content_for :body do %>
|
||||
<%= raw @page.content_for(Refinery::Pages.default_parts.first.to_sym) if Refinery::Pages.default_parts.any? %>
|
||||
|
||||
<% if @posts.any? %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% content_for :body_content_left do %>
|
||||
<% content_for :body do %>
|
||||
<div id="show_blog_post">
|
||||
<%= render 'post' %>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<% content_for :body_content_title, "#{t('.posts_tagged')} “#{@tag_name.titleize}”".html_safe -%>
|
||||
|
||||
<% content_for :body_content_left do %>
|
||||
<% content_for :body do %>
|
||||
<% if @posts.any? %>
|
||||
<section id="blog_posts">
|
||||
<%= render :partial => "/refinery/blog/shared/post", :collection => @posts %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% content_for :body_content_right do %>
|
||||
<% content_for :side_body do %>
|
||||
<%= yield(:body_content_right_prepend) %>
|
||||
<%= render :partial => "/refinery/blog/shared/rss_feed" %>
|
||||
<%= render :partial => "/refinery/blog/shared/categories" %>
|
||||
|
|
|
@ -3,7 +3,7 @@ module Refinery
|
|||
class Version
|
||||
@major = 2
|
||||
@minor = 0
|
||||
@tiny = 1
|
||||
@tiny = 4
|
||||
|
||||
class << self
|
||||
attr_reader :major, :minor, :tiny
|
||||
|
|
|
@ -27,10 +27,14 @@ Next, to install the blog plugin run:
|
|||
|
||||
rails generate refinery:blog
|
||||
|
||||
Finally migrate your database and you're done.
|
||||
Run database migrations:
|
||||
|
||||
rake db:migrate
|
||||
|
||||
|
||||
Finally seed your database and you're done.
|
||||
|
||||
rake db:seed
|
||||
|
||||
## Developing & Contributing
|
||||
|
||||
The version of Refinery to develop this engine against is defined in the gemspec. To override the version of refinery to develop against, edit the project Gemfile to point to a local path containing a clone of refinerycms.
|
||||
|
|
|
@ -18,11 +18,11 @@ Gem::Specification.new do |s|
|
|||
s.test_files = `git ls-files -- spec/*`.split("\n")
|
||||
|
||||
# Runtime dependencies
|
||||
s.add_dependency 'refinerycms-core', '~> 2.0.1'
|
||||
s.add_dependency 'refinerycms-core', '~> 2.0.3'
|
||||
s.add_dependency 'refinerycms-settings', '~> 2.0.1'
|
||||
s.add_dependency 'filters_spam', '~> 0.2'
|
||||
s.add_dependency 'acts-as-taggable-on'
|
||||
s.add_dependency 'seo_meta', '~> 1.2.0'
|
||||
s.add_dependency 'seo_meta', '~> 1.3.0'
|
||||
s.add_dependency 'rails_autolink'
|
||||
|
||||
# Development dependencies
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue