Commit Graph

31 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
091abfc944 Use Active Storage to render attachments
This way we fix a bug we mentioned in commit 930bb753c which caused
links to documents to be broken when editing their title because the
title was used to generate the URL of the document.

Note we're still using Paperclip to render cached attachments because
this is the only case where we store files with just Paperclip and not
Active Storage.

With Active Storage, we render attachments just like any other resource,
using `polymorphic_path`. Paperclip included the `url` method in the
model; since the model doesn't have access to the request parameters
(like the host), this was inconvenient because it wasn't possible to
generate absolute URLs with Paperclip.

In order to simplify the code and make it similar to the way we used
Paperclip, we're adding a `variant` method accepting the name of a
variant and returning the variant.
2022-02-23 18:21:38 +01:00
Javi Martín
6ea9383743 Allow toggling elements with the keyboard
Using `<a>` tags with no `href` means these elements cannot be activated
by keyboard users, so we're replacing them with buttons.

In the future we probably want to add more consistency so all toggle
buttons use the same code. We might also add styles depending on the
`aria-expanded` property.
2021-03-31 13:38:38 +02:00
Javi Martín
f864156b21 Add and apply ClosingErbTagIndent ERB Lint rule
Note this rule does still allow us to add new lines after opening tags;
it just makes sure that if we do, we also add it in closing tags.
Likewise, if we don't add it in the opening tag, it forces us not to add
it in the closing tag either.

I don't have a strong preference about either style; in these cases I've
chosen the latter because it seemed more common in our code.
2021-02-05 17:39:42 +01: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
Julian Herrero
2b83be1c7c Use double quotes in app/views/legislation 2019-03-19 12:16:50 +01:00
decabeza
88cae1424e Add missing mobile social share message 2019-03-14 11:32:14 +01:00
decabeza
5893ed7587 Create helper for legislation process header with custom colors 2019-01-30 13:15:42 +01:00
Manu
b6cfe92d76 fixed banner styles issues 2019-01-21 12:02:27 -05:00
Manu
bd4e12112d Add image to legislation processes and banner colors 2019-01-21 12:02:27 -05:00
decabeza
9dfbeed140 Moves draft and final result publication dates from tabs to sidebar 2019-01-15 16:13:41 +01:00
decabeza
1ab4458785 Adds description to legislation process share buttons 2018-03-07 17:19:01 +01:00
decabeza
995449d733 Adds share buttons and refactors processes header 2018-03-07 17:16:54 +01:00
Carlos Ruiz
dc2e2a0944 Minor refactor and implement foundation toggler 2017-09-21 23:09:04 +02:00
Carlos Ruiz
c9ce560380 Legislation process minor html fixes 2017-09-20 23:34:27 +02:00
decabeza
e20ac83cc9 fixes wrong close tag 2017-09-05 14:29:11 +02:00
decabeza
a15a75a4d6 cleans legislation process scss 2017-09-05 11:50:42 +02:00
decabeza
da1f72ee7c improves legislation processes header layout 2017-09-05 11:50:42 +02:00
decabeza
76b7f66fb3 fixes scss lint warnings 2017-06-16 12:09:01 +02:00
Bertocq
41ec36f470 Correct the Legislative Process description column width to occupy full page now that its alone 2017-06-11 11:01:18 +02:00
Bertocq
02d31953be Remove Target field from Legislative Process from views, i18n, factories and specs 2017-06-10 23:16:13 +02:00
Bertocq
d624a08abc Remove How To Participate field from Legislative Process from views, i18n, factories and specs 2017-06-10 23:11:55 +02:00
decabeza
eb3aa00063 removes empty divs 2017-05-23 13:15:53 +02:00
decabeza
260df52a34 uses current css classes 2017-05-23 12:22:57 +02:00
Amaia Castro
08ab7474d0 Make process texts optional 2017-02-09 12:27:16 +01:00
Amaia Castro
c0a958b708 Remove subscription html 2017-01-18 17:02:18 +01:00
Martín González
146db24d58 Refactor header toggle and show additional info on the small header 2017-01-18 12:26:45 +01:00
Martín González
046bcbfb0f Fix small header toggle 2017-01-12 12:48:14 +01:00
Martín González
a0011b7c5c More css fixes 2017-01-12 11:55:12 +01:00
Fernando Blat
dc3a917877 Add missing translation 2017-01-05 16:46:53 +01:00
Fernando Blat
7100156b28 Show full header when click on expand button 2017-01-05 10:55:53 +01:00