Commit Graph

13 Commits

Author SHA1 Message Date
Javi Martín
864f750d92 Remove duplication in poll permissions
We were checking for `expired?` and `results_enabled?` in views and
helpers, when we've already defined a rule for accessing stats and
results for a poll.

This way we also fix a bug when stats were enabled but the poll wasn't
finished. In this scenario, the link pointed to the stats page, but when
clicking it we'd get a "you don't have permission" message.

Now the link doesn't point to the stats page anymore.
2019-11-09 19:33:02 +01:00
Javi Martín
e461c8d0ac Generate navigation links for polls without a slug 2019-05-21 13:04:26 +02:00
Bertocq
65fd88ef32 Use poll slug on stats and results paths 2019-05-17 05:41:09 +02:00
decabeza
4498c26ff7 Create helper for active menus and show stats or results on poll subnav 2019-01-24 14:44:11 +01:00
decabeza
62088bc635 Hide poll results and stats to admins 2019-01-24 14:33:41 +01:00
decabeza
ee884ed998 Updates active to is-active class for menus 2018-06-06 12:01:16 +02:00
rgarcia
21c7ff15fe fixes routes for poll's results and stats 2017-10-23 21:39:59 +02:00
Bertocq
39a0d81427 Fix current_user access when not anonymous user visits 2017-10-23 20:44:27 +02:00
decabeza
81e4978747 removes blank space 2017-10-23 19:56:49 +02:00
rgarcia
9ce7045717 fixes specs 2017-10-23 15:17:35 +02:00
María Checa
84f67db26d Added restrictions to access Poll results and stats 2017-10-23 14:17:25 +02:00
decabeza
78fa77b28d fixes styles for poll subnav 2017-10-19 12:23:14 +02:00
María Checa
70a35fbe58 Poll views improvements
Reorganized poll `#show`,  `#stats` and `#results` views. Gave stats section its own route.
2017-10-18 18:35:53 +02:00