##// END OF EJS Templates
added a setting option to set the feeds content limit...
Jean-Philippe Lang -
r343:143be7ee0292
parent child
Show More
@@ -27,7 +27,7 class FeedsController < ApplicationController
27 27 # news feeds
28 28 def news
29 29 News.with_scope(:find => @find_options) do
30 @news = News.find :all, :order => "#{News.table_name}.created_on DESC", :limit => 10, :include => [ :author, :project ]
30 @news = News.find :all, :order => "#{News.table_name}.created_on DESC", :include => [ :author, :project ]
31 31 end
32 32 headers["Content-Type"] = "application/rss+xml"
33 33 render :action => 'news_atom' if 'atom' == params[:format]
@@ -94,7 +94,7 private
94 94 # global feed
95 95 scope = ["#{Project.table_name}.is_public=?", true]
96 96 end
97 @find_options = {:conditions => scope, :limit => 10}
97 @find_options = {:conditions => scope, :limit => Setting.feeds_limit}
98 98 return true
99 99 end
100 100 end
@@ -1,5 +1,6
1 1 <h2><%= l(:label_settings) %></h2>
2 2
3 <div id="settings">
3 4 <% form_tag({:action => 'edit'}, :class => "tabular") do %>
4 5 <div class="box">
5 6 <p><label><%= l(:setting_app_title) %></label>
@@ -41,6 +42,10
41 42 <p><label><%= l(:setting_wiki_compression) %></label>
42 43 <%= select_tag 'settings[wiki_compression]', options_for_select( [[l(:label_none), 0], ["gzip", "gzip"]], Setting.wiki_compression) %></p>
43 44
45 <p><label><%= l(:setting_feeds_limit) %></label>
46 <%= text_field_tag 'settings[feeds_limit]', Setting.feeds_limit, :size => 6 %></p>
47
44 48 </div>
45 49 <%= submit_tag l(:button_save) %>
50 </div>
46 51 <% end %> No newline at end of file
@@ -46,4 +46,7 wiki_compression:
46 46 default_language:
47 47 default: en
48 48 host_name:
49 default: localhost:3000 No newline at end of file
49 default: localhost:3000
50 feeds_limit:
51 format: int
52 default: 15
@@ -156,6 +156,7 setting_mail_from: Emission address
156 156 setting_host_name: Host Name
157 157 setting_text_formatting: Textformatierung
158 158 setting_wiki_compression: Wiki Geschichte Kompression
159 setting_feeds_limit: Feed content limit
159 160
160 161 label_user: Benutzer
161 162 label_user_plural: Benutzer
@@ -156,6 +156,7 setting_mail_from: Emission mail address
156 156 setting_host_name: Host name
157 157 setting_text_formatting: Text formatting
158 158 setting_wiki_compression: Wiki history compression
159 setting_feeds_limit: Feed content limit
159 160
160 161 label_user: User
161 162 label_user_plural: Users
@@ -156,6 +156,7 setting_mail_from: Email de la emisión
156 156 setting_host_name: Nombre de anfitrión
157 157 setting_text_formatting: Formato de texto
158 158 setting_wiki_compression: Compresión de la historia de Wiki
159 setting_feeds_limit: Feed content limit
159 160
160 161 label_user: Usuario
161 162 label_user_plural: Usuarios
@@ -156,6 +156,7 setting_mail_from: Adresse d'émission
156 156 setting_host_name: Nom d'hôte
157 157 setting_text_formatting: Formatage du texte
158 158 setting_wiki_compression: Compression historique wiki
159 setting_feeds_limit: Limite du contenu des flux RSS
159 160
160 161 label_user: Utilisateur
161 162 label_user_plural: Utilisateurs
@@ -156,6 +156,7 setting_mail_from: Indirizzo sorgente e-mail
156 156 setting_host_name: Nome host
157 157 setting_text_formatting: Formattazione testo
158 158 setting_wiki_compression: Compressione di storia di Wiki
159 setting_feeds_limit: Feed content limit
159 160
160 161 label_user: Utente
161 162 label_user_plural: Utenti
@@ -157,6 +157,7 setting_mail_from: Emission メールアドレス
157 157 setting_host_name: ホスト名
158 158 setting_text_formatting: テキストの書式
159 159 setting_wiki_compression: Wiki history compression
160 setting_feeds_limit: Feed content limit
160 161
161 162 label_user: ユーザ
162 163 label_user_plural: ユーザ
@@ -575,6 +575,8 margin*/
575 575 color: #cc0000;
576 576 }
577 577
578 #settings .tabular p{ padding-left: 250px; }
579 #settings .tabular label{ margin-left: -250px; width: 245px; }
578 580
579 581 /*.threepxfix class below:
580 582 Targets IE6- ONLY. Adds 3 pixel indent for multi-line form contents.
General Comments 0
You need to be logged in to leave comments. Login now