Commit Graph

50 Commits

Author SHA1 Message Date
Machine Learning
4d27bbebad Add experimental machine learning 2021-08-16 16:31:04 +02:00
Javi Martín
32a61f826c Make it easier for admins to enable SDG processes
In order to ensure compatibility with existing CONSUL installations, we
disabled all settings related to SDG. However, we also made it much
harder to enable SDG globally on the site, since administrators first
had to enable the SDG feature and then enable it for each process.

Most people will expect SDG is enabled for all processes once they
enable the SDG feature, so that's what we're doing. They can of course
disable specific processes should they wish to do so.
2021-04-21 18:37:54 +02:00
taitus
676adfcb3f Add new SDG feature Setting 2020-12-03 18:26:00 +01:00
taitus
79cb78880a Add default values for new sdg settings 2020-12-03 18:00:10 +01:00
taitus
609e51bbf3 Include new type 'sdg' on settings 2020-12-03 18:00:10 +01:00
Javi Martín
727e743887 Remove autoload trigger
I'm not sure why the code didn't work without this line, but it doesn't
seem to be necessary anymore (maybe after upgrading Ruby or Rails?).

I'm removing it now because... why not now? :) The Ruby interpreter is
raising a warning due to this line, and in Ruby 2.5 constant lookup has
changed slightly (although I don't think this line is affected by that
change).

Note about the change in the Setting model: Ruby actually ignores return
values in setter methods, so the line isn't necessary.
2020-07-08 12:39:25 +02:00
Javier Martín
14b1f1b4d3 Merge pull request #3911 from rockandror/dashboard-email
Improve Dashboard emails
2020-02-19 19:06:53 +01:00
taitus
45aec05b93 Update and rename Setting as feature type
The old Setting["dashboard.emails"] is a Feature Setting, but appeared as
Configuration Setting without button for enable/disable.
In this commit, we update the old setting to behave like a Feature Setting.
Too we rename setting to clarify what emails are blocked with this feature.
2020-02-17 16:30:38 +01:00
Julian Herrero
193e51d42f Enable Wordpress Oauth login and registration 2020-02-07 12:23:41 +07:00
Javi Martín
f3df3f4fbc Remove people proposal model
This model isn't used anywhere, since it was created as part of a
feature which couldn't be completed.

This commit reverts commit 46e5d6a9.
2019-10-30 02:26:42 +01:00
Javi Martín
93c6347b45 Apply Rails/FindBy rubocop rule
We were already using it in most places.
2019-10-23 18:29:09 +02:00
Juanjo Bazán
0063e7b4d8 Add feature flag for the GraphQL API 2019-10-20 14:52:07 +02:00
taitus
3e383d7c1f Add new fields to form
- Add :date_of_birth and :postal_code
- Only display new fields when aplication has configured the
custom census API and contains alias values for fields. Add 2
class Setting methods to check this feature:
  - force_presence_date_of_birth?
  - force_presence_postal_code?
2019-07-29 13:10:09 +02:00
taitus
637675a1f5 Add content to the Remote Census Configuration tab
- Render remote census configuration content on settings index.
 - Update type method from Setting
   On Admin::SettingsController#index we are using 'all_settings' to
   group all settings by 'type' method.
   'type' method return the first part of key when split by '.'
   To allow use by example: all_settings["remote_census.general"]
   and recover only settings related with this key we have added new
   'elsif' on 'type' method.
2019-07-29 13:10:09 +02:00
taitus
3df856ff7e Add new Settings related to the remote census
These Settings will store all the values needed to
connect to the remote census.
2019-07-29 13:10:09 +02:00
taitus
f6beff91be Add new feature setting 'remote_census'
It will allow to enable remote census configuration.
2019-07-29 13:10:09 +02:00
taitus
21f347778b Add Remote Translations Settings
- Add to seeds and dev_seeds
- Add locales
2019-06-27 09:21:18 +02:00
Senén Rodero Rodríguez
b5663a7c17 Add translation interface setting values
* Disable translation interface by default
 * Also add rake task to enable translations interface through rake
   command
2019-06-27 09:20:25 +02:00
voodoorai2000
d9cc726085 Add setting for max votes to edit a people proposal 2019-06-07 12:29:30 +02:00
Raimond Garcia
a874d25bfa Merge pull request #3413 from LextrendIT/feature/notify_evaluation_comments
notify by email new evaluation comments
2019-06-06 11:29:38 +02:00
lalo
8061bfa5e8 Send email to users related with an investment when valuation comment is created 2019-06-05 17:02:59 +02:00
Julian Herrero
8e0bbf54f6 Replace harcoded images and documents settings 2019-06-04 11:50:09 +02:00
Julian Herrero
220bfb065a Add images and documents settings to admin panel 2019-06-04 11:47:22 +02:00
Julian Herrero
35cd26c117 Add images and document settings to the DB 2019-06-04 11:45:38 +02:00
Julian Herrero
e32faf3a3c Extract setting prefix to a method
We may need to access the setting key prefix in the future, so it's
better to have it in a method to avoid duplication
2019-06-04 11:39:53 +02:00
Javi Martín
bb504d90fb Add method to add new settings 2019-05-31 19:33:31 +02:00
Javi Martín
555fae0811 Order settings to follow our traditional order
Settings are displayed in the administration in the order they are
created, and reordering them alphabetically in the code caused them to
be displayed in a different order.

Since we don't want to confuse our users by randomly changing the order,
I've grouped the settings by namespaces and ordered each namespace the
way it used to be.

Note dev seeds don't need to be changed, since they are executed after
default settings have been created.
2019-05-31 19:30:35 +02:00
Javi Martín
cf26b230c9 Use a rounded value for default supports needed
We were using the value which is used in Madrid.
2019-05-31 19:30:14 +02:00
Javi Martín
ff21ce7665 Use translations for official level names seeds 2019-05-31 19:30:14 +02:00
Javi Martín
7830d90d4a Extract method to reset default settings 2019-05-31 19:28:50 +02:00
Javi Martín
9e6e6d6c9e Sort settings alphabetically 2019-05-31 19:28:50 +02:00
Javi Martín
bac0004fed Move default settings to Settings model 2019-05-31 19:28:35 +02:00
decabeza
cb22e6cbfb Merge branch 'master' into proposal-dashboard 2019-04-23 17:12:47 +02:00
Juanjo Bazán
b7d9ef6377 models inherits from ApplicationRecord 2019-04-17 17:40:56 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
9ed6aae348 Refactor Setting model
- Make easier to group settings by using prefixes
- Add method to rename setting keys
- Add method to remove setting keys
2019-03-19 15:14:08 +01:00
Julian Herrero
3ba961a2d7 Use double quotes in models 2019-03-14 17:25:43 +01:00
decabeza
8066b96fe3 Remove legacy banner images and banner styles settings 2019-02-25 14:59:38 +01:00
Juan Salvador Pérez García
6e75f5b494 Fixes #140
Adds a new setting that allows defining what is considered a successful
proposal.
2018-07-17 17:59:11 +02:00
Bertocq
c9bc028524 Remove all unnecesary extra spacing and Layout/ExtraSpacing list from rubocop file 2017-06-28 14:12:51 +02:00
MaiteHdezRivas
3b2bfc46cf Admin option to add banners and show banners 2016-05-19 13:18:30 +02:00
Juanjo Bazán
bb60e6b8e0 adds #enabled? to Setting 2016-01-25 14:07:07 +01:00
Juanjo Bazán
05837afd72 adds #feature_flag? to Setting 2016-01-25 13:45:15 +01:00
Juanjo Bazán
853f2c6fba fixes disabling of features via admin interface 2016-01-25 12:44:00 +01:00
Josep Jaume Rey Peroy
2d45828cad Feature-flag debates 2016-01-18 13:05:00 +01:00
Josep Jaume Rey Peroy
5de3d700e4 Simplify Settings API 2016-01-18 12:43:34 +01:00
Juanjo Bazán
f39d91597c reorders settings in admin 2015-09-14 13:37:50 +02:00
rgarcia
4897d5df4e makes spaces consistent 2015-09-03 01:29:46 +02:00
Juanjo Bazán
0dca4c277b adds Setting validation 2015-09-01 17:49:01 +02:00
Juanjo Bazán
a13f4920a1 adds Settings 2015-08-17 18:13:30 +02:00