decabeza
36e452437e
Add questions with mutiple answers to polls public interface
...
The `reload` method added to max_votes validation is needed because the
author gets here with some changes because of the around_action
`switch_locale`, which adds some changes to the current user record and
therefore, the lock method raises an exception when trying to lock it
requiring us to save or discard those record changes.
2022-10-18 11:04:40 +02:00
Senén Rodero Rodríguez
7efd7c89ef
Extract Polls::QuestionComponent
2022-10-18 10:38:08 +02:00
Senén Rodero Rodríguez
bd58023a8a
Extract polls questions answers partial into a component
2022-10-17 18:03:36 +02:00
Senén Rodero Rodríguez
527d5691f7
Make poll feature work in browsers with javascript disabled
...
By using the Rails `button_to` helper (which generates a form), and adapting the
response to `html` and `js` formats, the feature works with or without javascript
enabled.
2022-09-22 17:39:57 +02:00
Senén Rodero Rodríguez
64676be246
Remove token column from poll_voters table
...
As it is no longer used as originally pretended [1][2].
[1] Check consul/consul pull request 1994
[2] Check consul/consul pull request 3539
2022-09-22 10:34:07 +02:00
Javi Martín
af7c37634d
Remove poll votation types
...
Unfortunately this feature wasn't properly reviewed and tested, and it
had many bugs, some of them critical and hard to fix, like validations
being skipped in concurrent requests.
So we're removing it before releasing version 1.1. We might add it back
in the future if we manage to solve the critical issues.
This commit reverts commit 836f9ba7 .
2019-10-30 18:48:55 +01:00
Javi Martín
f9ed186909
Add rubocop spacing rules
...
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
cf9e36c767
Replace single quotes with double quotes
...
Most of these quotes were in the dashboard branch before we added the
rule for double quotes.
2019-09-10 19:21:03 +02:00
Javi Martín
06be5e132f
Fix label in form to add own answer
...
The label text was always in English, and it wasn't associated with any
input field.
The `SecureRandom` part is a quick hack so we don't get duplicate IDs.
Using "your_answer_#{question.id}" might work as well, but right now I'm
not sure if the form is sometimes rendered twice for the same question.
2019-08-27 17:22:22 +02:00
lalo
c6e4b2480f
Add public changes to create and vote Poll:Questions with votation type
2019-06-12 19:44:14 +02:00
Javi Martín
3e4e65ead7
Use double quotes inside ERB
...
We were using single quotes inside ERB code when that code was inside
HTML double quotes.
2019-03-25 14:58:54 +01:00
Julian Herrero
f6489bc604
Use double quotes in app/views
2019-03-19 12:33:07 +01:00
Alberto Garcia Cabeza
54fbae6339
adds links to login or verification on question answers
2018-12-05 14:31:58 +01:00
María Checa
8b2f6d454c
Show poll answers in poll show view after voting on a booth
...
If the user votes in a booth, it can see the poll and answers but can't see what he/she voted and the answers are inactive (no link, inactive ui style).
2017-10-07 17:33:27 +02:00
Raimond Garcia
2e4ce39722
Merge pull request #1994 from consul/feature/1985#voting_token
...
Voter Answer unique Token
2017-10-07 16:54:01 +02:00
rgarcia
e320a836e7
fixes specs
2017-10-07 13:31:54 +02:00
BertoCQ
6a0197a61b
Merge branch 'master' into feature/1985#voting_token
2017-10-07 10:46:13 +02:00
Bertocq
27a1584a0f
Check if user has already voted in a booth on this poll
2017-10-06 23:59:53 +02:00
María Checa
bcfd1a844a
Poll voter token
2017-10-06 20:44:47 +02:00
Bertocq
165509b525
Switch from Poll::Answer to Poll::Voter usage and small fixes
2017-10-06 18:59:47 +02:00
Bertocq
d4408efda6
Generate a unique token for a Poll Ballot and use it on answer buttons
2017-10-06 14:36:21 +02:00
María Checa
c3f778bbdd
Check if user has voted before sign in
2017-10-06 01:18:56 +02:00
María Checa
0cf5299846
Set voting messages
2017-10-06 00:04:25 +02:00
rgarcia
4aaf681d2d
uses new answer model in user facing interface
2017-10-04 17:45:51 +02:00
María Checa
9871503c5e
Restored views
2017-10-03 21:00:40 +02:00
María Checa
5bb831e959
Removed poll question show
2017-10-03 19:11:39 +02:00
María Checa
3ff89b2476
CSS minor fix
2017-09-06 20:29:59 +02:00
María Checa
12e6b9e681
Added video link to question public view
2017-09-06 19:11:28 +02:00
María Checa
11ab061b9b
Added documents to question view
...
Added same subnavigation as proposals for comments and documents in poll questions.
2017-09-06 17:27:05 +02:00
decabeza
6c5513ab38
replaces back_link partial to back_link_to helper
2017-07-26 18:22:45 +02:00
kikito
e6fd615adf
uses Poll::Question#author_visible_name in question/show
2017-02-07 12:09:19 +01:00
Alberto Garcia Cabeza
692ebe8893
moves button to header, removes answers on questions show
2017-01-30 21:08:35 +01:00
kikito
bc763c34c2
Removes Poll::Question.summary from views
2017-01-30 18:41:24 +01:00
kikito
b2a43d8450
Extracts list of reasons to a partial
2017-01-30 11:30:30 +01:00
kikito
d9351b123d
prints a button to redirect to the poll when a question is answerable
2017-01-25 17:58:09 +01:00
kikito
6711063c7d
Moves geozones from question to poll in user show views
2017-01-24 18:09:27 +01:00
Alberto Garcia Cabeza
219754e02e
maintains answers centered on questions show
2016-12-26 17:36:50 +01:00
Alberto Garcia Cabeza
aac501bfda
improves styles for polls questions views
2016-12-26 17:23:17 +01:00
Alberto Garcia Cabeza
6dd3320425
improves styles to polls questions views
2016-12-22 18:31:51 +01:00
Juanjo Bazán
1a20a3ce46
refactors i18n for polls
2016-12-07 14:49:56 +01:00
rgarcia
e4a61887d2
removes question attribute from poll_question show
2016-11-24 10:56:46 +01:00
rgarcia
4955daf886
adds poll and poll question's specs
2016-11-17 22:48:00 +01:00
rgarcia
b104859da3
adds question comments
2016-11-16 19:41:52 +01:00
rgarcia
6fe965a9b8
adds question's show
2016-11-16 19:41:29 +01:00
kikito
1f9945d0aa
Implements answering questions
2016-11-14 13:36:00 +01:00