Commit Graph

13635 Commits

Author SHA1 Message Date
Julian Herrero
980f1052b7 Add quotes and modify title 2019-02-21 15:18:27 +01:00
Javier Martín
a1c5dad4ff Merge pull request #3324 from consul/backport-sorting_icons
Add sorting icons to sortable tables
2019-02-20 17:56:49 +01:00
Alberto
f9476eaa6a Merge pull request #3323 from consul/ui-fixes
[Backport] Fix UI details for a better UX and design
2019-02-20 14:37:46 +01:00
decabeza
26741d9560 Fix hound warnings 2019-02-20 13:56:58 +01:00
Javier Martín
ea0bec3574 Merge pull request #3319 from consul/backport-image_attributes
Reuse image attributes in legislation processes
2019-02-20 13:46:40 +01:00
decabeza
54f39ab80e Refactor feeds layout to align proposals without image
Also remove redundant feature images condition.
2019-02-20 13:32:38 +01:00
decabeza
3ab80b229f Use interpolation instead of concatenation on legislation helper 2019-02-20 13:32:35 +01:00
decabeza
e1bbd0eef0 Add default colours for legislation processes header 2019-02-20 13:32:31 +01:00
decabeza
32d4495a88 Replace created at date to start and end date on admin legislation processes 2019-02-20 13:32:22 +01:00
decabeza
0d834744fd Replace open to active filter on admin legislation processes index
Now active filter show open processes and the next ones, processes with a start date greather than current date.
2019-02-20 13:32:09 +01:00
decabeza
a9d96f7e23 Show card label only if it is present on welcome page 2019-02-20 13:30:49 +01:00
decabeza
b6efc2699f Align proposal feed description without image on welcom page 2019-02-20 13:30:45 +01:00
decabeza
6dd06b0710 Improve help text for legislation processes proposals categories 2019-02-20 13:30:41 +01:00
decabeza
9e9eb1359b Add icon to sortable table 2019-02-20 13:07:08 +01:00
Javi Martín
6682121069 Reuse code to set and order by a random seed 2019-02-20 12:10:12 +01:00
Javi Martín
e3ca700e17 Add concerns to set and order by a random seed 2019-02-20 11:51:32 +01:00
Javi Martín
660c59016b Fix random proposals order in the same session
Using `setseed` and ordering by `RAND()` doesn't always return the same
results because, although the generated random numbers will always be
the same, PostgreSQL doesn't guarantee the order of the rows it will
apply those random numbers to, similar to the way it doesn't guarantee
an order when the `ORDER BY` clause isn't specified.

Using something like `reorder("legislation_proposals.id % #{seed}")`,
like we do in budget investments, is certainly more elegant but it makes
the test checking two users get different results fail sometimes, so
that approach might need some adjustments in order to make the results
more random.
2019-02-20 11:51:32 +01:00
Javier Martín
70a1b7d1ff Merge pull request #3318 from consul/backport-refactor_investments_index
Show all investments in the map
2019-02-20 11:49:06 +01:00
Raimond Garcia
739b88c051 Merge pull request #3309 from consul/available_locales
Add locales for Indonesian, Russian, Slovak and Somali
2019-02-19 21:54:18 +01:00
Raimond Garcia
22f60ebaf0 Merge pull request #3310 from consul/untranslated_locales
Remove untranslated locales
2019-02-19 21:53:59 +01:00
Javi Martín
af9a2179eb Reuse image attributes in legislation processes
It wasn't originally added because at the time legislation processes
didn't have images.
2019-02-19 19:57:27 +01:00
Javier Martín
7c61f621e2 Merge pull request #3314 from consul/backport-without_valuator
Consider having valuator group as having valuator
2019-02-19 18:59:15 +01:00
decabeza
b68e8bf5d2 Improve i18n for admin settings 2019-02-19 15:43:48 +01:00
decabeza
2e135ca3f1 Remove unused place name setting 2019-02-19 14:08:44 +01:00
Javi Martín
facfb807e1 Show all investments in the map
We were showing only the ones being shown in the current page because
we were modifying `@investments` using a method which used
`@investments`, and we were calling that method twice.

There are many possible solutions: using a local variable to store the
result of the `investments` method, modifying `@investments` after
modifying `@investments_map_coordinates`, ... I've used the one which in
my humble opinion is a bit less fragile: not using `@investments` inside
the `investments` method. That way, the `investments` method will always
return the same result.

Note `stub_const("Budgets::InvestmentsController::PER_PAGE", 2)`
wouldn't work because `Budgets::InvestmentsController` isn't loaded when
that line is executed. So we need to load it. Instead of requiring the
file, using `#{Budgets::InvestmentsController}` seems to be an easier
solution.
2019-02-19 13:22:49 +01:00
Javi Martín
8ecf7f4505 Extract constant to define investments per page
That way it's easier to stub in tests. It makes it easier to customize
CONSUL to show a different number of investments per page as well.
2019-02-19 13:21:37 +01:00
decabeza
25c8212e80 Remove proposal improvement path setting 2019-02-19 11:07:58 +01:00
Javier Martín
44483c2c32 Merge pull request #3313 from consul/backport-fix_literal_as_condition
Fix literal as condition
2019-02-18 18:58:47 +01:00
Julian Nicolas Herrero
8156152e0f Merge pull request #3303 from consul/description_for_open_polls
[Backport] Add a description for open polls
2019-02-18 16:51:21 +01:00
decabeza
ccee843da7 Remove unused settings
These settings are customised for Madrid's fork. On CONSUL any user can include new links using site customisation content blocks from admin panel.
2019-02-18 15:40:11 +01:00
Julian Nicolas Herrero
d821848add Merge pull request #3307 from consul/return_string_in_method_pluralize
[Backport] Return a String in I18n method 'pluralize'
2019-02-18 15:25:40 +01:00
Julian Herrero
884274c4ad Add a description for open polls 2019-02-18 13:34:07 +01:00
Julian Nicolas Herrero
53530ba99b Merge pull request #3287 from consul/use_double_quotes_in_specs
Change single quotes to double quotes in folder /spec
2019-02-18 13:26:49 +01:00
Javi Martín
bd67fcb9cf Consider having valuator group as having valuator
So under the tab "without valuator" we don't show investments assigned
to a valuator group, just as expected by administrators.

There was a conflict while applying this commit to the CONSUL repo. I've
decided to re-introduce the test which was deleted in commit dddf026a,
which hadn't been deleted in AyuntamientoMadrid@192f1182.
2019-02-15 21:11:24 +01:00
Javi Martín
e11b9ddccd Enable literal as condition rule in rubocop
This way deverlopers who don't run the ruby syntax check locally with
warnings enabled will be informed by HoundCI.
2019-02-15 20:21:35 +01:00
Javi Martín
250b19b0d3 Remove literal used in condition
The right syntax would have been:

`after_save :recalculate_heading_winners, if: :incompatible_changed?`

However, since the method `recalculate_heading_winners` already executes
the `if incompatible_changed?` condition, removing it keeps the intended
behaviour.
2019-02-15 20:21:35 +01:00
Javier Martín
b330de01f6 Merge pull request #3148 from matisnape/budget_investments_sorting_columns
Add sort links to admin tables
2019-02-15 19:19:11 +01:00
Javier Martín
b48a425aa9 Merge pull request #3120 from consul/backport-enable_useless_assignment_rule
Enable useless assignment rubocop rule
2019-02-15 17:31:32 +01:00
Javier Martín
264dcbe2b3 Merge pull request #3170 from rogelio-o/feature/3153
Refactor images attributes
2019-02-15 17:24:40 +01:00
Javi Martín
a69004ab95 Enable useless assignment rubocop rule
This way deverlopers who don't run the ruby syntax check locally with
warnings enabled will be informed by HoundCI.
2019-02-15 16:31:34 +01:00
Javier Martín
a0fb19f0b4 Merge branch 'master' into feature/3153 2019-02-15 16:25:50 +01:00
voodoorai2000
ad685feb74 Remove untranslated locales
These locales were created in Crowdin and their translations automatically created using the Spanish locale.

Removing until they have differente translations from the Spanish locale.
2019-02-15 15:38:00 +01:00
voodoorai2000
e0c136f916 Update locale name of Italian 2019-02-15 15:26:21 +01:00
voodoorai2000
4db07a3341 Update available locales
Add locales for Indonesian, Russian, Slovak and Somali.
2019-02-15 15:25:40 +01:00
Raimond Garcia
caa4d2ae81 Merge pull request #3305 from consul/i18n_master
New Crowdin translations
2019-02-15 13:21:14 +01:00
decabeza
71ea9c0043 Adds missing spanish translation on admin.yml 2019-02-15 12:21:35 +01:00
Consul Bot
8a78ae0220 New translations management.yml (Spanish) 2019-02-15 12:02:07 +01:00
Consul Bot
61c938c94d New translations kaminari.yml (Spanish) 2019-02-15 12:02:06 +01:00
Consul Bot
608515ac41 New translations activerecord.yml (Spanish) 2019-02-15 12:02:05 +01:00
Consul Bot
0c83de23a7 New translations verification.yml (Spanish) 2019-02-15 12:02:02 +01:00