Commit Graph

8 Commits

Author SHA1 Message Date
Javi Martín
1d955b7a20 Simplify using helper methods in components
The `use_helpers` method was added in ViewComponent 3.8.0, and it's
included by default in all components since version 3.11.0.

Note we sometimes delegated the `can?` method to the controller instead
of the helpers, for no particularly reason. We're unifying that code as
well.
2024-03-02 17:34:25 +01:00
decabeza
10cd182774 Add more images to admin site customization 2022-08-17 13:51:13 +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
8a3b9f6abf Remove no longer necessary row classes
These element had no columns inside and the row classes had only been
added to give them a maximum width. That's no longer necessary since now
the body has that maximum width.
2021-07-07 23:03:58 +02:00
taitus
35db41827c Add tag list component to process feed
Remember that this component (widget/feeds/process) is displayed both in
the home page and in the target index.
2021-01-31 13:53:57 +01:00
taitus
ca36dd56f0 Add tag list component to proposal feed 2021-01-31 13:53:57 +01:00
taitus
edbef4fd88 Add tag list component to debate feed 2021-01-31 13:53:57 +01:00
Javi Martín
e8e920ee50 Rename Widgets components to Widget
So naming is consistent with the way Admin::Widget controllers are
named.
2021-01-12 14:50:37 +01:00