Commit Graph

2618 Commits

Author SHA1 Message Date
rgarcia
0286ca4c59 displays single booth for any number of polls 2019-03-28 15:47:52 +01:00
rgarcia
5dea0e039e updates notice 2019-03-28 15:47:52 +01:00
rgarcia
74706027cb fixes specs 2019-03-28 15:47:52 +01:00
rgarcia
b4499321d3 stores officer booth on sign in 2019-03-28 15:47:52 +01:00
rgarcia
5835d12694 stores the officer that allowed a voter to vote in a physical booth 2019-03-28 15:47:52 +01:00
Javi Martín
f6da20da64 Fix typos in investment order tests
There was a typo: `new_order = eq(all(` instead of `new_order = all(`,
which was causing the tests to pass.

However, the final expectation should test that we keep the same order
in the same session, and we were accidentally testing the opposite.

We're also adding an extra check to verify there are investments on the
page, since in some cases we were accessing pages with no investments,
and so these tests were always passing.
2019-03-28 13:51:51 +01:00
Javi Martín
5a529e5eb7 Use investments per page instead of Kaminari's
This is the actual number of investments per page in the index action.

Also note one test was generating 100 extra records, which made the test
take more than 40 seconds (on my machine).
2019-03-28 01:34:27 +01:00
decabeza
2af154d539 Merge branch 'master' into proposal-dashboard 2019-03-28 01:26:04 +01:00
decabeza
91be3cf775 Fix more hound warnings 2019-03-27 15:22:14 +01:00
decabeza
e5bff01027 Replace incoming filter on dashboard polls
Add starts_at attribute intead of incoming because this scope doesn't exists anymore.
2019-03-26 18:25:35 +01:00
decabeza
f47ec9d7dc Fix hound warnings 2019-03-26 18:21:19 +01:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Alberto
29a87e2746 Merge branch 'dashboard' into dashboard-polish 2019-03-26 12:19:20 +01:00
Raimond Garcia
f6526f4a45 Merge pull request #3271 from Platoniq/dashboard-user-communication
Dashboard user communication
2019-03-26 12:10:18 +01:00
Javi Martín
d894d24bff Use double quotes in config/locales 2019-03-25 14:58:54 +01:00
Javi Martín
2b4e1cf358 Add missing double quotes
We overlooked a few single quotes while we changed thousands of them.
2019-03-25 13:22:35 +01:00
Julian Nicolas Herrero
9cfd3c70be Merge pull request #3385 from consul/welcome_page_not_logged_in_user
Require logged in user if navigate to /welcome
2019-03-22 17:35:29 +01:00
decabeza
21c6da3767 Use min age to participate setting on verification residence form 2019-03-22 16:15:48 +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
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
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
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
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
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
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
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
Julian Herrero
8ae80cd1a1 Cleanup (remove unnecessary code) 2019-03-19 15:11:50 +01:00
Julian Herrero
511f0be287 Require logged in user if navigate to /welcome 2019-03-19 14:55:51 +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
Julian Herrero
58f22915e9 Use double quotes 2019-03-15 09:57:09 +01:00
Julian Herrero
da04f6caa7 Add test for booth votes case 2019-03-15 09:55:12 +01:00
Julian Herrero
1e04643576 Adjust spec after changing welcome pages
Welcome pages no longer have classes or `span' tags.
They still have the 4 `li' tags, so we check for them.
2019-03-14 18:35:51 +01:00
Julian Herrero
ddca825f9f Update spec after adding default pages
The spec was assuming there was only 1 custom page created in the
DB. With this change the spec will pass no matter how many  custom
pages there are in the DB.
2019-03-14 18:35:51 +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
Alberto
3c313c9c52 Merge pull request #3334 from consul/admin-polish
Improve UX on admin section
2019-03-13 17:15:22 +01:00
decabeza
b31b65f246 Add link to proposal if question was created from a proposal 2019-03-13 15:35:31 +01:00
decabeza
000819e928 Move create question to admin poll questions
Also move question actions to admin polls questions
2019-03-13 15:33:14 +01:00
decabeza
83e8d6035a Remove questions link on admin polls menu 2019-03-13 13:33:49 +01:00
decabeza
74958fab02 Always show create question button on admin proposal show 2019-03-13 13:28:12 +01:00
decabeza
e520a51d57 Replace default feature proposals to nil 2019-03-13 13:18:53 +01:00
decabeza
528a4b6e8e Add default colours to admin banners 2019-03-13 13:17:42 +01:00
Alberto
1f9ebbc749 Merge pull request #3340 from consul/unfeasible-investment
[Backport] Show unfeasible budget investment messages only when valuation finished
2019-03-12 11:09:44 +01:00
Javi Martín
db6229e38e Add specs for cumulative recounts totals 2019-03-07 02:09:17 +01:00
rgarcia
151239924b Display 'validate document' menu item only when applicable
We are trying to avoid Officers from forgetting to click the “Confirm
vote” button, which is necessary to keep track of who has voted a Poll

To do that, we are not displaying the menu item to go back to the next
person that wants to vote, until the Officer clicks the “Confirm Vote”
button or the “The user has decided not to vote” button

Note: Due to mobile version we have duplicate ids, so using classes for
the menu items to hide them without errors

Note2: We are only hidding the menu item, if there are votable polls,
otherwise the “Confirm vote” button does not appear, and there is no
way of going back to help the next person that wants to vote
2019-03-06 18:33:07 +01:00