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

Allow admins to edit Budget phases #2353

Merged
merged 6 commits into from
Jan 22, 2018
Merged

Conversation

MariaCheca
Copy link
Contributor

@MariaCheca MariaCheca commented Jan 19, 2018

Where

What

  • Added list of phases in admin budget's edit view.
  • Created edit view for budget phases where admin users can edit dates, summary text, description text, and if the phase is enabled or disabled.

Screenshots

localhost_3000_admin_budgets_10_edit laptop with hidpi screen 2

localhost_3000_admin_budgets_10_budget_phases_83_edit laptop with hidpi screen

Test

As usual.

MariaCheca and others added 3 commits January 20, 2018 14:03
Why:

The Admin Budget form has a submit button for saving the record, adding
another submit input to destroy the record actually adds to the html:
`<input type="hidden" name="_method" value="delete">` and it collides
with the save button, forcing it to perform a destroy instead of save.

Previously the destroy button was not in the same div as the save button

How:
Just changing the Destroy from a button_to to a link_to.
Copy link
Collaborator

@bertocq bertocq left a comment

Choose a reason for hiding this comment

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

Nice one! 👏

@@ -3,6 +3,7 @@ class Phase < ActiveRecord::Base
PHASE_KINDS = %w(drafting accepting reviewing selecting valuating publishing_prices balloting
reviewing_ballots finished).freeze
PUBLISHED_PRICES_PHASES = %w(publishing_prices balloting reviewing_ballots finished).freeze
SUMMARY_MAX_LENGTH = 1000
Copy link
Collaborator

Choose a reason for hiding this comment

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

❤️

voodoorai2000 added a commit to AyuntamientoMadrid/consul that referenced this pull request Jan 22, 2018
The budget phase dates are incorrect, changing them from the console is
a little cumbersome. We have a PR ready to merge which should make
things easier consuldemocracy#2353
decabeza pushed a commit to AyuntamientoMadrid/consul that referenced this pull request Jan 22, 2018
The budget phase dates are incorrect, changing them from the console is
a little cumbersome. We have a PR ready to merge which should make
things easier consuldemocracy#2353
@MariaCheca MariaCheca merged commit 1f461b0 into master Jan 22, 2018
@MariaCheca MariaCheca deleted the 2339-admin_budgets_phases branch January 22, 2018 17:07
clairezed pushed a commit to CDJ11/CDJ that referenced this pull request Jun 26, 2018
…s_phases

Allow admins to edit Budget phases
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