Commit Graph

5383 Commits

Author SHA1 Message Date
Bertocq
34b2a27357 Cleanup indentation and line lenght aat order select partial 2018-01-25 18:06:36 +01:00
Bertocq
9b2aebc8c2 Remove closing </li>'s without opening <li> 2018-01-25 17:54:15 +01:00
iagirre
f2927c8eb2 Add alert to the delete button of 'My activity' section so that users don't delete their investmentes accidentally 2018-01-25 16:54:26 +01:00
decabeza
1d7352d21c fixes textarea and label order on admin budgets phases form 2018-01-25 14:40:04 +01:00
decabeza
f607075c4a replaces hardcoded text to votes_for_proposal_success setting 2018-01-25 14:39:13 +01:00
Angel Perez
716fd6a46e Persist sorting when filtering/selecting investments 2018-01-25 08:18:04 -04:00
Angel Perez
e04dc5b8f2 Add sorting options for Admin::BudgetInvestments (#2336) 2018-01-25 08:18:04 -04:00
Angel Perez
d30d2b0dd8 Arrange Admin::BudgetInvestments I18n for buttons under same namespace 2018-01-25 08:18:04 -04:00
Angel Perez
680ca46ef1 Add search form for Admin::BudgetInvestments (#2336) 2018-01-25 08:16:32 -04:00
decabeza
acfd49e5bd improves styles for budget investments advanced filters 2018-01-25 11:14:06 +01:00
Bertocq
c01c08a3f4 Use current_budget directly instead of instance variable 2018-01-25 00:48:52 +01:00
Bertocq
8749b46ec4 Remove budget_published? usage on budget index, drafting budgets no longer listed 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
Bertocq
97ec551178 Correctly check if user can destroy a document 2018-01-24 17:07:05 +01:00
Vicente Mendoza
410caced3e test added for changes at documentable's view 2018-01-24 12:48:06 +01:00
Bertocq
31956312bf Make use of new single_heading_group? on existing similar logic 2018-01-24 12:17:46 +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
María Checa
1c2949b60d Merge pull request #2344 from wairbut-m2c/aperez-investments-filters
Improvements for Admin::Budget::Investment filters
2018-01-23 20:09:54 +01:00
María Checa
0dd71e6bea Merge pull request #2349 from wairbut-m2c/iagirre-budgets-new-information-phase
Budget new "Information" phase
2018-01-23 19:46:49 +01:00
rgarcia
eee19ad690 Use scope to order headings by name 2018-01-23 19:35:42 +01:00
Raúl Fuentes
82b750de68 moved duplicated code to helper 2018-01-23 15:42:01 +01:00
iagirre
846898f3ec New phase "Information" added and UI modified to not show the links.
Specs to test the functionality added.
2018-01-23 15:42:01 +01:00
decabeza
cb170766b4 orders budgets groups headings by name 2018-01-23 13:55:42 +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
217f62116e Correctly scape budget phase summary on phases list 2018-01-22 23:29:48 +01:00
decabeza
7a17db01ef adds links with filters on budgets results page 2018-01-22 19:27:54 +01:00
Angel Perez
3f6a9187ec Add 'current applied filters' message to investments partial 2018-01-22 14:04:57 -04:00
Angel Perez
3826f040c2 Add missing 'tbody' HTML tag to investments partial 2018-01-22 14:02:29 -04:00
Angel Perez
e5c73d8f02 Add advanced filters for Admin::Budget::Investment 2018-01-22 14:02:29 -04:00
María Checa
1f461b09f0 Merge pull request #2353 from consul/2339-admin_budgets_phases
Allow admins to edit Budget phases
2018-01-22 18:07:34 +01:00
María Checa
b706f0c8bb Merge pull request #2142 from wairbut-m2c/rfuentes-add-advanced-menu-to-order-proposals
Add advanced search menu to investments list
2018-01-22 17:46:19 +01:00
Bertocq
155840a130 Sanitize & truncate text for socialmedia metatags
Why:

The html tags weren't removed from the text that was rendered at the
social metatags (twitter & facebook), neither scaped so adding a quoted
text would endup breaking the metatag content and writting in plain
sight the description at the browser view.

How:

Saniziting the text and truncating it afterwards since we don't need to
send more than 140 chars for twitter/facebook social cards.
2018-01-22 11:52:35 +01:00
Raúl Fuentes
93268fc5d6 changed advanced filter from budgets to budgets/investments 2018-01-22 09:59:09 +01:00
Raúl Fuentes
a56be4bc5f added I18n to phase select 2018-01-22 09:59:09 +01:00
Raúl Fuentes
bb39f8af0a issue #1436, mirrored behavior from proposals 2018-01-22 09:59:09 +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
Angel Perez
10fac6d2d1 Admins can delete an answer's associated images (#1999) 2018-01-19 15:29:18 -04:00
María Checa
a97c007150 Added admin budget phases views 2018-01-19 18:19:46 +01:00
decabeza
32c442ec66 removes description on finished participatory budgets 2018-01-19 14:35:05 +01:00
decabeza
f1ce68a445 changes back link on header to budgets_path 2018-01-19 14:35:05 +01:00
decabeza
27111b95c3 makes sure description has white color 2018-01-19 14:35:05 +01:00
decabeza
f722caac24 removes budget steps on header 2018-01-19 14:35:05 +01:00
decabeza
88657f43ba add content and styles for guides/new page 2018-01-18 21:09:21 +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
e6e9e2db05 Render budget description html with links on budget index 2018-01-18 17:40:37 +01:00
Bertocq
95a7942372 Some css class improvements at budget list on /budget 2018-01-18 17:37:08 +01:00