comfy_blog 0.1.8 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +16 -0
- data/.travis.yml +11 -0
- data/Gemfile +8 -6
- data/LICENSE +2 -2
- data/README.md +22 -56
- data/Rakefile +19 -16
- data/app/controllers/admin/blog/base_controller.rb +11 -2
- data/app/controllers/admin/blog/blogs_controller.rb +51 -0
- data/app/controllers/admin/blog/comments_controller.rb +16 -17
- data/app/controllers/admin/blog/posts_controller.rb +26 -26
- data/app/controllers/blog/base_controller.rb +31 -0
- data/app/controllers/blog/comments_controller.rb +25 -27
- data/app/controllers/blog/posts_controller.rb +36 -29
- data/app/models/blog/blog.rb +29 -0
- data/app/models/blog/comment.rb +7 -9
- data/app/models/blog/post.rb +17 -55
- data/app/views/admin/blog/blogs/_form.html.haml +11 -0
- data/app/views/admin/blog/blogs/edit.html.haml +5 -0
- data/app/views/admin/blog/blogs/index.html.haml +26 -0
- data/app/views/admin/blog/blogs/new.html.haml +5 -0
- data/app/views/admin/blog/comments/_comment.html.haml +17 -0
- data/app/views/admin/blog/comments/index.html.haml +17 -0
- data/app/views/admin/blog/comments/toggle_publish.js.erb +1 -0
- data/app/views/admin/blog/partials/_navigation.html.haml +6 -0
- data/app/views/admin/blog/posts/_form.html.haml +13 -0
- data/app/views/admin/blog/posts/edit.html.haml +5 -0
- data/app/views/admin/blog/posts/index.html.haml +32 -0
- data/app/views/admin/blog/posts/new.html.haml +5 -0
- data/app/views/blog/comments/_form.html.haml +10 -0
- data/app/views/blog/posts/index.html.haml +13 -0
- data/app/views/blog/posts/index.rss.builder +7 -5
- data/app/views/blog/posts/show.html.haml +18 -0
- data/app/views/layouts/blog/application.html.haml +7 -0
- data/comfy_blog.gemspec +16 -128
- data/config.ru +1 -1
- data/config/application.rb +6 -26
- data/config/blog_routes.rb +6 -0
- data/config/boot.rb +1 -2
- data/config/database.yml +2 -16
- data/config/environments/development.rb +10 -16
- data/config/environments/test.rb +14 -20
- data/config/initializers/comfy_blog.rb +1 -16
- data/config/initializers/secret_token.rb +14 -2
- data/db/migrate/00_create_cms.rb +137 -0
- data/db/migrate/01_create_blog.rb +52 -0
- data/lib/comfy_blog.rb +14 -17
- data/lib/comfy_blog/configuration.rb +1 -35
- data/lib/comfy_blog/engine.rb +17 -11
- data/lib/comfy_blog/routing.rb +38 -0
- data/lib/comfy_blog/version.rb +3 -0
- data/lib/generators/comfy/blog/README +7 -7
- data/lib/generators/comfy/blog/blog_generator.rb +24 -10
- data/script/rails +1 -1
- data/test/controllers/admin/blog/blogs_controller_test.rb +94 -0
- data/test/controllers/admin/blog/comments_controller_test.rb +57 -0
- data/test/{functional → controllers}/admin/blog/posts_controller_test.rb +31 -31
- data/test/controllers/blog/comments_controller_test.rb +36 -0
- data/test/controllers/blog/posts_controller_test.rb +80 -0
- data/test/fixtures/blog/blogs.yml +7 -0
- data/test/fixtures/blog/posts.yml +1 -0
- data/test/fixtures/cms/sites.yml +4 -0
- data/test/fixtures/generators/blog/routes.rb +6 -0
- data/test/generators/blog_generator_test.rb +19 -0
- data/test/lib/configuration_test.rb +16 -0
- data/test/models/blog/blog_test.rb +59 -0
- data/test/{unit/comment_test.rb → models/blog/comments_test.rb} +4 -5
- data/test/models/blog/posts_test.rb +88 -0
- data/test/test_helper.rb +80 -27
- metadata +53 -111
- data/VERSION +0 -1
- data/app/assets/images/rails.png +0 -0
- data/app/assets/javascripts/application.js +0 -8
- data/app/controllers/admin/blog/tags_controller.rb +0 -56
- data/app/controllers/application_controller.rb +0 -5
- data/app/helpers/blog/application_helper.rb +0 -23
- data/app/models/.gitkeep +0 -0
- data/app/models/blog/tag.rb +0 -25
- data/app/models/blog/tagging.rb +0 -22
- data/app/views/admin/blog/_navigation.html.erb +0 -1
- data/app/views/admin/blog/comments/_comment.html.erb +0 -22
- data/app/views/admin/blog/comments/destroy.js.erb +0 -3
- data/app/views/admin/blog/comments/index.html.erb +0 -12
- data/app/views/admin/blog/comments/publish.js.erb +0 -1
- data/app/views/admin/blog/posts/_form.html.erb +0 -37
- data/app/views/admin/blog/posts/_post.html.erb +0 -29
- data/app/views/admin/blog/posts/edit.html.erb +0 -5
- data/app/views/admin/blog/posts/index.html.erb +0 -15
- data/app/views/admin/blog/posts/new.html.erb +0 -5
- data/app/views/admin/blog/tags/_form.html.erb +0 -20
- data/app/views/admin/blog/tags/_tag.html.erb +0 -16
- data/app/views/admin/blog/tags/edit.html.erb +0 -5
- data/app/views/admin/blog/tags/index.html.erb +0 -9
- data/app/views/admin/blog/tags/new.html.erb +0 -5
- data/app/views/blog/comments/_comment.html.erb +0 -4
- data/app/views/blog/comments/_disqus.html.erb +0 -14
- data/app/views/blog/comments/_form.html.erb +0 -6
- data/app/views/blog/comments/create.js.erb +0 -6
- data/app/views/blog/posts/_post.html.erb +0 -8
- data/app/views/blog/posts/index.html.erb +0 -9
- data/app/views/blog/posts/show.html.erb +0 -13
- data/app/views/layouts/application.html.erb +0 -17
- data/config/locales/en.yml +0 -5
- data/config/routes.rb +0 -37
- data/db/migrate/01_create_comfy_blog.rb +0 -55
- data/db/schema.rb +0 -63
- data/db/seeds.rb +0 -7
- data/lib/comfy_blog/core_ext/string.rb +0 -8
- data/lib/comfy_blog/form_builder.rb +0 -50
- data/lib/tasks/comfy_blog.rake +0 -4
- data/test/fixtures/.gitkeep +0 -0
- data/test/fixtures/blog/taggings.yml +0 -7
- data/test/fixtures/blog/tags.yml +0 -14
- data/test/functional/.gitkeep +0 -0
- data/test/functional/admin/blog/comments_controller_test.rb +0 -38
- data/test/functional/admin/blog/tags_controller_test.rb +0 -88
- data/test/functional/blog/comments_controller_test.rb +0 -78
- data/test/functional/blog/posts_controller_test.rb +0 -110
- data/test/integration/routing_test.rb +0 -26
- data/test/unit/.gitkeep +0 -0
- data/test/unit/configuration_test.rb +0 -29
- data/test/unit/helpers/blog/application_helper_test.rb +0 -10
- data/test/unit/post_test.rb +0 -147
- data/test/unit/tag_test.rb +0 -45
- data/test/unit/tagging_test.rb +0 -30
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.8
|
data/app/assets/images/rails.png
DELETED
Binary file
|
@@ -1,8 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into including all the files listed below.
|
2
|
-
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
|
3
|
-
// be included in the compiled file accessible from http://example.com/assets/application.js
|
4
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
5
|
-
// the compiled file.
|
6
|
-
//
|
7
|
-
//= require jquery
|
8
|
-
//= require jquery_ujs
|
@@ -1,56 +0,0 @@
|
|
1
|
-
class Admin::Blog::TagsController < Admin::Blog::BaseController
|
2
|
-
|
3
|
-
before_filter :build_tag, :only => [:new, :create]
|
4
|
-
before_filter :load_tag, :only => [:edit, :update, :destroy]
|
5
|
-
|
6
|
-
def index
|
7
|
-
@tags = Blog::Tag.order('is_category DESC', :name)
|
8
|
-
end
|
9
|
-
|
10
|
-
def edit
|
11
|
-
render
|
12
|
-
end
|
13
|
-
|
14
|
-
def new
|
15
|
-
render
|
16
|
-
end
|
17
|
-
|
18
|
-
def update
|
19
|
-
@tag.update_attributes!(params[:tag])
|
20
|
-
flash[:notice] = 'Blog Tag updated'
|
21
|
-
redirect_to :action => :index
|
22
|
-
|
23
|
-
rescue ActiveRecord::RecordInvalid
|
24
|
-
flash.now[:error] = 'Failed to update Blog Tag'
|
25
|
-
render :action => :edit
|
26
|
-
end
|
27
|
-
|
28
|
-
def create
|
29
|
-
@tag.save!
|
30
|
-
flash[:notice] = 'Blog Tag created'
|
31
|
-
redirect_to :action => :index
|
32
|
-
|
33
|
-
rescue ActiveRecord::RecordInvalid
|
34
|
-
flash.now[:error] = 'Failed to create Blog Tag'
|
35
|
-
render :action => :new
|
36
|
-
end
|
37
|
-
|
38
|
-
def destroy
|
39
|
-
@tag.destroy
|
40
|
-
flash[:notice] = 'Blog Tag removed'
|
41
|
-
redirect_to :action => :index
|
42
|
-
end
|
43
|
-
|
44
|
-
protected
|
45
|
-
|
46
|
-
def build_tag
|
47
|
-
@tag = Blog::Tag.new(params[:tag])
|
48
|
-
end
|
49
|
-
|
50
|
-
def load_tag
|
51
|
-
@tag = Blog::Tag.find(params[:id])
|
52
|
-
rescue ActiveRecord::RecordNotFound
|
53
|
-
flash[:error] = 'Blog Tag not found'
|
54
|
-
redirect_to :action => :index
|
55
|
-
end
|
56
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
module Blog::ApplicationHelper
|
2
|
-
|
3
|
-
def comfy_blog_form_for(record_or_name_or_array, *args, &proc)
|
4
|
-
options = args.extract_options!
|
5
|
-
form_for(
|
6
|
-
record_or_name_or_array,
|
7
|
-
*(args << options.merge(:builder => ComfyBlog.config.form_builder.to_s.constantize)),
|
8
|
-
&proc
|
9
|
-
)
|
10
|
-
end
|
11
|
-
|
12
|
-
# URL helpers for blog_post_(path/url)
|
13
|
-
%w(path url).each do |type|
|
14
|
-
define_method "blog_post_#{type}" do |post|
|
15
|
-
send("dated_blog_post_#{type}", post.year, ("%02d" % post.month), post.slug)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
def blah
|
20
|
-
'blah'
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
data/app/models/.gitkeep
DELETED
File without changes
|
data/app/models/blog/tag.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
class Blog::Tag < ActiveRecord::Base
|
2
|
-
|
3
|
-
self.table_name = :blog_tags
|
4
|
-
|
5
|
-
# -- Relationships --------------------------------------------------------
|
6
|
-
has_many :taggings, :dependent => :destroy
|
7
|
-
has_many :posts, :through => :taggings
|
8
|
-
|
9
|
-
# -- Validations ----------------------------------------------------------
|
10
|
-
validates_uniqueness_of :name, :case_sensitive => false
|
11
|
-
|
12
|
-
# -- Callbacks ------------------------------------------------------------
|
13
|
-
before_validation :strip_name
|
14
|
-
|
15
|
-
# -- Scopes ---------------------------------------------------------------
|
16
|
-
scope :categories, where(:is_category => true)
|
17
|
-
scope :tags, where(:is_category => false)
|
18
|
-
|
19
|
-
protected
|
20
|
-
|
21
|
-
def strip_name
|
22
|
-
self.name = self.name.strip if self.name
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
data/app/models/blog/tagging.rb
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
class Blog::Tagging < ActiveRecord::Base
|
2
|
-
|
3
|
-
self.table_name = :blog_taggings
|
4
|
-
|
5
|
-
# -- Relationships --------------------------------------------------------
|
6
|
-
belongs_to :post
|
7
|
-
belongs_to :tag, :counter_cache => true
|
8
|
-
|
9
|
-
# -- Callbacks ------------------------------------------------------------
|
10
|
-
after_destroy :destroy_tag
|
11
|
-
|
12
|
-
# -- Scopes ---------------------------------------------------------------
|
13
|
-
scope :for_tags, includes(:tag).where('blog_tags.is_category' => false)
|
14
|
-
scope :for_categories, includes(:tag).where('blog_tags.is_category' => true)
|
15
|
-
|
16
|
-
protected
|
17
|
-
|
18
|
-
def destroy_tag
|
19
|
-
self.tag.destroy if !self.tag.is_category? && self.tag.taggings.count == 0
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
<li><%= active_link_to 'Blog posts', admin_blog_posts_path %></li>
|
@@ -1,22 +0,0 @@
|
|
1
|
-
<li id='<%= dom_id(comment) %>'>
|
2
|
-
<div class='item'>
|
3
|
-
<div class='icon' style="background-image:url(http://www.gravatar.com/avatar/<%=Digest::MD5.hexdigest(comment.email.downcase)%>?s=28&d=identicon)"></div>
|
4
|
-
<div class='action_links'>
|
5
|
-
<% unless comment.is_published? %>
|
6
|
-
<%= link_to 'Publish', publish_admin_blog_comment_path(comment), :remote => true, :method => :put %>
|
7
|
-
<% end %>
|
8
|
-
<%= link_to 'Delete', admin_blog_comment_path(comment), :method => 'delete', :confirm => 'Are you sure?' %>
|
9
|
-
</div>
|
10
|
-
<div class='label'>
|
11
|
-
<div class='sublabel'>
|
12
|
-
<em>
|
13
|
-
<%= time_ago_in_words(comment.created_at) %> ago
|
14
|
-
<strong><%= mail_to(comment.email, comment.author) %></strong> wrote
|
15
|
-
</em>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<div class='content'>
|
19
|
-
<%= simple_format(auto_link(comment.content)) %>
|
20
|
-
</div>
|
21
|
-
</div>
|
22
|
-
</li>
|
@@ -1 +0,0 @@
|
|
1
|
-
$('li#<%= dom_id(@comment) %>').replaceWith('<%= escape_javascript(render(:partial => "comment", :object => @comment)) %>')
|
@@ -1,37 +0,0 @@
|
|
1
|
-
<%= form.text_field :title, :id => (@post.new_record?? 'slugify' : nil) %>
|
2
|
-
<%= form.text_field :slug, :id => 'slug' %>
|
3
|
-
<%= form.text_field :author %>
|
4
|
-
<% if Blog::Tag.categories.present? %>
|
5
|
-
<%= form.simple_field 'Categories' do %>
|
6
|
-
<% Blog::Tag.categories.each do |category| %>
|
7
|
-
<%= hidden_field_tag "post[category_ids][#{category.id}]", 0, :id => nil %>
|
8
|
-
<label>
|
9
|
-
<%= check_box_tag "post[category_ids][#{category.id}]", 1, @post.category_ids[category.id.to_s].to_i == 1, :id => nil %>
|
10
|
-
<%= category.name %>
|
11
|
-
</label>
|
12
|
-
<% end %>
|
13
|
-
<% end %>
|
14
|
-
<% end %>
|
15
|
-
<%= form.text_field :tag_names, :label => link_to('Tags', admin_blog_tags_path) %>
|
16
|
-
<%= form.text_area :excerpt, :class => 'short' %>
|
17
|
-
<%= form.text_area :content, :class => 'rich_text' %>
|
18
|
-
<%= form.text_field :published_at, :class => 'datetime' %>
|
19
|
-
|
20
|
-
<% if defined?(ComfortableMexicanSofa) %>
|
21
|
-
<% content_for :right_column do %>
|
22
|
-
<%= render :partial => 'cms_admin/files/index' %>
|
23
|
-
<% end %>
|
24
|
-
|
25
|
-
<%= cms_hook :blog_post, :locals => { :form => form } %>
|
26
|
-
|
27
|
-
<%= form.simple_field nil, nil, :class => 'submit_element' do %>
|
28
|
-
<%= form.check_box :is_published, :disable_builder => true %>
|
29
|
-
<%= form.label_for :is_published %>
|
30
|
-
<%= form.submit @post.new_record?? 'Create post' : 'Update post', :disable_builder => true %>
|
31
|
-
<% end %>
|
32
|
-
|
33
|
-
<% else %>
|
34
|
-
<%= form.check_box :is_published %>
|
35
|
-
<%= form.submit @post.new_record?? 'Create post' : 'Update post' %>
|
36
|
-
<% end %>
|
37
|
-
|
@@ -1,29 +0,0 @@
|
|
1
|
-
<li>
|
2
|
-
<div class='item'>
|
3
|
-
<div class='icon <%= post.is_published?? 'published' : 'draft' %>'></div>
|
4
|
-
<div class='action_links'>
|
5
|
-
<% unless ComfyBlog.disqus_enabled? %>
|
6
|
-
<%= link_to pluralize(post.comments.count, 'comment'), admin_blog_post_comments_path(post) %>
|
7
|
-
<% end %>
|
8
|
-
<%= link_to 'Edit', edit_admin_blog_post_path(post) %>
|
9
|
-
<%= link_to 'Delete', admin_blog_post_path(post), :method => :delete, :confirm => 'Are you sure?' %>
|
10
|
-
</div>
|
11
|
-
<div class='label'>
|
12
|
-
<%= link_to post.title.titleize, edit_admin_blog_post_path(post) %>
|
13
|
-
<div class='sublabel'>
|
14
|
-
Published <%= time_ago_in_words(post.created_at) %> ago
|
15
|
-
|
16
|
-
<% if post.author.present? %>
|
17
|
-
by <strong><%= post.author %></strong>
|
18
|
-
<% end %>
|
19
|
-
|
20
|
-
<% if post.tags.count > 0 %>
|
21
|
-
Tagged with:
|
22
|
-
<% post.tags.each do |tag| %>
|
23
|
-
<span class="tag"><%= tag.name %></span>
|
24
|
-
<% end %>
|
25
|
-
<% end %>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</li>
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<%= link_to 'Add new blog post', new_admin_blog_post_path, :class => 'big button' %>
|
2
|
-
|
3
|
-
<h1>Blog Posts</h1>
|
4
|
-
|
5
|
-
<ul class='list posts'>
|
6
|
-
<% @posts.each do |post| %>
|
7
|
-
<%= render :partial => 'post', :object => post %>
|
8
|
-
<% end %>
|
9
|
-
</ul>
|
10
|
-
|
11
|
-
<% if defined?(WillPaginate) %>
|
12
|
-
<%= will_paginate @posts %>
|
13
|
-
<% elsif defined?(Kaminari)%>
|
14
|
-
<%= paginate @posts %>
|
15
|
-
<% end %>
|
@@ -1,20 +0,0 @@
|
|
1
|
-
<%= form.text_field :name %>
|
2
|
-
<%= form.check_box :is_category %>
|
3
|
-
|
4
|
-
<% if defined?(ComfortableMexicanSofa) %>
|
5
|
-
<%= form.simple_field nil, nil, :class => 'submit_element' do %>
|
6
|
-
<% if @tag.is_category %>
|
7
|
-
<%= form.submit @tag.new_record?? 'Create category' : 'Update category', :disable_builder => true %>
|
8
|
-
<% else %>
|
9
|
-
<%= form.submit @tag.new_record?? 'Create tag' : 'Update tag', :disable_builder => true %>
|
10
|
-
<% end %>
|
11
|
-
<% end %>
|
12
|
-
|
13
|
-
<% else %>
|
14
|
-
<% if @tag.is_category %>
|
15
|
-
<%= form.submit @tag.new_record?? 'Create category' : 'Update category' %>
|
16
|
-
<% else %>
|
17
|
-
<%= form.submit @tag.new_record?? 'Create tag' : 'Update tag' %>
|
18
|
-
<% end %>
|
19
|
-
<% end %>
|
20
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
<li>
|
2
|
-
<div class='item'>
|
3
|
-
<div class='action_links'>
|
4
|
-
<%= link_to 'Edit', :action => :edit, :id => tag %>
|
5
|
-
<%= link_to 'Delete', {:action => :destroy, :id => tag}, :method => :delete, :confirm => 'Are you sure you want to delete this tag?' %>
|
6
|
-
</div>
|
7
|
-
<div class='label'>
|
8
|
-
<%= link_to tag.name, :action => :edit, :id => tag %>
|
9
|
-
<div class='sublabel'>
|
10
|
-
<% if tag.is_category? %>
|
11
|
-
Category
|
12
|
-
<% end %>
|
13
|
-
</div>
|
14
|
-
</div>
|
15
|
-
</div>
|
16
|
-
</li>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div id="disqus_thread"></div>
|
2
|
-
<script type="text/javascript">
|
3
|
-
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
|
4
|
-
var disqus_shortname = '<%= ComfyBlog.config.disqus_shortname %>'; // required: replace example with your forum shortname
|
5
|
-
|
6
|
-
/* * * DON'T EDIT BELOW THIS LINE * * */
|
7
|
-
(function() {
|
8
|
-
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
9
|
-
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
10
|
-
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
11
|
-
})();
|
12
|
-
</script>
|
13
|
-
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
|
14
|
-
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
<% if @comment.new_record? %>
|
2
|
-
$('form#comment').replaceWith('<%= escape_javascript(render(:partial => "form")) %>');
|
3
|
-
<% else %>
|
4
|
-
$('form#comment')[0].reset();
|
5
|
-
$('#comments').append('<%= escape_javascript(render(:partial => "comment", :object => @comment)) %>');
|
6
|
-
<% end %>
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<div class='post'>
|
2
|
-
<h1><%= @post ? post.title : link_to(post.title, blog_post_path(post))%></h1>
|
3
|
-
<div class='author'><%= post.author %></div>
|
4
|
-
<div class='date'><%= post.created_at %></div>
|
5
|
-
<div class='content'>
|
6
|
-
<%= post.content.html_safe %>
|
7
|
-
</div>
|
8
|
-
</div>
|
@@ -1,9 +0,0 @@
|
|
1
|
-
<% @posts.each do |post| %>
|
2
|
-
<%= render :partial => 'post', :object => post %>
|
3
|
-
<% end %>
|
4
|
-
|
5
|
-
<% if defined?(WillPaginate) %>
|
6
|
-
<%= will_paginate @posts, :previous_label => '« Older Posts', :next_label => 'Newer Posts »', :page_links => false %>
|
7
|
-
<% elsif defined?(Kaminari) %>
|
8
|
-
<%= paginate @posts %>
|
9
|
-
<% end %>
|
@@ -1,13 +0,0 @@
|
|
1
|
-
<%= render :partial => 'blog/posts/post', :object => @post %>
|
2
|
-
|
3
|
-
<% if ComfyBlog.disqus_enabled? %>
|
4
|
-
<%= render :partial => 'blog/comments/disqus' %>
|
5
|
-
|
6
|
-
<% else %>
|
7
|
-
<div id='comments'>
|
8
|
-
<% @post.comments.each do |comment| %>
|
9
|
-
<%= render :partial => 'blog/comments/comment', :object => comment %>
|
10
|
-
<% end %>
|
11
|
-
</div>
|
12
|
-
<%= render :partial => 'blog/comments/form' %>
|
13
|
-
<% end %>
|
@@ -1,17 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<meta content='text/html;charset=utf-8' http-equiv='Content-Type'>
|
5
|
-
<title>ComfyBlog</title>
|
6
|
-
<%= javascript_include_tag 'application' %>
|
7
|
-
<%= stylesheet_link_tag 'comfy_blog/application' %>
|
8
|
-
<%= yield :head %>
|
9
|
-
<%= csrf_meta_tags %>
|
10
|
-
</head>
|
11
|
-
<body>
|
12
|
-
<% flash.each do |type, message| %>
|
13
|
-
<div class='flash <%= type %>'><%= message %></div>
|
14
|
-
<% end %>
|
15
|
-
<%= yield %>
|
16
|
-
</body>
|
17
|
-
</html>
|