diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-18 18:32:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-18 18:32:59 +0000 |
commit | 143be7ee029273ca882d3cfb807a9952eaab6539 (patch) | |
tree | 98d3f1a14bc079d6d48d09ce33f4ae139f3d740c /app | |
parent | d967bb4a5433165017d49975f5b74c671f590f38 (diff) | |
download | redmine-143be7ee029273ca882d3cfb807a9952eaab6539.tar.gz redmine-143be7ee029273ca882d3cfb807a9952eaab6539.zip |
added a setting option to set the feeds content limit
git-svn-id: http://redmine.rubyforge.org/svn/trunk@346 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/feeds_controller.rb | 4 | ||||
-rw-r--r-- | app/views/settings/edit.rhtml | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/app/controllers/feeds_controller.rb b/app/controllers/feeds_controller.rb index 46e8ae05c..20ae6f254 100644 --- a/app/controllers/feeds_controller.rb +++ b/app/controllers/feeds_controller.rb @@ -27,7 +27,7 @@ class FeedsController < ApplicationController # news feeds def news News.with_scope(:find => @find_options) do - @news = News.find :all, :order => "#{News.table_name}.created_on DESC", :limit => 10, :include => [ :author, :project ] + @news = News.find :all, :order => "#{News.table_name}.created_on DESC", :include => [ :author, :project ] end headers["Content-Type"] = "application/rss+xml" render :action => 'news_atom' if 'atom' == params[:format] @@ -94,7 +94,7 @@ private # global feed scope = ["#{Project.table_name}.is_public=?", true] end - @find_options = {:conditions => scope, :limit => 10} + @find_options = {:conditions => scope, :limit => Setting.feeds_limit} return true end end diff --git a/app/views/settings/edit.rhtml b/app/views/settings/edit.rhtml index aac4ab686..4bdea07b9 100644 --- a/app/views/settings/edit.rhtml +++ b/app/views/settings/edit.rhtml @@ -1,5 +1,6 @@ <h2><%= l(:label_settings) %></h2> +<div id="settings"> <% form_tag({:action => 'edit'}, :class => "tabular") do %> <div class="box"> <p><label><%= l(:setting_app_title) %></label> @@ -41,6 +42,10 @@ <p><label><%= l(:setting_wiki_compression) %></label> <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p> +<p><label><%= l(:setting_feeds_limit) %></label> +<%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p> + </div> <%= submit_tag l(:button_save) %> +</div> <% end %>
\ No newline at end of file |