Permalink
Browse files

Merge branch 'master' of github.com:browsermedia/bcms_news

  • Loading branch information...
2 parents 3487350 + bf580a4 commit e268d89c5118d53256984a80fe0b470261ccc8ed @peakpg peakpg committed May 23, 2011
@@ -1,5 +1,8 @@
class NewsArchivePortlet < Portlet
+ # Mark this as 'true' to allow the portlet's template to be editable via the CMS admin UI.
+ enable_template_editor false
+
def render
if self.category_id.blank?
@articles = NewsArticle.all(:order => "release_date desc", :limit => self.limit)
@@ -1,4 +1,7 @@
class NewsArticlePortlet < Portlet
+
+ # Mark this as 'true' to allow the portlet's template to be editable via the CMS admin UI.
+ enable_template_editor false
def render
# @news_article should already be set by the page route
@@ -1,4 +1,7 @@
class RecentNewsPortlet < Portlet
+
+ # Mark this as 'true' to allow the portlet's template to be editable via the CMS admin UI.
+ enable_template_editor false
def render
order = "release_date DESC"
@@ -1,3 +1,3 @@
<%= f.cms_text_field :name %>
<%= f.cms_drop_down :category_id, categories_for('News Article').map{|c| [c.path, c.id]}, { :selected=>f.object.category_id.to_i, :include_blank=>"Show News Articles in any Category", :instructions=>"Select a category to show News Articles from only that category." } %>
-<%= f.cms_text_area :template, :default_value => @block.class.default_template %>
+<%= f.cms_template_editor :template %>
@@ -1,5 +1,5 @@
<% content_for :html_head do %>
- <%= auto_discovery_link_tag :rss, news_articles_url, "RSS Feed for News Articles" %>
+ <%= auto_discovery_link_tag( :rss, news_articles_url, {:title => "RSS Feed for News Articles"}) %>
<% end %>
<div>
<% @articles.group_by(&:year).sort_by(&:first).reverse.each do |year, year_articles| %>
@@ -1,2 +1,2 @@
<%= f.cms_text_field :name %>
-<%= f.cms_text_area :template, :default_value => @block.class.default_template %>
+<%= f.cms_template_editor :template %>
@@ -4,4 +4,4 @@
<%= f.cms_drop_down :sort_order, %w(asc desc).collect { |field| ["#{field.titleize}ending", field.upcase] } %>
<%= f.cms_drop_down :category_id, categories_for('News Article').map{|c| [c.path, c.id]}, {:selected=>f.object.category_id.to_i, :include_blank=>"Show News Articles in any Category", :instructions=>"Select a category to show News Articles from only that category." } %>
<%= f.cms_text_field :more_link %>
-<%= f.cms_text_area :template, :default_value => @block.class.default_template %>
+<%= f.cms_template_editor :template %>
@@ -1,5 +1,5 @@
<% content_for :html_head do %>
- <%= auto_discovery_link_tag :rss, news_articles_url, "RSS Feed for News Articles" %>
+ <%= auto_discovery_link_tag( :rss, news_articles_url, {:title => "RSS Feed for News Articles" }) %>
<% end %>
<b>Latest News</b>
<br/>
View
@@ -57,18 +57,18 @@ Gem::Specification.new do |s|
s.specification_version = 3
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
- s.add_runtime_dependency(%q<rails>, ["= 3.0.3"])
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.3"])
s.add_runtime_dependency(%q<browsercms>, ["= 3.3.0"])
s.add_development_dependency(%q<mysql>, [">= 0"])
s.add_development_dependency(%q<jeweler>, [">= 0"])
else
- s.add_dependency(%q<rails>, ["= 3.0.3"])
+ s.add_dependency(%q<rails>, [">= 3.0.3"])
s.add_dependency(%q<browsercms>, ["= 3.3.0"])
s.add_dependency(%q<mysql>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])
end
else
- s.add_dependency(%q<rails>, ["= 3.0.3"])
+ s.add_dependency(%q<rails>, [">= 3.0.3"])
s.add_dependency(%q<browsercms>, ["= 3.3.0"])
s.add_dependency(%q<mysql>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])

0 comments on commit e268d89

Please sign in to comment.