Commit Graph

34 Commits

Author SHA1 Message Date
Javi Martín
b51aa31e6a Use HTML beautifier to indent ERB files
We had inconsistent indentation in many places. Now we're fixing them
and adding a linter to our CI so we don't accidentally introduce
inconsistent indentations again.
2025-03-07 16:31:08 +01:00
Sebastia
c816c51787 Merge pull request #5173 from consuldemocracy/budget_results
Replace back link on budget results
2023-11-14 10:08:31 +01:00
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
Alberto
b34cfaac1b Replace back link on budget results 2023-08-10 18:32:54 +02:00
decabeza
4c0499d53b Manage the render of the price field on budgets results section 2022-03-29 14:49:28 +02:00
Javi Martín
2c76f265f8 Add and apply Style/NegatedIfElseCondition rule
This rule was added in Rubocop 1.2.0, and will make developers who hate
negative conditions particularly happy.
2021-09-03 11:49:53 +02:00
Julian Herrero
7e3dd47d5a Unify budget landing pages
There was a big difference between the current budget and a specific
budget landing page. This didn't really make too much sense. Also, it
was not possible to know how a draft participatory budget will look
before it was published.

By unifying those two views now they will look quite similar and it
will be possible for administrators to preview any draft budget and to
know how the budget will look like before actually publishing it.
2021-03-18 15:03:21 +01:00
Javi Martín
82b0a6a92d Remove new CSV report generation
The new CSV report was more configurable and could work on proposals,
processes and comments. However, it had several issues.

In the public area, by default it generated a blank file.

In the admin section, the report was hard to configure and it generated
a file with less quality than the old system.

So until we improve this system, we're bringing back the old investment
CSV exporter.

This commit reverts most of commit 9d1ca3bf.
2019-11-06 00:04:02 +01:00
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
German Galia
9d1ca3bfd4 Report generation. Download csv 2019-06-12 10:17:31 +02:00
Javi Martín
eb7dc3ef2d Extract partial to render budget navigation links 2019-06-06 12:17:52 +02:00
voodoorai2000
d0b8fef6b3 Delete spending proposals 2019-05-31 18:22:59 +02:00
Javi Martín
241ee313f1 Use paths instead of URLs where possible
It simplifies the code and solves any issue we might have configuring
the host in the test environment.
2019-05-28 16:38:45 +02:00
Javi Martín
6ad3bc063c Move budget stats translations to stats files
We were using custom translations, but now this code is going to be
included in the main CONSUL repository.
2019-05-21 13:50:17 +02:00
voodoorai2000
abb6eb18b0 Order headings by name and group
Note that we are relying on the existing `sort_by_name`[1] method in the `Budget::Heading` class.

This method sorts by DESC group name first and then ASC heading name.

[1] https://github.com/AyuntamientoMadrid/consul/pull/1875
2019-05-16 22:01:42 +02:00
Bertocq
c5a4a427c4 Add links between Budget stats and results routes 2019-05-16 22:01:42 +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
c87267d34f Use double quotes in app/views/budgets 2019-03-19 12:16:50 +01:00
Angel Perez
b483ca7f7e Add 'Execution' tab to a finished Budget
This new tab will show all winner investments projects with milestones
2018-11-05 16:33:32 +01:00
decabeza
0bf31bde6c Updates all active to is-active classes 2018-06-06 12:02:13 +02:00
decabeza
4fbc10d85e Fixes budgets ui for all phases 2018-03-14 15:01:56 +01:00
Bertocq
6e843730b0 Replace format_price for Budget#formatted_amount
ApplicationHelper#format_price and Budget#formatted_amount has the same
objective and code, but the Budget#formatted_amount method also uses the
currency of the Budget to correctly give currencies format.

By replacing usage of format_price with formatted_amount we can remove
format_price and have a single location for currency format logic.
2018-03-08 13:26:36 +01:00
decabeza
7a17db01ef adds links with filters on budgets results page 2018-01-22 19:27:54 +01:00
Bertocq
153b46b468 Create description_for_phase helper method at Budget, to make it easier to get non-active-phase description 2018-01-16 12:18:13 +01:00
decabeza
7becda96ed fixes heading inside ul html issue 2017-08-09 18:33:09 +02:00
Bertocq
705ef19f6d Improvements on budget results view & table 2017-07-17 20:19:54 +02:00
rgarcia
a6baaa93ba Adds social meta tags for budget results 2017-07-13 12:28:51 +02:00
Bertocq
11a793d63f Hide incompatible and non-winner investments by default 2017-07-10 19:43:55 +02:00
Bertocq
49f48ddf4b Highlight current heading on results list 2017-07-10 17:48:04 +02:00
Bertocq
2fba9de33b Don't display incompatible investment's table if empty 2017-07-10 17:12:28 +02:00
Bertocq
10c299d19f Add to public Budget Results page winners, discarded and incompatible listing 2017-07-04 01:34:25 +02:00
decabeza
3bcfaeb61a replaces sr-only class to show-for-sr 2017-06-13 17:51:57 +02:00
decabeza
b42533062e Improves styles and i18n for budget results 2017-05-19 17:32:10 +02:00
rgarcia
ed5a1cecbb adds budget results 2017-05-19 14:04:46 +02:00