Commit Graph

797 Commits

Author SHA1 Message Date
María Checa
cd1a0548ba Add map_location#json_data method 2018-03-27 15:17:31 +02:00
Raimond Garcia
c1d7378c92 Merge pull request #2504 from consul/budget_group_name_edit
Allow Budget Group names to be edited
2018-03-22 22:12:04 +01:00
Alberto García
eba4a3c6cb Merge pull request #2528 from consul/budgets-message
Heading link on budgets message
2018-03-09 13:25:39 +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
d70c46e578 Extract BudgetHeadingsHelper#heading_link & use it
Why:

The logic to construct the link to a heading (if it exists) is in three
different places, this is a clear candidate for a helper method.

How:

Just checking at the helper method if `assigned_heading` and `budget`
has values and composing the link if so.
2018-03-08 11:50:23 +01:00
Bertocq
b72e43168b Use user locale instead of default locale to format currencies 2018-03-08 10:20:05 +01:00
Raúl Fuentes
6d8d44a5e3 Added interface and methods for edit the name of a Budget::Group if the budget is still inthe drafting phase 2018-03-02 09:16:57 +01:00
Bertocq
dbe723079e Disable guide page when Budget is not accepting
Why:

When there is not Budget accepting (Investment creation) the guide page
doesn't have much sense as it will give the user an option that can't be
used (creating an Investment).

How:

Using `Budget.current&.accepting?` conditional at GuidesHelper to link
to new proposal link instead of guide page, and adding an scenario to
guides feature spec for it.
2018-02-26 10:01:30 +01:00
Bertocq
38f7a222f5 Add error message for invalid Newsletter user segment
Instead of the name of the User Segment we'll display an error message
2018-02-21 11:46:30 +01:00
Bertocq
4becd0eb35 Change Newsletter's segment_recipient to string
Why:

Newsletter attribute `segment_recipient` is an integer to be used as
enum. There's no advantage to store a number instead of an string if the
ammount of elements in the table is not going to be huge, or we can take
advantage of using an enum.

Also maintaining both Newsletters enum paired with UserSegments::SEGMENTS
would be a maintenance burden.

How:

* Migration to change segment_recipient column from integer to string
* Removing enumeration from Newsletter model class
* Using UserSegments::SEGMENTS instead of Newsletter.segment_recipients
or integer values
2018-02-21 11:46:11 +01:00
Bertocq
3f91e920f6 Enable rubocop Performance/RedundantMatch cop & fix issues
Some cop offenses have been stashed into rubocop_todo.yml for now
2018-02-10 21:26:02 +01:00
Bertocq
2341a2f70b Add by_budget scope to Investment and use it 2018-02-10 16:36:14 +01:00
Bertocq
bd10285431 Fix line length at budget investments helper 2018-02-10 16:30:07 +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
Bertocq
ea089c1b87 Add missing legislation proposal commentable path 2018-02-03 23:54:22 +01:00
Angel Perez
1f50e284a9 'Current applied filters' message handles multiple filters in use 2018-01-31 07:21:51 -04:00
Raimond Garcia
b5cb5e2563 Merge pull request #2387 from wairbut-m2c/show_only_current_budget_tags_in_admin_budget
Show only current budget tags in admin budget
2018-01-29 20:14:10 +01:00
Vicente Mendoza
ff5112f96b Changed the budgets helper so just search for the current budget 2018-01-26 11:30:02 +01:00
Angel Perez
e04dc5b8f2 Add sorting options for Admin::BudgetInvestments (#2336) 2018-01-25 08:18:04 -04:00
Vicente Mendoza
410caced3e test added for changes at documentable's view 2018-01-24 12:48:06 +01:00
Raúl Fuentes
82b750de68 moved duplicated code to helper 2018-01-23 15:42:01 +01:00
rgarcia
d3d05f9cee Add guide to create a proposal or investment
During a Participatory Budget, some users are getting confused and
creating a proposal instead of a budget investment. This intermediate
page should help them create investments

Adding a feature flag just in case other forks don’t need this feature
and setting seeds and dev_seeds for appropriate initial setup
2018-01-18 21:09:21 +01:00
Bertocq
06a1785445 Prevent empty html to be safe rendered to html with links 2018-01-18 17:55:21 +01:00
Bertocq
986ee9c87d Correctly render budget description with html & links 2018-01-18 16:18:27 +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
Vicente Mendoza
c673ca2319 fix tests 2018-01-17 18:36:45 +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
d44db9cec4 Merge branch 'master' into feature/budget_phases 2018-01-16 17:47:47 +01:00
Bertocq
66691b644a Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS 2018-01-16 12:18:13 +01:00
decabeza
97bf00817c fixes js class name 2018-01-15 21:21:44 +01:00
decabeza
39b55e11df changes text and makes bigger link to delete a marker on a map 2018-01-15 21:21:24 +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
María Checa
c9dbf3a90e Removed RelatedContent from flags helper 2017-12-19 21:24:39 +01:00
María Checa
4cbdede41d Adapted flags helper to related content 2017-12-18 18:22:01 +01:00
Alberto García
45de7efd7a Merge pull request #1904 from consul/community-design
Community design
2017-12-14 14:44:03 +01:00
Bertocq
831ca1dd67 Redirect anonymous user to sign in on create topic link 2017-12-14 13:50:42 +01:00
Alberto García
19925de06b Merge pull request #2170 from consul/design
Design improvements
2017-12-14 11:31:31 +01:00
Bertocq
8c9585480b Remove no longer needed topics helper module file 2017-12-13 14:40:38 +01:00
decabeza
377a1d9f01 improves following view and updates specs 2017-12-07 16:31:05 +01:00
decabeza
d273ba2ba5 improves following page, shows public interest only in this view 2017-12-07 13:40:12 +01:00
Raimond Garcia
22a8157165 Merge branch 'master' into aperez-email-specs-for-commentables 2017-12-07 13:05:25 +01:00
decabeza
81392ae8f2 Merge branch 'master' into community-design 2017-11-21 20:52:05 +01:00
Bertocq
b2c03192bb Fix kaminari path url helper function 2017-11-19 13:33:49 +01:00
Bertocq
f4af87f8a1 Add kaminari url path helper function 2017-11-18 10:44:30 +01:00