Commit Graph

8202 Commits

Author SHA1 Message Date
Julian Herrero
d20e521ee9 Display the time a phase ends at in admin section 2021-03-11 19:37:58 +01:00
Javi Martín
b37eaf19c6 Use a time HTML tag to display phases dates
Currently this change is barely beneficial (if at all), but it doesn't
harm and might be useful in some cases. For instance, the `datetime`
attributes generates a date containing time zone information, which the
text shown on the screen does not, and styling dates with CSS is now
easier.
2021-03-11 19:37:58 +01:00
Javi Martín
a2a6ae7bdd Use a caption to identify budget phases table
This makes the table easier to identify when writing tests and using
screen readers.

Since we do not render any other table captions anywhere else, we're
making the caption invisible so only screen reader users will be
affected by this change.
2021-03-11 19:37:58 +01:00
Javi Martín
f9ecc583ef Extract methods to show a phase start/end 2021-03-11 19:37:58 +01:00
Javi Martín
cbe3d515b9 Extract file with CSS for budget phases table 2021-03-11 19:37:58 +01:00
Javi Martín
fb5b067d00 Extract phases edition to a component 2021-03-11 19:37:58 +01:00
decabeza
c4e7bf0938 Improve budget phases form layout
Dates are grouped in a fieldset and activating the phase is more
prominent.
2021-03-11 19:37:58 +01:00
decabeza
c0c458bb38 Remove summary in phases form
Since it does not appear in the phases anymore.

Also, the rake unifies the fields of the budget summary with the budget
description.
2021-03-11 19:37:58 +01:00
decabeza
f35a88cf4f Make finished budgets layout wider 2021-03-11 19:37:58 +01:00
decabeza
c0f9e4f045 Change budget phases design
Co-authored-by: Javi Martín <javim@elretirao.net>
2021-03-11 19:37:58 +01:00
Javi Martín
014d29b991 Extract method to get a budget phase title 2021-03-09 16:37:47 +01:00
Javi Martín
70cf956210 Extract method to check the current phase 2021-03-09 16:37:47 +01:00
Javi Martín
46e80bf430 Extract budget phases to a component 2021-03-09 16:37:47 +01:00
Javi Martín
d1675750b8 Fix a chrome bug in versions lower than 86
https://bugs.chromium.org/p/chromium/issues/detail?id=375693
2021-03-08 10:51:22 +01:00
Javi Martín
94f91a4aba Merge pull request #4353 from consul/sdg-help-page
Add SDG help page
2021-03-02 15:00:36 +01:00
Javi Martín
d67fae0fdc Merge pull request #4381 from consul/remove_residence_in_madrid
Use more generic names for validation rules
2021-03-02 14:54:58 +01:00
Senén Rodero Rodríguez
37faaa9b94 Add canonical link
As we do at other help pages.
2021-03-02 14:45:20 +01:00
Senén Rodero Rodríguez
aa6195abc5 Add link to SDG help page to Other information of interest section at main help 2021-03-02 14:45:19 +01:00
taitus
90f014f639 Allow open link on new window
While trying to add the target="_blank" to this link I noticed that this attribute
no longer works in some places in the application, such as the terms and
conditions  link in the sign_up page.

For the time being I think we can resolve it this way in this case and deal with
this issue in a separate PR.
2021-03-02 14:45:19 +01:00
taitus
e91b52ffe0 Add link to help page to related list selector component 2021-03-02 14:45:18 +01:00
taitus
43b6be575d Avoid SDG subnavigation link as active when visit help page
This help page can only be accessed from either the help page or the forms.
There is no button in the navigation bar related to this page.
For this reason we do not mark any section of the navigation bar as active
when we are on this page..
2021-03-02 14:45:18 +01:00
taitus
d26607183e Add sdg help page
In this page we will render a list of clickable Goals icons that will show their
targets and related local targets

Co-authored-by: Senen <senenrodero@gmail.com>
2021-03-02 14:45:18 +01:00
Javi Martín
d741ccdb36 Extract related list selector styles to mixin 2021-03-02 14:45:17 +01:00
Senén Rodero Rodríguez
588fac6055 Rename method and placeholder
As `residence_in_madrid` is too specific.

We should port this commit to main repo.
2021-03-02 13:15:15 +01:00
taitus
522684cd2f Adapt targets component to render on sdg help page
This component was rendered on different pages so there were no conflicts
with static id's.
Now in the SDG help page we are going to render them all at once, so we
convert the static identifiers to dynamic.
2021-02-26 16:36:40 +01:00
taitus
4a880fc1c5 Render header on sdg index page
We no longer show the static header when we have created a
custom header.
2021-02-26 16:20:57 +01:00
taitus
e639cab994 Move specific partial for the homepage to shared
This partial to render the header of the hompage will be used in
the sdg index.
2021-02-26 16:16:51 +01:00
Senén Rodero Rodríguez
1d6490e22f Update sdg management homepage to render header cards 2021-02-26 16:16:51 +01:00
Javi Martín
9cc0ad0ba9 Allow cards table actions to receive options
Just like we sometimes override options in the generic table actions
component, we're going to do the same thing with the cards table
actions.
2021-02-26 16:17:18 +01:00
Senén Rodero Rodríguez
c217af9f4b Add sdg management header controller 2021-02-26 16:16:51 +01:00
Javi Martín
ba4b1a91e1 Allow using a different URL on widget card forms 2021-02-26 16:16:51 +01:00
Senén Rodero Rodríguez
b8073cc764 Update sdg manager role abilities to allow to manage different kind of cards 2021-02-26 16:16:37 +01:00
Javi Martín
683af5de60 Merge pull request #4371 from consul/all_budgets_filter
Add filter to display all budgets in admin section
2021-02-26 14:47:19 +01:00
Javi Martín
da7846c6d5 Merge pull request #4361 from consul/sdg_per_budget_stats
Split investment projects statistics by participatory budget
2021-02-26 14:41:13 +01:00
Senén Rodero Rodríguez
ebe8903c75 Investment projects statistics by participatory budget
The more recent budgets show first.

The current budget will only show the amount of sent investments
until the winner's phase.
2021-02-26 14:08:45 +01:00
Senén Rodero Rodríguez
205cbd7d82 Extract component to render a single stat box 2021-02-26 11:30:46 +01:00
Javi Martín
45517f659e Add SDG goals/targets to legislation proposals 2021-02-24 20:42:53 +01:00
Javi Martín
3d97708cc5 Simplify calls to filter_by 2021-02-24 20:20:25 +01:00
decabeza
2f636eaf77 Add completed info on finished budgets 2021-02-23 18:39:45 +01:00
decabeza
4ff8162a2e Add filter to show all budgets in admin 2021-02-23 18:39:45 +01:00
decabeza
7eda4be219 Add link to preview budget on budgets table 2021-02-23 17:05:24 +01:00
Julian Herrero
77aaa5e973 Add task to set published on existing budgets
Note we're making the validation rule dynamic so it's affected by the
way we stub the constant in the tests to emulate data created in old
applications.

Co-Authored-By: Javi Martín <javim@elretirao.net>
2021-02-23 17:05:24 +01:00
Julian Herrero
28caabecdf Refactor participatory budgets in draft mode
Previously the draft mode was a phase of the PB, but that had some
limitations.

Now the phase drafting disappears and therefore the PB can have the
status published or not published (in draft mode).

That will give more flexibility in order to navigate through the
different phases and see how it looks for administrators before
publishing the PB and everybody can see.

By default, the PB is always created in draft mode, so it gives you
the flexibility to adjust and modify anything before publishing it.
2021-02-23 17:05:24 +01:00
Julian Herrero
0b2b8b557d Fix staff not being loaded after creating budget 2021-02-23 16:28:00 +01:00
decabeza
f685020fd0 Show results and stats settings only in budget edit view 2021-02-23 16:11:14 +01:00
decabeza
f27c0f46c3 Adjust styles for large sceens 2021-02-23 16:11:14 +01:00
decabeza
d0534b78da Improve admin budgets form structure
Co-Authored-By: Javi Martín <javim@elretirao.net>
2021-02-23 16:11:13 +01:00
Julian Herrero
6cec263d67 Add help text in budget phases
Co-authored-by: decabeza <alberto@decabeza.es>
2021-02-18 23:40:40 +01:00
Julian Herrero
0019974ccc Add help text in budget headings admin index
Co-authored-by: decabeza <alberto@decabeza.es>
2021-02-18 23:40:40 +01:00
Julian Herrero
ef6940c3e7 Add help text in budget groups admin index
Co-authored-by: decabeza <alberto@decabeza.es>
2021-02-18 23:40:40 +01:00