Commit 212a1f73 authored by jplang's avatar jplang

Make search results per page configurable (#19005).

Patch by Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@13962 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 26ed3940
......@@ -66,7 +66,9 @@ class SearchController < ApplicationController
@result_count_by_type = fetcher.result_count_by_type
@tokens = fetcher.tokens
@result_pages = Paginator.new @result_count, 10, params['page']
per_page = Setting.search_results_per_page.to_i
per_page = 10 if per_page == 0
@result_pages = Paginator.new @result_count, per_page, params['page']
@results = fetcher.results(@result_pages.offset, @result_pages.per_page)
else
@question = ""
......
......@@ -11,6 +11,8 @@
<p><%= setting_text_field :per_page_options, :size => 20 %>
<em class="info"><%= l(:text_comma_separated) %></em></p>
<p><%= setting_text_field :search_results_per_page, :size => 6 %>
<p><%= setting_text_field :activity_days_default, :size => 6 %> <%= l(:label_day_plural) %></p>
<p><%= setting_text_field :host_name, :size => 60 %>
......
......@@ -415,6 +415,7 @@ en:
setting_force_default_language_for_loggedin: Force default language for logged-in users
setting_link_copied_issue: Link issues on copy
setting_max_additional_emails: Maximum number of additional email addresses
setting_search_results_per_page: Search results per page
permission_add_project: Create project
permission_add_subprojects: Create subprojects
......
......@@ -435,6 +435,7 @@ fr:
setting_force_default_language_for_loggedin: Forcer la langue par défault pour les utilisateurs identifiés
setting_link_copied_issue: Lier les demandes lors de la copie
setting_max_additional_emails: Nombre maximal d'adresses email additionnelles
setting_search_results_per_page: Résultats de recherche affichés par page
permission_add_project: Créer un projet
permission_add_subprojects: Créer des sous-projets
......
......@@ -59,6 +59,8 @@ activity_days_default:
default: 30
per_page_options:
default: '25,50,100'
search_results_per_page:
default: 10
mail_from:
default: redmine@example.net
bcc_recipients:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment