Commit Graph

12624 Commits

Author SHA1 Message Date
Alberto
cce852d303 Merge pull request #3337 from consul/generalize-i18n
Generalize i18n texts
2019-03-05 18:58:31 +01:00
decabeza
4a532bf807 Use activerecord translations on admin legislation processes 2019-03-05 17:43:39 +01:00
decabeza
c9d0411d47 Generalize some i18n texts 2019-03-05 17:42:30 +01:00
Julian Nicolas Herrero
c6fead6a72 Merge pull request #3331 from consul/release_0.19
Release 0.19
2019-02-28 14:32:15 +01:00
Julian Herrero
3eac5d25ab Update changelog for release 0.19 2019-02-28 11:07:49 +01:00
Alberto
098f4b6c5f Merge pull request #3328 from consul/admin-settings
Improve Admin settings section
2019-02-27 10:49:54 +01:00
Javier Martín
86a1f5e0ce Merge pull request #3330 from consul/backport-fix_valuation_tags
Fix valuation tags being overwritten
2019-02-26 21:42:58 +01:00
Alberto
6d763df5cb Merge pull request #3329 from consul/admin-ui
[Backport] Improve UX on admin section
2019-02-26 19:13:01 +01:00
Julian Nicolas Herrero
09d4c54c40 Merge pull request #3326 from consul/admin_system_emails
[Backport] Show all system emails in Admin section
2019-02-26 15:18:42 +01:00
Javi Martín
c5c56ad969 Use a virtual attribute to get valuation tags
It was strange to set the valuation tags using `valuation_tag_list=` but
then accessing the valuation tags using `tag_list_on(:valuation)`.
2019-02-26 14:16:10 +01:00
Javi Martín
4980819528 Fix valuation tags being overwritten
When params[:budget_investment][:valuation_tag_list] was not present,
which is the case when updating an investment using the "mark as visible
to valuators" checkbox, we were removing all valuation tags.

Using a virtual attribute to assign the tags only if the parameter is
present simplifies the code in the controller and avoids the issue.
2019-02-26 14:16:10 +01:00
Javier Martín
9fd3c4fb1c Merge pull request #3321 from consul/backport-fix_random_order
Fix random proposals order in the same session
2019-02-26 14:09:24 +01:00
decabeza
abdeafc2dd Fix hound warnings on dev_seeds 2019-02-25 15:34:15 +01:00
decabeza
8066b96fe3 Remove legacy banner images and banner styles settings 2019-02-25 14:59:38 +01:00
decabeza
6fd13c1701 Add missing settings to dev seeds 2019-02-25 14:59:03 +01:00
decabeza
840348a839 Replace legislation processes text to collaborative legislation 2019-02-25 14:22:29 +01:00
decabeza
0b61fd7827 Reorder admin menu links 2019-02-25 14:15:47 +01:00
decabeza
9bad103166 Remove budget name link on admin budgets index 2019-02-25 14:10:28 +01:00
decabeza
51d74ed7ab Replace poll name link in admin polls booth assignments 2019-02-25 14:10:25 +01:00
Julian Herrero
00bd7008bb Show all system emails in Admin section 2019-02-22 16:13:49 +01:00
Julian Herrero
bca283c35d Use double quotes to be consistent with the rest of the file 2019-02-21 15:18:54 +01:00
Julian Herrero
949140bd28 Show button only for emails with the preview option 2019-02-21 15:18:44 +01:00
Julian Herrero
df08e42c3b Use preferred format for array of strings 2019-02-21 15:18:34 +01:00
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