Commit Graph

6 Commits

Author SHA1 Message Date
Javi Martín
a14cf4f700 Simplify padding rules for SDG selector
Now the padding is only applied in two places (administration forms) so
we can apply it just there instead of applying it everywhere and then
removing it in most places. We're using the `column` class here because
it's what's used in the rest of the fields of these forms and because we
haven't defined (yet) general margin/padding rules for the
administration views.
2021-07-13 15:27:14 +02:00
Senén Rodero Rodríguez
1d6490e22f Update sdg management homepage to render header cards 2021-02-26 16:16:51 +01:00
taitus
c052e907eb Prepare related list component to add on front pages
To make it easier to add the component to the front pages forms and
avoid introducing redundant classes we add the necessary padding
(@include grid-column-gutter) to make it behave  like the  rest of the form
fields.

Note that for the sdg management section we set this value to 0.
2021-01-22 12:42:51 +01:00
Javi Martín
7aee4f6241 Add SDG phases cards management
These cards will be displayed in the SDG homepage.

Note there seems to be a strange behavior in cancancan. If we define
these rules:

can :manage, Widget::Card, page_type: "SDG::Phase"
can :manage, Widget::Card

The expected behavior is the first rule will always be ignored because
the second one overwrites it. However, when creating a new card with
`load_and_authorize_resource` will automatically add `page_type:
"SDG::Phase"`.

Similarly, if we do something like:

can :manage, Widget::Card, id: 3
can :manage, Widget::Card

Then the new card will have `3` as an ID.

Maybe upgrading cancancan solves the issue; we haven't tried it. For now
we're defining a different rule when creating widget cards.
2021-01-14 17:40:02 +01:00
Javi Martín
2968275a1c Add empty SDG homepage configuration page
Here we'll eventually display links to edit the homepage and the cards
in it.
2021-01-14 17:35:38 +01:00
Javi Martín
a42cb050a7 Add SDG content section 2020-12-02 12:38:03 +01:00