bcms_blog 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/README.markdown +0 -3
- data/app/portlets/blog_posts_portlet.rb +2 -2
- data/app/views/portlets/blog_posts/_form.html.erb +3 -3
- data/app/views/portlets/blog_posts/render.html.erb +12 -0
- data/lib/bcms_blog/version.rb +1 -1
- metadata +7 -7
- data/app/views/portlets/blog_posts/render.html.haml +0 -9
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -106,6 +106,3 @@ Special thanks to some amazing folks from the BrowserCMS community for their wor
|
|
106
106
|
* Notifications for Comments - Blogs should have an option to be notified when a new comment is created. This will allow for practical management of comments/spam.
|
107
107
|
* Messaging for Moderated comments - If moderation is turned on, users get no feedback about the comment they just left. Ideally, they would get some sort of javascript notice that their comment is awaiting notification.
|
108
108
|
|
109
|
-
## 3.5.x Todo
|
110
|
-
|
111
|
-
* Test and release
|
@@ -3,7 +3,7 @@ class BlogPostsPortlet < Cms::Portlet
|
|
3
3
|
after_initialize :build_permalink_code
|
4
4
|
|
5
5
|
def build_permalink_code
|
6
|
-
self.render_blog_post_code
|
6
|
+
self.render_blog_post_code
|
7
7
|
end
|
8
8
|
|
9
9
|
# Mark this as 'true' to allow the portlet's template to be editable via the CMS admin UI.
|
@@ -26,7 +26,7 @@ class BlogPostsPortlet < Cms::Portlet
|
|
26
26
|
elsif @options[:blog_name]
|
27
27
|
finder = BcmsBlog::Blog.find_by_name(@options[:blog_name]).posts
|
28
28
|
else
|
29
|
-
finder = BlogPost
|
29
|
+
finder = BcmsBlog::BlogPost
|
30
30
|
end
|
31
31
|
|
32
32
|
if @options[:tags].is_a?(Array) && @options[:tags].size > 1
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<%= f.cms_text_field :name, :label => 'Portlet Name', :instructions => '
|
1
|
+
<%= f.cms_text_field :name, :label => 'Portlet Name', :instructions => 'Give each portlet a descriptive name (ideally, what sorts of posts are being found).' %>
|
2
2
|
|
3
|
-
<%= f.cms_drop_down :blog_id,
|
3
|
+
<%= f.cms_drop_down :blog_id, BcmsBlog::Blog.all.map{|b| [b.name, b.id.to_s]}, :include_blank => true, :label => "Show posts from", :instructions => 'Leave blank to include posts from all blogs' %>
|
4
4
|
<%# f.cms_drop_down :show_posts_as, [['First post as full post, the rest as Summary + Read More link', 'first_full_post_others_summary'], ['Summary + Read More link', 'summary'], ['Full post', 'full_post'], ['Title (links to post)', 'link']] %>
|
5
5
|
<%= f.cms_drop_down :show_posts_as, [['Title (links to post)', 'link'], ['Post', 'post']] %>
|
6
6
|
<%= f.cms_check_box :show_full_posts %>
|
@@ -8,6 +8,6 @@
|
|
8
8
|
<%= f.cms_tag_list :label => "Only posts with tags", :instructions => 'Separate tags with spaces' %>
|
9
9
|
<%= f.cms_text_field :exclude_tags, :label => 'Exclude posts with tags' %>
|
10
10
|
<%= f.cms_text_field :limit, :label => 'Limit' %>
|
11
|
-
<%= f.cms_text_area :render_blog_post_code, :label => 'Code to turn blog_post into link text' %>
|
11
|
+
<%= f.cms_text_area :render_blog_post_code, :label => 'Code to turn blog_post into link text', :instructions=>"Default: Truncates name to 30 characters" %>
|
12
12
|
|
13
13
|
<%= f.cms_template_editor :template %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<% if @portlet.show_posts_as == 'post'%>
|
2
|
+
<%= render :partial => '/partials/blog_post', :collection => @blog_posts, :locals => {:show_full_posts => @options[:show_full_posts]} %>
|
3
|
+
<% elsif @portlet.show_posts_as == 'link' %>
|
4
|
+
<ul id="blog_posts">
|
5
|
+
<% @blog_posts.each do |blog_post| %>
|
6
|
+
<% text = @portlet.render_blog_post_code.present? ? eval(@portlet.render_blog_post_code) : text = truncate(blog_post.name, :length=>30) %>
|
7
|
+
<li><%= link_to text, _blog_post_path(blog_post) %></li>
|
8
|
+
<% end %>
|
9
|
+
</ul>
|
10
|
+
<% else %>- else
|
11
|
+
Unrecognized option '<%= @portlet.show_posts_as %>' for @portlet.show_posts_as
|
12
|
+
<% end %>
|
data/lib/bcms_blog/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bcms_blog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: browsercms
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 3.6.0
|
22
22
|
- - ! '>='
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: 3.5.0
|
24
|
+
version: 3.5.0
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 3.6.0
|
33
33
|
- - ! '>='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 3.5.0
|
35
|
+
version: 3.5.0
|
36
36
|
description: The Blog Module for BrowserCMS
|
37
37
|
email: github@browsermedia.com
|
38
38
|
executables: []
|
@@ -69,7 +69,7 @@ files:
|
|
69
69
|
- app/views/portlets/blog_post/_form.html.erb
|
70
70
|
- app/views/portlets/blog_post/render.html.erb
|
71
71
|
- app/views/portlets/blog_posts/_form.html.erb
|
72
|
-
- app/views/portlets/blog_posts/render.html.
|
72
|
+
- app/views/portlets/blog_posts/render.html.erb
|
73
73
|
- config/routes.rb
|
74
74
|
- db/bcms_blog.seeds.rb
|
75
75
|
- db/migrate/20090415000000_create_blogs.rb
|
@@ -117,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
segments:
|
119
119
|
- 0
|
120
|
-
hash:
|
120
|
+
hash: 1305204441381041538
|
121
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
122
|
none: false
|
123
123
|
requirements:
|
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
version: '0'
|
127
127
|
segments:
|
128
128
|
- 0
|
129
|
-
hash:
|
129
|
+
hash: 1305204441381041538
|
130
130
|
requirements: []
|
131
131
|
rubyforge_project: bcms_blog
|
132
132
|
rubygems_version: 1.8.24
|
@@ -1,9 +0,0 @@
|
|
1
|
-
- if @portlet.show_posts_as == 'post'
|
2
|
-
= render :partial => '/partials/blog_post', :collection => @blog_posts, :locals => {:show_full_posts => @options[:show_full_posts]}
|
3
|
-
- elsif @portlet.show_posts_as == 'link'
|
4
|
-
%ul.blog_posts
|
5
|
-
- for blog_post in @blog_posts
|
6
|
-
- text = @portlet.render_blog_post_code.present? ? eval(@portlet.render_blog_post_code) : text = truncate(blog_post.name, 30)
|
7
|
-
%li= link_to text, _blog_post_path(blog_post)
|
8
|
-
- else
|
9
|
-
Unrecognized option '#{@portlet.show_posts_as}' for @portlet.show_posts_as
|