Commit Graph

11202 Commits

Author SHA1 Message Date
Raimond Garcia
281336689c Merge pull request #3002 from consul/dependabot/bundler/uglifier-4.1.19
Bump uglifier from 4.1.3 to 4.1.19
2018-11-06 13:10:11 +01:00
Raimond Garcia
883d5b985f Merge pull request #3003 from consul/dependabot/bundler/rspec-rails-3.8.1
Bump rspec-rails from 3.7.2 to 3.8.1
2018-11-06 13:09:49 +01:00
Consul Bot
3c5642004d New translations admin.yml (Spanish) 2018-11-06 13:09:24 +01:00
Consul Bot
e3a88a7b05 New translations activerecord.yml (Spanish) 2018-11-06 13:09:17 +01:00
Consul Bot
afa26f4df5 New translations rails.yml (Albanian) 2018-11-06 13:06:43 +01:00
Javi Martín
ab870c756a Use Date.current to find published milestones
Using `Date.today` caused some milestones to be published before/after
the date defined by `Rails.application.config.time_zone`.

See also commit AyuntamientoMadird/consul@088c76d for a more detailed
explanation.
2018-11-06 13:02:35 +01:00
María Checa
126941a335 Change headings reorder method 2018-11-06 13:02:35 +01:00
Angel Perez
810bdae37a Move 'budget_execution_no_image' file to app/assets/images/ folder 2018-11-06 13:02:35 +01:00
María Checa
b6fdf732f2 Add total Investments in the execution list 2018-11-06 13:02:35 +01:00
María Checa
d089cc14a5 Add logic to handle budget investments with an execution process 2018-11-06 13:02:35 +01:00
Marko Lovic
406bbb4cdb Avoid unnecessary navigation for faster specs 2018-11-06 13:02:35 +01:00
Marko Lovic
997db67104 Refactor how headings are ordered 2018-11-06 13:02:35 +01:00
Marko Lovic
375fbf775f Order non-city headings by alphabetical order 2018-11-06 13:02:35 +01:00
Marko Lovic
4758c1b91a Show city heading in first position on executions list 2018-11-06 13:02:35 +01:00
rgarcia
685927116c Query for all investments, not only winner investment
Spending proposals did not have a winner attribute, instead winners
where calculated dynamically looking at votes

Removing this condition, so that we can see investment for the 2016
participatory budget which used spending proposals
2018-11-06 13:02:35 +01:00
Marko Lovic
8376efce3f Hide headings with no investments
The page should not show any headings which don't have any
winning investments. The "no content" message should only be
shown when there are no headings with investments to avoid an
otherwise blank page.

__Note:__ in the main @headings query, _both_ #includes and #joins
are needed to:
 1. eager load all necessary data (#includes)
and
 2. to perform an INNER JOIN on milestones to filter out investments
with no milestones (#joins).
2018-11-06 13:02:35 +01:00
Angel Perez
a3ef662509 Filtering investments are based on the latest milestone status 2018-11-06 13:02:35 +01:00
Angel Perez
749954267d Use Budget::Investment#winners scope to fetch only winner investments 2018-11-06 13:02:34 +01:00
Angel Perez
62b99f01bc Show message for headings without winner investments 2018-11-06 13:02:34 +01:00
Angel Perez
5114792941 Add specs for budgets/executions feature 2018-11-06 13:02:34 +01:00
Angel Perez
99e4e7ef8a Limit milestones to 1 per investment and sort them by publication date 2018-11-06 13:02:34 +01:00
Angel Perez
448ac7a158 Restore filtering investments by milestone status query
This commit makes 3 changes:

1. Extracts a query into a helper for clarity and DRYness

2. Adds a `.where` clause to filter investments based on their
(current) milestone status

3. Fixes a bug where investments would be rendered as many times as
milestones associated to an investment
2018-11-06 13:02:34 +01:00
decabeza
a07a100828 Fixes image sizes 2018-11-06 13:02:34 +01:00
decabeza
689b25c977 Adds tab-milestones anchor to link and milestone image 2018-11-06 13:02:34 +01:00
decabeza
a03c13aa22 Updates executions texts 2018-11-06 13:02:34 +01:00
decabeza
eb76f644b7 Adds link to heading name on sidebar 2018-11-06 13:02:34 +01:00
decabeza
c7936bacae Adds styles to budgets execution 2018-11-06 13:02:34 +01:00
Angel Perez
2a3ce0b182 Render winner investments under 'Executions' tab 2018-11-06 13:02:34 +01:00
Angel Perez
5de74ea6f1 Load budget headings on budgets/executions#show action 2018-11-06 13:02:34 +01:00
Angel Perez
0a95abc30d Replace budget execution heading route with anchor link 2018-11-06 13:02:34 +01:00
Angel Perez
6559c7212b Add prompt & label for milestones filters under budgets/executions#show 2018-11-06 13:02:34 +01:00
Javi Martín
4f878180e5 Move creation of milestone statuses seeds
So it's in the same lines as in Madrid's repository.
2018-11-06 13:02:30 +01:00
Raimond Garcia
e6f8814c28 Merge pull request #2998 from consul/i18n-uptade-crowdin
Update i18n from Crowdin
2018-11-06 12:54:46 +01:00
voodoorai2000
f79f219f2c Fix date translations 2018-11-06 11:42:51 +01:00
dependabot[bot]
6a30c01c1d Bump rspec-rails from 3.7.2 to 3.8.1
Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 3.7.2 to 3.8.1.
- [Release notes](https://github.com/rspec/rspec-rails/releases)
- [Changelog](https://github.com/rspec/rspec-rails/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v3.7.2...v3.8.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 06:27:46 +00:00
dependabot[bot]
75a7ab6a85 Bump uglifier from 4.1.3 to 4.1.19
Bumps [uglifier](https://github.com/lautis/uglifier) from 4.1.3 to 4.1.19.
- [Release notes](https://github.com/lautis/uglifier/releases)
- [Changelog](https://github.com/lautis/uglifier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/lautis/uglifier/compare/v4.1.3...v4.1.19)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 06:27:21 +00:00
dependabot[bot]
b6f7cd7193 [Security] Bump rack from 1.6.10 to 1.6.11
Bumps [rack](https://github.com/rack/rack) from 1.6.10 to 1.6.11. **This update includes security fixes.**
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/1.6.10...1.6.11)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-06 06:26:22 +00:00
decabeza
cb2b2ac965 Merge branch 'master' into i18n-uptade-crowdin 2018-11-05 19:07:37 +01:00
voodoorai2000
f4c35eb948 Add one more PR to Changelog 2018-11-05 18:20:51 +01:00
voodoorai2000
160ca317c5 Update version number for consul.json 2018-11-05 18:20:51 +01:00
decabeza
79e1ec444c Fixes houndci-bot warnings 2018-11-05 18:20:51 +01:00
decabeza
a218f8cced Improves some code format details 2018-11-05 18:20:51 +01:00
voodoorai2000
54950d14c9 Add Changelog for release 0.17 2018-11-05 18:20:51 +01:00
Javi Martín
745c9cd72b Don't check already present page content
The content 'An example legislation process' is already present before
we click the "All" link.

Not checking the page content properly sometimes resulted in the second
click being executed before the first request had been completed, making
the spec fail.

By checking the "All" link isn't present anymore, we guarantee the
request has been completed before trying to click the 'An example
legislation process' link.
2018-11-05 18:20:51 +01:00
decabeza
1a15cb6a42 Refactors social meta tags spec 2018-11-05 18:20:51 +01:00
decabeza
816f0c55c0 Adds new social share partial for proposals 2018-11-05 18:20:51 +01:00
voodoorai2000
ac7d1ebf27 Increase delayed jobs max run time 2018-11-05 18:20:50 +01:00
voodoorai2000
bfe9ae6ab0 Add counter of emails sent to newsletter preview 2018-11-05 18:20:50 +01:00
Javi Martín
a8d2fbab57 Remove described class cop
We've agreed `User.new` is easier to read than `described_class.new` and
since we are ignoring Hound's comments regarding this topic, we might as
well remove it.
2018-11-05 18:20:50 +01:00
Javi Martín
dc13533371 Make Capybara check the page between comment votes
As pointed out in PR consul#2734:

"After clicking the first link, there's an AJAX request which replaces
the existing `.in-favor a` and `.against a` links with new elements. So
if Capybara tries to click the existing `.against a` link at the same
moment it's being replaced, clicking the link won't generate a new
request".

Making Capybara check the page for new content before clicking the
second link solves the problem.

This commit solves issues afecting both Madrid's fork and the original
CONSUL repo.
2018-11-05 18:20:50 +01:00