From 5a33252694ceb86c2bb7a1b43e24c6b63425f7e1 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Thu, 15 Aug 2013 12:28:48 +0100 Subject: Make the minimum requests for statistics configurable This adds the MINIMUM_REQUESTS_FOR_STATISTICS config option. --- lib/configuration.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/configuration.rb') diff --git a/lib/configuration.rb b/lib/configuration.rb index 03c4ac616..bf80f87e1 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -43,6 +43,7 @@ module AlaveteliConfiguration :INCOMING_EMAIL_PREFIX => '', :INCOMING_EMAIL_SECRET => 'dummysecret', :ISO_COUNTRY_CODE => 'GB', + :MINIMUM_REQUESTS_FOR_STATISTICS => 100, :MAX_REQUESTS_PER_USER_PER_DAY => '', :MTA_LOG_TYPE => 'exim', :NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24], -- cgit v1.2.3 From b75d79b08227192b75e4f3b24ce4e762f4286ef9 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Tue, 20 Aug 2013 10:04:54 +0100 Subject: Add a config option to enable the public body statistics page --- lib/configuration.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/configuration.rb') diff --git a/lib/configuration.rb b/lib/configuration.rb index bf80f87e1..d6fd8765f 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -48,6 +48,7 @@ module AlaveteliConfiguration :MTA_LOG_TYPE => 'exim', :NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24], :OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS => '', + :PUBLIC_BODY_STATISTICS_PAGE => false, :RAW_EMAILS_LOCATION => 'files/raw_emails', :READ_ONLY => '', :RECAPTCHA_PRIVATE_KEY => 'x', -- cgit v1.2.3 From 3fb80a12652792df9da06c22b4bb944ab80bf376 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Thu, 29 Aug 2013 10:24:02 +0100 Subject: Make falling back to default locale in public body listings optional As the code stood, the list method in PublicBodyController would only return results that had translations of the public body in the default locale. This has a variety of problems if you're viewing pages in the non-default locale - for example, the "first letter" links wouldn't bring up the public bodies that began with that letter in the current locale, only those that began with it in the default locale. Ideally, every public body would be translated into every available locale for the site, but there are cases where deployers wish to have public body listings also include those from the default locale, in case there are untralsated public bodies: https://groups.google.com/d/msg/alaveteli-dev/zUY_USaAMAM/M7KTQ9RC5YUJ This commit makes the default behaviour to look for public body listings only in the current locale, but if the new configuration option PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE is set, then public body listings will be looked for in both the current locale and the default locale. Fixes #1000 --- lib/configuration.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/configuration.rb') diff --git a/lib/configuration.rb b/lib/configuration.rb index 03c4ac616..c949c1051 100644 --- a/lib/configuration.rb +++ b/lib/configuration.rb @@ -47,6 +47,7 @@ module AlaveteliConfiguration :MTA_LOG_TYPE => 'exim', :NEW_RESPONSE_REMINDER_AFTER_DAYS => [3, 10, 24], :OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS => '', + :PUBLIC_BODY_LIST_FALLBACK_TO_DEFAULT_LOCALE => false, :RAW_EMAILS_LOCATION => 'files/raw_emails', :READ_ONLY => '', :RECAPTCHA_PRIVATE_KEY => 'x', -- cgit v1.2.3