Patch #1790 » latest_projects.diff
app/models/project.rb | ||
---|---|---|
90 | 90 | |
91 | 91 |
# returns latest created projects |
92 | 92 |
# non public projects will be returned only if user is a member of those |
93 |
def self.latest(user=nil, count=5)
|
|
93 |
def self.latest(user=nil, count=Setting.lastest_projects_limit)
|
|
94 | 94 |
find(:all, :limit => count, :conditions => visible_by(user), :order => "created_on DESC") |
95 | 95 |
end |
96 | 96 |
app/views/settings/_projects.rhtml | ||
---|---|---|
6 | 6 | |
7 | 7 |
<p><label><%= l(:setting_sequential_project_identifiers) %></label> |
8 | 8 |
<%= check_box_tag 'settings[sequential_project_identifiers]', 1, Setting.sequential_project_identifiers? %><%= hidden_field_tag 'settings[sequential_project_identifiers]', 0 %></p> |
9 | ||
10 |
<p><label><%= l(:setting_lastest_projects_limit) %></label> |
|
11 |
<%= text_field_tag 'settings[lastest_projects_limit]', Setting.lastest_projects_limit, :size => 6 %></p> |
|
9 | 12 |
</div> |
10 | 13 | |
11 | 14 |
<%= submit_tag l(:button_save) %> |
config/settings.yml | ||
---|---|---|
122 | 122 |
default: 1 |
123 | 123 |
sequential_project_identifiers: |
124 | 124 |
default: 0 |
125 |
lastest_projects_limit: |
|
126 |
default: 5 |
|
125 | 127 |
# encodings used to convert repository files content to UTF-8 |
126 | 128 |
# multiple values accepted, comma separated |
127 | 129 |
repositories_encodings: |
lang/de.yml | ||
---|---|---|
221 | 221 |
setting_mail_handler_api_enabled: Abruf eingehender E-Mails aktivieren |
222 | 222 |
setting_mail_handler_api_key: API-Schlüssel |
223 | 223 |
setting_sequential_project_identifiers: Fortlaufende Projektkennungen generieren |
224 |
setting_lastest_projects_limit: Max. neueste Projekte auf der Hauptseite |
|
224 | 225 | |
225 | 226 |
project_module_issue_tracking: Ticket-Verfolgung |
226 | 227 |
project_module_time_tracking: Zeiterfassung |
lang/en.yml | ||
---|---|---|
223 | 223 |
setting_mail_handler_api_key: API key |
224 | 224 |
setting_sequential_project_identifiers: Generate sequential project identifiers |
225 | 225 |
setting_gravatar_enabled: Use Gravatar user icons |
226 |
setting_lastest_projects_limit: Latest projects on Home page limit |
|
226 | 227 | |
227 | 228 |
permission_edit_project: Edit project |
228 | 229 |
permission_select_project_modules: Select project modules |
- « Previous
- 1
- 2
- Next »