Commit Graph

13635 Commits

Author SHA1 Message Date
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
decabeza
e949d4d163 Refactor proposal total counter value 2019-03-19 16:59:57 +01:00
decabeza
9b95870c12 Remove empty div 2019-03-19 16:41:49 +01:00
Alberto
7b2258aeb0 Merge pull request #3263 from Platoniq/dashboard-recommended-actions-page
Dashboard recommended actions page
2019-03-19 16:21:28 +01:00
Alberto
093a8cdb10 Merge pull request #3261 from Platoniq/dashboard-poster-email-styles
Dashboard poster email styles
2019-03-19 16:21:20 +01:00
Alberto
501f6257bf Merge pull request #3260 from Platoniq/dashboard-actions-for-published-proposals
Dashboard actions for published proposals
2019-03-19 16:20:47 +01:00
Alberto
f9586bc97c Merge pull request #3259 from Platoniq/dashboard-fix-counter-design
Dashboard fix counter design
2019-03-19 16:20:28 +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
8ae80cd1a1 Cleanup (remove unnecessary code) 2019-03-19 15:11:50 +01:00
Julian Herrero
27553e9058 Move setting next to similar/related settings 2019-03-19 15:11:30 +01:00
Julian Herrero
511f0be287 Require logged in user if navigate to /welcome 2019-03-19 14:55:51 +01:00
Julian Nicolas Herrero
8d83e70ef4 Merge pull request #3369 from consul/double_quotes_for_views
Change single quotes to double quotes for views
2019-03-19 14:34:53 +01:00
Javi Martín
b3a8924fe0 Don't create an officer for poll voter factories
For web poll voters, it isn't necessary in order to make the record
valid, and it adds an extra record to the database for each poll
voter created.
2019-03-19 13:29:45 +01:00
Javi Martín
d69adbccb7 Avoid creating extra poll records in tests
The line:

create(:poll_voter, booth_assignment: booth_assignment_final_recounted)

Creates a new poll for the poll voter. Not only it wastes time by
creating new database records, but it doesn't make sense to have a poll
voter for a poll which isn't the same as its booth assignment's poll.
2019-03-19 13:29:45 +01:00
Javi Martín
8118926ba7 Simplify tests creating poll voters 2019-03-19 13:29:43 +01:00
Javi Martín
4a3115607a Simplify poll stats test
Adding the option to assign a poll to a poll recount factory meant we
didn't need to create so much data.

Also note we're removing the `create(:poll_voter, origin: "booth")`
code, since it isn't used in the stats calculations.
2019-03-19 13:24:24 +01:00
Javi Martín
4830b563ea Create only one poll for a poll voter
The factories were creating strange database relations:

* The voter belonged to a poll, to a booth and to an officer
* The booth belonged to a different poll
* The officer belonged to a different booth

The code uses an unusual syntax because the following code:

association :booth_assignment,
            factory: :poll_booth_assignment,
            poll: poll

Would generate the following error:

ActiveRecord::AssociationTypeMismatch: Poll(#46976420451940) expected,
got FactoryBot::Declaration::Implicit
2019-03-19 13:19:24 +01:00
Javi Martín
b05ea2964c Simplify poll voter factory associations 2019-03-19 13:19:24 +01:00
Julian Herrero
f6489bc604 Use double quotes in app/views 2019-03-19 12:33:07 +01:00
Julian Nicolas Herrero
d83bf940be Merge pull request #3370 from consul/double_quoutes_everywhere
Change single quotes to double quotes everywhere
2019-03-19 12:20:16 +01:00
Julian Herrero
dbe99f058e Use double quotes in app/views/shared 2019-03-19 12:16:50 +01:00
Julian Herrero
7fe6285fe3 Use double quotes in app/views/proposals 2019-03-19 12:16:50 +01:00
Julian Herrero
129a258f19 Use double quotes in app/views/moderation 2019-03-19 12:16:50 +01:00
Julian Herrero
0e0462368b Use double quotes in app/views/management 2019-03-19 12:16:50 +01:00
Julian Herrero
2b83be1c7c Use double quotes in app/views/legislation 2019-03-19 12:16:50 +01:00
Julian Herrero
25ed245689 Use double quotes in app/views/layouts 2019-03-19 12:16:50 +01:00
Julian Herrero
b78ff808c1 Use double quotes in app/views/debates 2019-03-19 12:16:50 +01:00
Julian Herrero
c87267d34f Use double quotes in app/views/budgets 2019-03-19 12:16:50 +01:00
Julian Herrero
0bb2633c7a Use double quotes in app/views/admin 2019-03-19 12:16:50 +01:00
Julian Herrero
c32a98be10 Use double quotes in app/views/admin/site_customization 2019-03-19 12:16:50 +01:00
Julian Herrero
e63a862882 Use double quotes in app/views/admin/poll 2019-03-19 12:16:50 +01:00