Commit Graph

17 Commits

Author SHA1 Message Date
Javi Martín
629e208e9d Add and apply ArgumentAlignment rubocop rule
We're choosing the default `with_first_argument` style because it's the
one we use the most.
2023-08-18 14:56:16 +02:00
Javi Martín
6a2c01b119 Extract method to render an admin table action
This way it will be easier to change the behavior of all table actions,
like adding ARIA attributes. In the past, when we changed the behavior
of the `link_to` method, we had to change all table action classes.
2021-09-20 20:27:37 +02:00
Javi Martín
26fed593df Apply Style/RedundantInterpolation to ERB files
We forgot to do so in commit 469b39ffa.
2021-09-03 11:49:53 +02:00
Javi Martín
8c1140a1bf Use semantic HTML classes in table actions
Note the CSS could probably be improved to avoid duplication with other
button style definitions. However, that's fine because we're going to
change the style of the links soon.

For the same reason, I haven't bothered to style every single link the
way it was until now.
2020-11-03 14:58:02 +01:00
Javi Martín
fb23df2e5b Allow additional links in table actions component
This way we'll be able to make these links consistent.
2020-10-21 13:19:49 +02:00
Javi Martín
e3753b1ad9 Allow custom options in links to actions
Some links were using options like `remote: true`.
2020-10-19 18:56:02 +02:00
Javi Martín
f76930aab6 Simplify URL to destroy a booth assignment
We can find the booth through the booth assignment, so we don't need to
pass it in the URL.

Since the parameter is in the URL and not sent through a form, we can
also use `params[:poll_id]` directly, and so we can reuse the
`load_poll` method.
2020-10-19 18:48:01 +02: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
decabeza
ee16900d1b Unifies styles and views for admin voting booths section 2018-07-31 12:54:12 +02:00
iagirre
4b8a471d38 Specs added to test the functionality and some UI modified to make test pass 2017-10-30 16:50:25 +01:00
iagirre
1077e25b2b Shifts are destroyed when a booths is unassigned. An alert appears if there are shifts, but it doesn't if there aren't. 2017-10-30 12:36:07 +01:00
iagirre
89425f50ef First steps to destroy shifts when booth_assignments are destroyed 2017-10-27 14:57:32 +02:00
iagirre
b854d99248 Assign/Unassign button for expired polls is disabled 2017-10-27 13:10:10 +02:00
Bertocq
995289304e Add booth location on booth assigment management list, plus poll links on list 2017-10-20 22:08:34 +02:00
Bertocq
9b70b90e6a Fix texts for booth assignment management 2017-10-19 22:05:02 +02:00
Bertocq
68b7528bab Complete booth assigment partial with assign/unassign buttons and status 2017-10-19 21:31:36 +02:00
Bertocq
f8839434f7 Complete booth assignment view list without actions yet 2017-10-19 20:10:51 +02:00