Commit Graph

15 Commits

Author SHA1 Message Date
iagirre
0d9da5398b Fix banners in user pages
Banners were not been shown in certain pages; now
they are.

Spec to check if the banner is been shown correctly
added. Before it was in admins specs, now it has it's
own spec out of admins folder.
2018-07-12 10:17:25 -04:00
Bertocq
c01c08a3f4 Use current_budget directly instead of instance variable 2018-01-25 00:48:52 +01:00
Bertocq
791f081a91 Rename @budget to @current budget at budget index
Clear instance variable names help understand what's going around when
you're deep 2 or 3 partials. In this case @budget is only used to carry
around the current_budget so @current_budget is more descriptive.

Using `current_budget` directly around would be an alternative, but
maybe not as maintainable in case we want to change which budget is
being shown (for example the drafting one if you're admin).
2018-01-25 00:48:52 +01:00
Bertocq
e62ca48a94 Show only finished budgets at budget's index
We only need finished budget's at budget's index "Finished budgets"
section. So we add the `finished` scope to @budgets variable, and rename
it so its clear what it contains.

Also avoid showing the "Finished budgets" section if there is none
2018-01-25 00:48:52 +01:00
decabeza
0eaba9fc9e changes order for finished budgets on budgets homepage list 2018-01-22 14:46:54 +01:00
Bertocq
304b3941a7 Move current budget's geolocated investments code to helper function 2018-01-18 01:40:58 +01:00
BertoCQ
92eac29da7 Merge branch 'master' into budget_map 2018-01-18 00:36:43 +01:00
Bertocq
a6b06ca730 Improve Budget's homepage
* Add budget's phases number status
* Add budget's headings and groups list
* Placeholders for future improvements
2018-01-17 19:11:58 +01:00
Vicente Mendoza
d0df965487 fix some issues about test and variables name 2018-01-17 17:10:19 +01:00
Vicente Mendoza
91e10e1897 new map on budget homepage 2018-01-17 13:15:35 +01:00
Bertocq
76e05d58b1 Return 404 status for non-published Budget access
Why:

Non-admin users shouldn't be able to access, or know of the existence
of a non-published Budget.

How:

Raising an ActionController::RoutingError (404 error) to simulate the
same behaviour as accesing a non-existing Budget.

We could have used CanCanCan abilities for this but then an user could
be aware of existing but not published Budgets by trying different urls
2018-01-08 22:59:20 +01:00
rgarcia
c0488c3b3c refactors investment filters 2017-05-06 04:57:06 +02:00
rgarcia
5f7269a070 displays unfeasible budgets link from home 2017-01-16 03:09:08 +01:00
Juanjo Bazán
2d56415048 adds feature flag for admin/budgets management 2016-09-07 15:13:39 +02:00
kikito
fa6f34bf5c Adds basic Budget controller / views 2016-05-31 19:26:56 +02:00