mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Add constant for results limit
This commit is contained in:
parent
7c4bfad09b
commit
6ceb4abfb5
2 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,7 @@ module MyModulesHelper
|
|||
|
||||
def ordered_result_of(my_module, page)
|
||||
page ||= 1
|
||||
my_module.results.where(archived: false).page(page).per(10).order(created_at: :desc)
|
||||
my_module.results.where(archived: false).page(page).per(Constants::RESULTS_SEARCH_LIMIT).order(created_at: :desc)
|
||||
end
|
||||
|
||||
def get_task_alert_color(my_module)
|
||||
|
|
|
@ -64,6 +64,8 @@ class Constants
|
|||
ATWHO_SEARCH_LIMIT = 5
|
||||
# Max characters for repository name in Atwho modal
|
||||
ATWHO_REP_NAME_LIMIT = 16
|
||||
# Results limited query/display elements for pages
|
||||
RESULTS_SEARCH_LIMIT = 10
|
||||
|
||||
#=============================================================================
|
||||
# File and data memory size
|
||||
|
|
Loading…
Reference in a new issue