Commit Graph

28 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
8b13daad95 Add and apply rules for multi-line hashes
For the HashAlignment rule, we're using the default `key` style (keys
are aligned and values aren't) instead of the `table` style (both keys
and values are aligned) because, even if we used both in the
application, we used the `key` style a lot more. Furthermore, the
`table` style looks strange in places where there are both very long and
very short keys and sometimes we weren't even consistent with the
`table` style, aligning some keys without aligning other keys.

Ideally we could align hashes to "either key or table", so developers
can decide whether keeping the symmetry of the code is worth it in a
case-per-case basis, but Rubocop doesn't allow this option.
2023-08-18 14:56:16 +02:00
Javi Martín
21faad66c9 Fix color changing on hover on non-link notifications
IMHO it was really strange to change the color on hover when the element
isn't interactive.
2022-10-24 20:38:14 +02:00
Javi Martín
71d9ddd849 Apply rule to end files with a newline character 2019-09-10 20:02:15 +02:00
Javi Martín
911fe4e481 Simplify calls to render partial
We're also adding a bit of consistency, since most of our calls to
partial rendering omit the `partial` and `locals` keys.
2019-09-04 15:00:36 +02:00
Senén Rodero Rodríguez
ce7be5f2d6 Change the way to retrieve notifiable body
Using 'try' method to get notifiable is not working with translations
anymore. It was returning 'nil' always even when body translation is
populated.
2019-06-27 09:19:36 +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
Bertocq
c0feabd71e Try if notifiable has notifiable methods
Why:

There are Notifications with associated `notifiables` that actually are
not anymore Notifiables (the class doesn't include the Notifiable
concern). So when Notification delegates certain "notifiable" methods
to them the is an error.

How:

Using `try` directly on the notifiable association to avoid the delegate
trap on those corner case scenarios.
2018-07-26 10:33:04 +02:00
Bertocq
a683fcff98 Refactor notification partials and index view
The notification body has been extracted to a new partial to allow
notifications without link to be rendered without needing an if-else
duplicating view code.

Note the `link_to_if` at _notification partial, as well as the optional
body attribute.
2018-07-25 18:31:41 +02:00
decabeza
ee884ed998 Updates active to is-active class for menus 2018-06-06 12:01:16 +02:00
decabeza
6824086f30 Adds styles for notifications views 2018-03-23 11:48:28 +01:00
rgarcia
09c44ee583 Extend notifications to be marked as read and unread 2018-03-23 11:47:06 +01:00
rgarcia
2b52d26d82 refactors notifications into concerns and shared examples 2017-12-14 16:15:30 +01:00
rgarcia
7465a8ef8e Refactors li element 2017-12-12 13:36:38 +01:00
rgarcia
e3c8dece8f Makes the code aware of notifications for hidden commentables 2017-12-11 13:22:10 +01:00
rgarcia
e2689d640c refactors notification helpers 2016-06-15 12:12:56 +02:00
rgarcia
a0ddde16e9 adds notifications for proposals 2016-06-07 22:03:14 +02:00
Alberto Garcia Cabeza
ecf6999730 Improves layout 2016-05-19 12:54:49 +02:00
Alberto Garcia Cabeza
84f044c131 Improves website accessibility 2016-03-08 14:00:06 +01:00
Alberto Garcia Cabeza
3752f3a53b Adds foundation 6 🎉 2016-02-26 19:33:33 +01:00
Alberto Garcia Cabeza
f03558fff3 Adds title to notifications page 2016-01-11 13:58:04 +01:00
Juanjo Bazán
704a038795 groups notifications 2016-01-08 14:32:16 +01:00
Alberto Garcia Cabeza
e008d1f642 Adds new styles for notifications 2016-01-08 12:45:37 +01:00
rgarcia
e2f419e625 destroy notifications when marked as read 2016-01-07 12:02:01 +01:00
rgarcia
b5e9113718 merges activities into notifications 2016-01-06 12:33:37 +01:00
Julian Herrero
7a8ffe2d4a cleanup 2016-01-05 17:43:44 +01:00
Julian Herrero
d9ba3edc2a mostrar notificaciones a los usuarios cuando alguien comenta en su
debate o responde a su comentario
2016-01-05 17:43:44 +01:00