Commit Graph

117 Commits

Author SHA1 Message Date
decabeza
c049be6dae Improves message when there are no budgets 2018-11-06 18:11:13 +01:00
decabeza
7e828d7e94 Removes unnecessary styles for admin budgets groups 2018-10-18 18:16:11 +02:00
decabeza
a72eb380a2 Unifies styles and views for admin budgets 2018-07-31 12:52:21 +02:00
iagirre
f871868a2b Max headings are updated when editing heading
The max headings label is updated automatically
when updating the heading. It is done via AJAX
and a refresh isn't needed.
2018-07-13 11:46:09 +02:00
Bertocq
1f0ee32998 Add max headings label on Group list 2018-07-13 11:46:09 +02:00
decabeza
954a315d70 Removes investments link on admin budgets heading 2018-06-08 18:37:03 +02:00
decabeza
3b08722e08 Removes duplicated link on admin budgets groups 2018-06-08 18:36:56 +02:00
decabeza
57ff65692f Improves i18n texts 2018-06-08 18:29:47 +02:00
Alberto
f9940980b0 Merge pull request #2645 from wairbut-m2c/admin-form-improvements-backport
Admin form improvements
2018-06-07 17:44:38 +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
Angel Perez
9a326d4987 Use 'drafting' as default value when creating a new budget 2018-05-23 07:27:12 -04:00
Antonis Tzorvas
c21d806ecc Refs #2603 Show 'See Results' button in admin panel 2018-05-19 13:38:02 +03:00
Raimond Garcia
4260c05f30 Merge pull request #2537 from consul/budgets-ui
Fixes budgets ui for all phases
2018-03-27 20:21:45 +02:00
rgarcia
730072e91e Add max votable headings to groups 2018-03-22 22:24:58 +01:00
rgarcia
c908e91f00 Order budget headings by id
To maintain order after editing a heading’s name

We should probably add timestamps to `groups` and `headings` and order
by `created_at` instead

Could have done it in a separate PR, but gotta keep moving to other
priority issues. Creating issue for timestamps to do correctly and with
tests 😌
2018-03-22 10:20:07 +01:00
rgarcia
1083213ac7 Order budget groups by id
To maintain order after editing a group’s name

We should probably add timestamps to `groups` and `headings` and order
by `created_at` instead
2018-03-22 10:19:56 +01:00
decabeza
4fbc10d85e Fixes budgets ui for all phases 2018-03-14 15:01:56 +01:00
Bertocq
d9a8474793 Refactor Group partial to be easier to read 2018-03-02 09:17:26 +01:00
Bertocq
7c02f9c82e Fix missing I18n.t usage 2018-03-02 09:17:21 +01:00
Raúl Fuentes
78fc4010d0 fixed the style 2018-03-02 09:17:08 +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
d75fd59684 Align right heading amount & population at admin table 2018-01-24 01:12:38 +01:00
Bertocq
43137df4a5 Format heading price at admin table 2018-01-24 01:12:17 +01:00
Bertocq
b6cc816d0f Remove the end date adjustment at admin budget phase table 2018-01-23 02:13:11 +01:00
Bertocq
599442440b Correctly format Budget's phases dates 2018-01-23 02:07:49 +01:00
Bertocq
cc69225b7a Assert phases list order in admins budget edit form 2018-01-23 00:15:06 +01:00
Bertocq
8eaf0982b1 Fixed Admin Budget's destroy button to a link
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.
2018-01-20 14:03:14 +01:00
María Checa
a97c007150 Added admin budget phases views 2018-01-19 18:19:46 +01:00
Bertocq
66691b644a Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS 2018-01-16 12:18:13 +01:00
Bertocq
f2228a908b Refactor budget's phase max description lenght from Budget to Phase model 2018-01-16 12:18:13 +01:00
decabeza
ba63a91ce7 removes comments 2018-01-11 17:09:54 +01:00
decabeza
a39f5eb691 adds help text for population field on new heading form 2018-01-11 17:08:39 +01:00
decabeza
40d32f3e16 Merge branch 'master' into budgets-ui 2018-01-11 17:05:28 +01:00
iagirre
0e11e21b2a Merged with master and solved conflicts 2018-01-10 13:23:39 +01:00
iagirre
f0724ce13a Changes suggested in the PR made 2018-01-10 13:13:05 +01:00
decabeza
27c4abf552 improve i18n for budgets notices 2018-01-10 11:37:05 +01:00
decabeza
979d9d071b adds help text for population field on admin budgets groups 2018-01-09 19:29:36 +01:00
decabeza
bba19d1fd5 fixes label name of group on admin budgets groups 2018-01-09 19:29:36 +01:00
Bertocq
dd3a0add2a Add destroy budget button to admin budget edit view 2018-01-08 17:48:46 +01:00
iagirre
bfcbb6c0ad Validation in model and in form added. When users makes the on focus on population field an explanation appears. Some specs added to test the model validations 2017-10-31 13:04:30 +01:00
iagirre
f7e96067b0 Actions for budgets' headings added. Edit headings, delete headings if not budget investments associated and add link in order to see budgets investments filtered by the heading.
Cambios para hacer commit:
	modificado:    app/controllers/admin/budget_headings_controller.rb
	modificado:    app/models/budget/heading.rb
	nuevo archivo: app/views/admin/budget_headings/_errors.html.erb
	nuevo archivo: app/views/admin/budget_headings/edit.js.erb
	nuevo archivo: app/views/admin/budget_headings/update.js.erb
	modificado:    app/views/admin/budgets/_group.html.erb
	nuevo archivo: app/views/admin/budgets/_heading.html.erb
	nuevo archivo: app/views/admin/budgets/_heading_form.html.erb
	modificado:    config/locales/en/activerecord.yml
	modificado:    config/locales/es/activerecord.yml
	modificado:    spec/features/admin/budgets_spec.rb
	modificado:    spec/models/budget/heading_spec.rb
2017-09-25 15:40:17 +02:00
taitus
43c17c3fc7 Add communities and topics 2017-09-05 12:51:08 +02:00
Bertocq
57f476c2fa Merge branch 'master' into feature/add_population_to_budget_heading 2017-06-27 18:43:24 +02:00
Bertocq
d77355de0d Add population field to admin Budget Heading form and headings list table 2017-06-25 15:47:46 +02:00
Bertocq
57ba414a34 Add button on Admin Budget edit form to call calculate winners if budget is reviewing_ballots 2017-06-25 15:47:04 +02:00
Alberto Garcia Cabeza
e7167855c4 improves admin budgets edit page 2017-04-24 13:12:44 +02:00
Alberto Garcia Cabeza
26ce2a1ae2 fixes admin budgets group table 2017-04-24 13:12:33 +02:00
Susana Truebano
e6f6a34054 fix close div and close thead in admin budgets groups edit partial 2017-02-27 13:04:56 +01:00
Juanjo Bazán
bdb55805a1 uses back_link_helper all around 2017-01-11 13:03:12 +01:00
Alberto Garcia Cabeza
8722699cd8 fixes typos and spec for budgets investments 2017-01-08 22:17:14 +01:00