# frozen_string_literal: true #-- copyright # OpenProject is an open source project management software. # Copyright (C) the OpenProject GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License version 3. # # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: # Copyright (C) 2006-2013 Jean-Philippe Lang # Copyright (C) 2010-2013 the ChiliProject Team # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # See COPYRIGHT and LICENSE files for more details. #++ # Pagy initializer file (43.5.4) # See https://ddnexus.github.io/pagy/resources/initializer/ ############ Global Options ################################################################ # See https://ddnexus.github.io/pagy/toolbox/options/ for details. # Add your global options below. They will be applied globally. # For example: # # Pagy.options[:limit] = 10 # Limit the items per page # Pagy.options[:max_limit] = 100 # The client can request a limit up to 100 # Pagy.options[:jsonapi] = true # Use JSON:API compliant URLs ############ JavaScript #################################################################### # See https://ddnexus.github.io/pagy/resources/javascript/ for details. # Examples for Rails: # For apps with an assets pipeline # Rails.application.config.assets.paths << Pagy::ROOT.join('javascripts') # # For apps with a javascript builder (e.g. esbuild, webpack, etc.) # javascript_dir = Rails.root.join('app/javascript') # Pagy.sync_javascript(javascript_dir, 'pagy.mjs') if Rails.env.development? ############# Overriding Pagy::I18n Lookup ################################################# # Refer to https://ddnexus.github.io/pagy/resources/i18n/ for details. # Override the I18n lookup by dropping your custom dictionary in some pagy dir. # Example for Rails: # # Pagy::I18n.pathnames << Rails.root.join('config/locales/pagy') ############# I18n Gem Translation ######################################################### # See https://ddnexus.github.io/pagy/resources/i18n/ for details. # # Pagy.translate_with_the_slower_i18n_gem! ############# Calendar Localization for non-en locales #################################### # See https://ddnexus.github.io/pagy/toolbox/paginators/calendar#localization for details. # Add your desired locales to the list and uncomment the following line to enable them, # regardless of whether you use the I18n gem for translations or not, whether with # Rails or not. # # Pagy::Calendar.localize_with_rails_i18n_gem(*your_locales)