Commit Graph

20 Commits

Author SHA1 Message Date
lalo
23d36835d7 Add Admin changes to create Poll:Questions with votation type 2019-06-12 19:44:14 +02:00
Javi Martín
eb13994999 Extract partial for form to show results and stats 2019-05-22 11:50:03 +02:00
Javi Martín
354b183e17 Create reports
This table will store which reports (stats, results, ...) will be shown
for a certain process (polls, budgets, ...).

Note Rails fails to save a poll and its report when both are new records
if we add a `validate :process, presence: true` rule. Since it caused a
lot of trouble when creating records for tests during factories rule
completely. Instead, I've created the `results_enabled=` and
`stats_enabled=` methods, so tests are easier to set up, while also
automatically creating a report if it doesn't already exist. This also
decouples form structure and database implemenation.

Originally I named this table `enabled_reports` and instead of having
`stats` and `results` columns, it had an `enabled` column and a `kind`
column, which would be set to "stats" or "results". However, although
that table would allow us to add arbitrary reports easily, I found the
way we had to handle the `has_many` relationship was a bit too complex.
2019-05-22 11:50:03 +02:00
Julian Herrero
18bd2c7de8 Refactor (improve readability) 2019-03-15 09:55:12 +01:00
João Lutz
47a33ea86c Enable options to show stats and results with any type of voter 2019-01-05 14:08:47 -02:00
decabeza
608f1996ce Fixes admin layout 2018-05-23 08:08:54 -04:00
Angel Perez
44b1eb929a Move 'Show stats and results' form to Admin::Poll#results tab 2018-05-23 07:27:12 -04:00
Bertocq
3daf957813 Fix table tag indentation 2017-10-19 13:35:04 +02:00
rgarcia
7ddc225d8b fixes alignment for link params 2017-10-19 11:28:09 +02:00
rgarcia
1ae91017b4 adds heading to results by booth table 2017-10-19 11:28:09 +02:00
rgarcia
5d3654f92f refactors recounts into partial 2017-10-19 11:28:09 +02:00
rgarcia
fcbcca3b60 sorts booths by name 2017-10-19 11:28:09 +02:00
rgarcia
0e8dc55b1b updates translations 2017-10-19 11:28:09 +02:00
rgarcia
6b98bc0086 displays links to results by booth 2017-10-19 11:28:09 +02:00
rgarcia
cf400f3082 refactors poll results into partial 2017-10-19 11:28:09 +02:00
Bertocq
e9294f2a22 Switch from valid_answers to question_answers usage for Poll Questions 2017-10-18 01:32:15 +02:00
Bertocq
b5cf28cb35 Swap Poll White/Null/Total usage for Poll Recount 2017-10-02 15:46:49 +02:00
Bertocq
e8d748a881 Add Poll Total recount to officing and admin 2017-09-14 15:33:58 +02:00
Juanjo Bazán
2d722f1ad4 redux admin poll subnav 2017-02-14 14:57:49 +01:00
Juanjo Bazán
0bd87c7e43 extracts results from admin's poll/show 2017-02-14 14:26:46 +01:00