Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show investment links only on phase balloting or later #2386

Conversation

raul-fuentes
Copy link
Contributor

Where

What

  • Restricted links to budget_investments_path(@budget.id) and budget_investments_path(budget_id: @budget.id, filter: 'unselected') only for balloting or later phases on budgets#index

How

  • Adding a method to budget_helper checking current_buget phase and using the result as condition to draw the links

Screenshots

screenshot from 2018-01-26 09 39 34

screenshot from 2018-01-26 09 42 01

Test

  • Increased index budget spec checking the links phase by phase except the first two in which it does not apply

Deployment

  • Not needed

Warnings

  • None

@@ -1,5 +1,9 @@
module BudgetsHelper

def show_links_to_budget_investments(budget)
['reviewing_ballots', 'finished'].include? budget.phase
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I wasn't explicity enough, but with current budget is on Balloting phase or later (reviewing_ballots or finished) I actually meant balloting phase plus those two next phases as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix the misunderstanding in a moment.

@bertocq bertocq force-pushed the 2377_show_investment_links_only_on_balloting_or_later branch from f6b77a8 to ecdbc4a Compare February 10, 2018 14:27
@bertocq bertocq changed the title 2377 show investment links only on balloting or later Show investment links only on phase balloting or later Feb 10, 2018
@bertocq bertocq merged commit a4e6c4e into consuldemocracy:master Feb 10, 2018
@aitbw aitbw deleted the 2377_show_investment_links_only_on_balloting_or_later branch February 11, 2018 17:05
clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
…vestment_links_only_on_balloting_or_later

Show investment links only on phase balloting or later
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants