Commit Graph

13615 Commits

Author SHA1 Message Date
Alberto
ecd4a8a7b7 Merge pull request #3399 from consul/min-age-to-participate
Use min age to participate setting on verification residence form
2019-03-22 17:09:30 +01:00
decabeza
21c6da3767 Use min age to participate setting on verification residence form 2019-03-22 16:15:48 +01:00
Javier Martín
6593bc056a Merge pull request #3401 from consul/backport-remove_obsolete_rake_tasks
Remove obsolete rake tasks
2019-03-22 14:08:42 +01:00
Javi Martín
9d6bd7e788 Remove obsolete rake tasks
These tasks dealt with data migrations or stats generations which were
done only once, so we don't need them anymore.

New CONSUL installations don't need these tasks, and existing CONSUL
installations will execute them when upgrading one release at a time.
2019-03-22 13:07:09 +01:00
Julian Herrero
8e5e757b00 Include default custom pages in developers seed 2019-03-22 12:29:42 +01:00
Javier Martín
7d472b747e Merge pull request #3400 from consul/fix_processes_order
Fix legislation process feed order
2019-03-22 11:14:26 +01:00
Javi Martín
58816aef5f Fix legislation process feed order
We need to add an ORDER BY clause; not doing so was causing different
processes to show up sometimes. As mentioned in the PostgreSQL manual:

> Because the order of the rows in the database table is unpredictable,
> when you use the LIMIT clause, you should always use the ORDER BY
> clause to control the order of rows. If you don’t do so, you will get
> an unpredictable result set.
2019-03-21 17:12:03 +01:00
Alberto
b36e102d01 Merge pull request #3396 from consul/proposals-rake
Add rake to move external_url to description
2019-03-21 16:04:37 +01:00
Senén Rodero Rodríguez
b417e9db31 Initialize new question answers coccon callback
After adding new question we need to initialize new answers
sets.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
71887f2911 Initialize answers 'after-insert' callback to keep answers order
Also provide a function to initialize new set of answers 'affer-insert'
callback after adding new questions.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
5e98c23be5 Fix HTML markup
We cannot use 'id' html attributes on nested answers
because there will be many answers form each question so
this would have generated invalid HTML.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
bc2d020d7e Add nested specs
Check remove behavior of poll nested resources: Questions and Answers
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
0d3e20f370 Fix dashboard poll form nested questions and answers
Nested remove association links were not working properly because of
missing Cocoon needed CSS class
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
045c950c3b Add poll question answers script for nested fields
Set poll questions answers given_order value dinamically with JS to
allow to create multiple answers with correct given_order.
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
9d9ad5003b Add given_order to related poll question answers forms
Since given order is no longer being generated automatically we need
to add it to related forms and to strong parameters methods
2019-03-21 14:51:17 +01:00
Senén Rodero Rodríguez
c73aae9663 Remove before validation callback
This was breaking nested poll_questions_answers when submitting
more than one new answer at a time.
2019-03-21 14:51:17 +01:00
decabeza
ab8f04a71e Add updated_at to proposals rake 2019-03-21 14:15:07 +01:00
decabeza
832f0c40a8 Add rake to move external_url to description
This rake move this field for Proposals and Legislation proposals.
2019-03-21 14:14:50 +01:00
Alessandro Cuoghi
e876c07579 Left-aligned label 2019-03-21 12:29:31 +01:00
taitus
9d85b39356 Display correcty link for resources with request_to_administrator: false
Fix: When a resource not need request_for_administrator always show text "request_resource" when the correct text is "view_resource".
2019-03-21 12:29:31 +01:00
taitus
6342d598f7 Update active resources count for proposal
Fix: Sum default resources (mail, poster, poll) to actives resources for a proposal.
2019-03-21 12:29:31 +01:00
taitus
a1de5b2334 Display tag "new" on actions
An author will see a "new" tag on each action or resource that has appeared on his dashboard since his last login.
Too add "new" tag on dashbord menu when there are new resources.
2019-03-21 12:29:31 +01:00
taitus
8b1c458fdf Allow detect new actions since a custom date
- Rename method "detect_new_actions" to "detect_new_actions_since". Add new param date.
2019-03-21 12:29:31 +01:00
taitus
b115c3af49 Rake task for create basic templates with actions and resources by default. 2019-03-21 12:29:30 +01:00
taitus
08383b9cac Send new notification email after publish Proposal
After publish a proposal send email to proposal's author with information text and new actions available.
2019-03-21 12:29:30 +01:00
taitus
5177adb32a New rake task for proposals to send new action email
Execute rake task every day to detect new actions available for not archived proposals. If there are new actions available for today, send email to proposal's author with information text, new actions available and link to proposal dashboard url.
2019-03-21 12:29:28 +01:00
Javier Martín
1fb110259e Merge pull request #3380 from consul/backport-rubocop_files
Enable rubocop rules in config and seed files
2019-03-20 15:36:26 +01:00
Javier Martín
3347776a65 Merge pull request #3379 from consul/backport-erb_lint
Add ERB Lint configuration file
2019-03-20 15:36:00 +01:00
Javi Martín
f30afab9e3 Add ERB Lint configuration file
The rubocop linter cannot use the `rubocop_config` option because it's
not compatible with Ruby 2.3. So we're setting the rubocop rules
manually.
2019-03-20 14:35:40 +01:00
Javi Martín
002599231f Enable rubocop rules in config and seed files
We were unintentionally ignoring them while trying to ignore just the
schema file, migration files, and initializers generated with `rails
generate`
2019-03-20 14:34:04 +01:00
Javier Martín
0fd9570ea8 Merge pull request #3384 from consul/backport-simplify_poll_factories
Simplify poll factories
2019-03-20 14:32:47 +01:00
taitus
c959e078b8 Send new action notification email after create Proposal
After create a proposal send email to proposal's author with information text and new actions available.
2019-03-20 11:50:47 +01:00
taitus
868c37ef35 Detect new actions for proposals
Create new Dashboard::Action class method to detect new actions between yesterday and today for a proposal.
- Published proposal: Only detect new actions with "published_proposal" field eq true
- Draft proposal: Only detect new actions with "published_proposal" field eq false
2019-03-20 11:50:46 +01:00
Julian Nicolas Herrero
f4de8fd42a Merge pull request #3387 from consul/admin_settings_improvement
Improve Admin settings section
2019-03-20 11:10:02 +01:00
Julian Herrero
e04fd74cf1 Add rake task to rename existing setting keys 2019-03-19 19:45:34 +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
decabeza
d07a8712bf Remove duplicated spec
Same spec on line 115
2019-03-19 18:25:48 +01:00
decabeza
3f1d3f3443 Fix hound warnings 2019-03-19 18:24:49 +01:00
Julian Herrero
1ece761beb Render map properly when changing between setting tabs 2019-03-19 18:14:57 +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
c0d2776e8d Refactor Admin settings tabs
- Rename partial views for tabs.
- Extract tables settings to reuse across the tabs.
2019-03-19 18:14:55 +01:00
decabeza
cebcf5783d Refactor proposed action 2019-03-19 18:07:40 +01:00
decabeza
cbc89dae8c Replace html_safe to i18n _html 2019-03-19 17:35:39 +01:00
decabeza
6c0b1a316b Change text on poster footer to show the proposal url 2019-03-19 17:27:51 +01:00
decabeza
71c6a6edbc Rename images using underscores 2019-03-19 17:18:21 +01:00
decabeza
dfadfd7411 Remove unused images 2019-03-19 17:17:16 +01:00
decabeza
500217ca48 Prevent break buttons layout on admin dashboard actions 2019-03-19 17:11:15 +01:00
decabeza
93450dee57 Remove unnecessary css class 2019-03-19 17:10:41 +01:00