Commit Graph

143 Commits

Author SHA1 Message Date
Javi Martín
68b32f2a84 Remove duplication creating web sections in seeds 2021-01-19 15:35:18 +01:00
Senén Rodero Rodríguez
cbe84450ac Add Goals seeds and translations
Extracted from the official United Nations Sustainable Development
Goals website [1].

[1] https://www.un.org/sustainabledevelopment/sustainable-development-goals/
2020-12-02 12:38:03 +01:00
Javi Martín
9028d82f77 Remove unnecessary enconding magic comment
This comment isn't necessary since Ruby 2.0, where UTF-8 became the
default encoding.

I've found this issue thanks to the EmptyLineAfterMagicComment rubocop
rule.
2019-10-24 17:56:03 +02:00
Javi Martín
7ca55c44e0 Apply Rails/SaveBang rubocop rule
Having exceptions is better than having silent bugs.

There are a few methods I've kept the same way they were.

The `RelatedContentScore#score_with_opposite` method is a bit peculiar:
it creates scores for both itself and the opposite related content,
which means the opposite related content will try to create the same
scores as well.

We've already got a test to check `Budget::Ballot#add_investment` when
creating a line fails ("Edge case voting a non-elegible investment").

Finally, the method `User#send_oauth_confirmation_instructions` doesn't
update the record when the email address isn't already present, leading
to the test "Try to register with the email of an already existing user,
when an unconfirmed email was provided by oauth" fo fail if we raise an
exception for an invalid user. That's because updating a user's email
doesn't update the database automatically, but instead a confirmation
email is sent.

There are also a few false positives for classes which don't have bang
methods (like the GraphQL classes) or destroying attachments.

For these reasons, I'm adding the rule with a "Refactor" severity,
meaning it's a rule we can break if necessary.
2019-10-23 14:39:31 +02:00
Javi Martín
c3bcb10c2b Make WebSection seeds idempotent
Each time we were loading the seeds file, more web sections were
created.

On production it meant running `db:seeds` several times created the
records even if they already existed.

During the test, it meant 5 more records were created before every test,
so after ending a test run, thousands of records existed, making banner
tests very slow.
2019-08-06 22:00:29 +02:00
Javi Martín
7830d90d4a Extract method to reset default settings 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
Javi Martín
19245efc93 Simplify code seeding settings 2019-05-31 19:28:13 +02:00
Javi Martín
bf6cadd137 Remove redundant comments
Commenting things like "proposal_code_prefix" represents the "Prefix
for the Proposal codes" is unnecessary.
2019-05-31 19:27:30 +02:00
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
voodoorai2000
e139057001 Disable dashboard email deliveries
We have to doble check all emails deliveries from the dashboard.

Using a setting to skip all dashboard email deliveries for now.

Note that a rake task to activated the `Setting["dashboard.emails"]` will need to be addded when we want to activate deliveries of these emails.
2019-04-29 15:43:46 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
4df9a1a1b4 Move HTML settings to content blocks settings page
- Rename html settings keys
- Show html settings next to content blocks page
- Hide html settings from configuration tab
2019-03-19 19:45:34 +01:00
Julian Herrero
89d4ea5aa3 Remove homepage widget settings from configuration tab
- Rename homepage widget settings keys
2019-03-19 19:45:34 +01:00
Julian Herrero
c82b2a975a Add new settings tab for participation processes
- Rename setting keys
- New tab por participation processes
- Hide these settings from features tab
2019-03-19 19:45:32 +01:00
Julian Herrero
dbac4bc222 Change admin settings tab for maps
- Rename map settings keys
- Add fields for latitude, longitude and zoom
- Add a callout message on how to enable map feature
2019-03-19 18:14:57 +01:00
Julian Herrero
27553e9058 Move setting next to similar/related settings 2019-03-19 15:11:30 +01:00
Julian Herrero
87be6f302c Add default site customization pages
From now on these static pages:

`/privacy'
`/conditions'
`/accesibility'
`/help/faq'
`/welcome'

have been moved to the DB and can be modified easily by any
administrator in `/admin/site_customization/pages'
2019-03-14 18:35:51 +01:00
decabeza
e7dd63e264 Fix hound warnigns on seeds 2019-03-13 13:19:17 +01:00
decabeza
e520a51d57 Replace default feature proposals to nil 2019-03-13 13:18:53 +01:00
decabeza
0e1bf2188c Remove unused verification offices url setting 2019-03-06 13:08:35 +01:00
decabeza
8066b96fe3 Remove legacy banner images and banner styles settings 2019-02-25 14:59:38 +01:00
decabeza
2e135ca3f1 Remove unused place name setting 2019-02-19 14:08:44 +01:00
decabeza
25c8212e80 Remove proposal improvement path setting 2019-02-19 11:07:58 +01:00
decabeza
ccee843da7 Remove unused settings
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
2019-02-18 15:40:11 +01:00
Julian Herrero
96dfa2fd65 add setting for new 'most active' algorithm 2018-12-13 11:41:27 +01:00
Alberto
05abcbe944 Merge pull request #3081 from consul/featured-proposals
[Backport] Featured proposals
2018-12-10 22:17:51 +01:00
Pierre Mesure
3fcd701723 Add websections at the end of the seeds 2018-12-07 14:48:21 +01:00
decabeza
37da986014 Adds settings for featured proposals 2018-12-04 18:04:36 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
decabeza
dbf41421ed Removes guide feature 2018-10-17 14:58:29 +02:00
decabeza
dd11a040a6 Adds setting to enable or disable help page 2018-09-28 18:59:28 +02:00
Juan Salvador Pérez García
488e7e081f Merge branch 'dashboard' into rebase_consul_master 2018-09-27 09:18:27 +02:00
Juan Salvador Pérez García
6cc1ddb9af Fixes #231
Implements a poster feature for the proposals dashboard
2018-07-31 12:50:25 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
decabeza
e101458891 Removes custom content on seeds 2018-07-20 18:49:54 +02:00
Juan Salvador Pérez García
dc4945f1aa Fixed missing seed initialization
Fixed missing setting initialization in seeds.rb
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
a872c5b5df Fixes #200
Adds settings to complete the polls card and feature view.
2018-07-17 17:59:11 +02: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
decabeza
bdb3f30e40 Adds recommendations on proposals index 2018-07-15 21:28:57 -04:00
decabeza
36a5ff39b8 Adds recommendations on debates index 2018-07-15 21:28:57 -04:00
rgarcia
0e097973cc Add widget feeds to homepage
Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed

We’ll figure it out and clean up 😌
2018-05-28 18:17:26 +02:00
Raúl Fuentes
bc1b70205b Add default value for the setting on seeds/dev_seeds 2018-05-22 15:03:43 +02:00
Bertocq
35c156ba7a Create setting to enable/disable attached documents
Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
2018-04-10 12:46:09 +02:00
decabeza
fc89c899cc Updates help url example on seeds 2018-01-30 18:28:05 +01:00
rgarcia
d3d05f9cee Add guide to create a proposal or investment
During a Participatory Budget, some users are getting confused and
creating a proposal instead of a budget investment. This intermediate
page should help them create investments

Adding a feature flag just in case other forks don’t need this feature
and setting seeds and dev_seeds for appropriate initial setup
2018-01-18 21:09:21 +01:00
Bertocq
065b0ed3c8 Create Related Content Scores 2017-12-20 02:36:10 +01:00
María Checa
853e655e0c Changed related_contents_report_threshold setting value 2017-12-19 13:13:20 +01:00
Alberto García
19925de06b Merge pull request #2170 from consul/design
Design improvements
2017-12-14 11:31:31 +01:00
Raimond Garcia
11e80fbc92 Merge pull request #1903 from wairbut-m2c/aperez-enable-disable-proposals
Add enable/disable option for 'Proposals' feature
2017-12-08 11:41:13 +01:00