Commit Graph

41 Commits

Author SHA1 Message Date
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
74083df10f Add historic fields to participatory budget 2019-06-12 18:03:53 +02:00
Javi Martín
da59315530 Don't show links to budget results if disabled 2019-06-06 12:18:05 +02:00
Javi Martín
eb7dc3ef2d Extract partial to render budget navigation links 2019-06-06 12:17:52 +02:00
Alberto Garcia Cabeza
135984d535 removes budget countdown 2019-05-16 13:37:47 +02:00
rgarcia
b62eff841c Fix symbolize_keys deprectation warning
DEPRECATION WARNING: Method symbolize_keys is deprecated and will be
removed in Rails 5.1, as `ActionController::Parameters` no longer
inherits from hash. Using this deprecated behavior exposes potential
security problems. If you continue to use this method you may be
creating a security vulnerability in your app that can be exploited.
Instead, consider using one of these documented methods which are not
deprecated:
http://api.rubyonrails.org/v5.0.4/classes/ActionController/Parameters.ht
ml (called from csv_params at
/home/travis/build/consul/consul/app/helpers/budgets_helper.rb:15)
2019-04-17 17:40:55 +02:00
rgarcia
6fa7562181 Automatically create a budget poll if it does not exist 2019-04-03 22:23:22 +02:00
Julian Herrero
b460c024f3 Use double quotes in app/helpers 2019-03-15 09:26:49 +01:00
rgarcia
55fb14ac14 do not display alert when supporting for whole city 2019-02-07 16:55:24 +01:00
decabeza
a2161f3ace Hide voted group css class if current filter is unfeasible 2019-02-05 17:16:04 +01:00
decabeza
5409db6c55 Show only selected investments on map from publishing prices phase
If there are no selected investements show all investments on map.
2019-02-05 14:01:27 +01:00
decabeza
773302f0d7 Show only random order for unfeasible and unselected investments 2019-01-30 14:16:25 +01:00
decabeza
13b3d9cebc Fixes admin menu link when create a new widget 2018-11-12 17:11:17 +01:00
Alberto
f345786cc0 Merge pull request #2622 from consul/selected-investments-map
Adds message to selected budget investments
2018-06-06 19:21:24 +02:00
decabeza
0bf31bde6c Updates all active to is-active classes 2018-06-06 12:02:13 +02:00
iagirre
2821985552 Change 'Calculate Winners button' to budget_investments index.
Move the button so that it appears in the Winners tab of the
budget_investments index.

When the budget is in "Balloting projects", "Reviewing Ballots"
or "Finished budget" phases, the button will appear as a button
(clickable). If there are no winners calculated yet, the text
will be "Calculate winner investments"; if there are, the text
will be "Recalculate winner investments".

If the budget is in another phase, the button will be
disabled and a message will appear: 'The budget has to stay on
phase "Balloting projects", "Reviewing Ballots" or
"Finished budget" in order to calculate winners projects'
2018-05-28 15:12:28 +02:00
decabeza
f1e722ac5c Adds message to selected budget investments 2018-05-10 14:54:34 +02:00
rgarcia
39c6ac4a91 Display message in budget's index when there are no budgets
When there are no budgets we were seeing an exception in the budgets’
index

There are two parts to take into account here:
1) Making sure there is a current_budget present, otherwise we display
the “no budgets” message

2) The map helper is called from the controller, so we need to make
sure current_budget is present there too

Note: We could have added a bunch of `try` statements in the budgets’s
index, instead of using a conditional, however there are quite a few
`current_budget` calls so it seems more appropriate to use a conditional
2018-04-05 14:25:32 +02:00
María Checa
cd1a0548ba Add map_location#json_data method 2018-03-27 15:17:31 +02:00
Bertocq
2341a2f70b Add by_budget scope to Investment and use it 2018-02-10 16:36:14 +01:00
Raúl Fuentes
ecdbc4a3f7 added balloting to the list of phases allowed to see all the links 2018-02-10 15:27:40 +01:00
Raúl Fuentes
5b16d395e7 Added logic to not show invetment links is the budget phase isn't reviewing_ballots or finished 2018-02-10 15:27:40 +01:00
Vicente Mendoza
ff5112f96b Changed the budgets helper so just search for the current budget 2018-01-26 11:30:02 +01:00
Raúl Fuentes
82b750de68 moved duplicated code to helper 2018-01-23 15:42:01 +01:00
Bertocq
304b3941a7 Move current budget's geolocated investments code to helper function 2018-01-18 01:40:58 +01:00
Bertocq
66691b644a Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS 2018-01-16 12:18:13 +01:00
María Checa
a06abf7650 Removed unnecessary code 2018-01-10 11:57:23 +01:00
Raúl Fuentes
29018e3062 changes made at the request of voodoorai2000 2018-01-09 13:08:03 +01:00
Raúl Fuentes
95c1aa43e8 added csv download link to budget_investments (issue 1625) 2018-01-09 12:45:30 +01:00
Bertocq
03f4fce2dd Add budget_published? helper method to BudgetHelper
We need to check if the budget is in drafting phase to avoid showing
it to the users, unless the current user is an administrator.
2018-01-08 22:56:47 +01:00
Bertocq
02524b164a Rubocop autocorrections (indentations, revers unless to if, extra spaces) 2017-06-08 12:14:35 +02:00
Alberto
6bbcc71ecb Merge branch 'master' into polls 2017-04-06 14:16:49 +02:00
rgarcia
712d5f2d9a displays only valuation tags for filtering 2017-03-07 18:19:53 +01:00
Juanjo Bazán
8bd74d2a20 fixes specs
namespace method defined in AdminHelper now returns
X/Y instead of X::Y
2017-01-24 13:07:49 +01:00
Alberto Garcia Cabeza
8722699cd8 fixes typos and spec for budgets investments 2017-01-08 22:17:14 +01:00
kikito
9669767c8a Removes unnecessary helper (all investments have a header now) 2017-01-06 18:47:16 +01:00
kikito
ecb3461a97 Renames Budget::VALID_PHASES to just PHASES 2017-01-01 13:16:22 +01:00
kikito
7f94cc1f3d Removes unneeded parameter from helper call 2016-12-14 13:42:26 +01:00
kikito
b3be1633af Fixes all management bi issues except filtering by geozone 2016-12-07 16:35:27 +01:00
kikito
ad2d35bafa merge budget helpers in a single file 2016-12-06 20:08:37 +01:00
Juanjo Bazán
9014de2693 adds budgets_helper 2016-07-29 13:34:11 +02:00