Commit Graph

9098 Commits

Author SHA1 Message Date
Raimond Garcia
4c59c0ec0e Merge pull request #2648 from consul/readme
Update README with production configuration
2018-05-23 22:43:45 +02:00
rgarcia
a466e6695a Update README 2018-05-23 19:19:25 +02:00
Raimond Garcia
63213a0e4d Merge pull request #2632 from atzorvas/feature/2603-review_ballots_see_results
Show 'See Results' button in budget admin panel
2018-05-22 12:06:19 +02:00
Antonis Tzorvas
c21d806ecc Refs #2603 Show 'See Results' button in admin panel 2018-05-19 13:38:02 +03:00
Bertocq
7a84d3867a Remove gemnasium references, service just shut down
Gemnasium has closed, service stopped.
2018-05-15 14:52:52 +02:00
Raimond Garcia
f18f575def Merge pull request #2619 from wairbut-m2c/globalize
Allow admin generated content to be translatable
2018-05-10 12:04:27 +02:00
decabeza
5bcec351ef Improves admin content translatable ui 2018-05-10 09:01:12 +02:00
iagirre
471c9730cc Refactorings
- Cleanup Translatable module (`translation_params` method too large)
- Move globalize_helpers partial to admin folder
- Use any class for method translation_params
- Helpers in `GlobalizeHelpers` make sure all are in use and see if they can be more legible
- Review js name clases and methods see if they can be more legible
- Refactor milestone views into partials with nice spacing between attributes
2018-05-09 16:58:47 +02:00
iagirre
747db0ea35 Add dev_seeds for milestones with translations
Add one milestone to each investment with translations
for each locale defined in the app.
2018-05-09 16:12:52 +02:00
iagirre
4e5c9e2166 Modify specs to work with new features
Add specs to check that the translations
are being deleted correctly and the
current locale tab is highlighted when the
admin visits the edit milestone page.
2018-05-09 16:12:47 +02:00
iagirre
951d1c1695 Use a helper with yield Globalize.with_locale
A helper has been created to encapsule the logic
of Globalize.with_locale. Now, to call that function,
globalize(locale) do is called.
2018-05-09 16:07:21 +02:00
iagirre
8b9d1ebd33 Make portuguese locale work
There was a problem with the portuguese locale.
The locale was pt-BR, but `globalize_accessors` gem
doesn't allow the creation of methods using locales
with that format.

To avoid transforming pt-BR to pt and lose the distinction
of the different variations of the language, a function has
been added to transform pt-BR into pt_br (without changing
the locale itself). That way, when globalize uses the locales,
all of them will have a valid format (downcased and underscored)
AND they will be always the same (comparing pt-BR with pt_br
doesn't work).
2018-05-09 16:07:21 +02:00
iagirre
285e02ce96 Highlight current locale when changing locale from select
When the locale changes the corresponding tab is
highlighted automatically.
When a language is added to the milestone, the tab
is highlighted automatically.
2018-05-09 16:07:21 +02:00
iagirre
b318c2be46 Add feature to delete a translation
To delete a translation, a link has been added. This
link works for the selected language. It hides all the
things related to a language (the tab and the text_area)
and empties the text area, so that the value is blank
in the param hash. A variable called `delete_translations[]`
is changed.

e.g. If admin wants to remove English language,
delete_translations[:en] will be 1; if not, it will be 0.

When the milestone is updated, there is a before_action
callback that cleans the selected languages for deletion
(looking the delete_translations[] variable).
Because of the deleted translations are blank in param hash,
them won't be saved in DB.
2018-05-09 16:07:12 +02:00
rgarcia
f7486b9238 Add Globalize to Milestones 2018-05-09 16:05:44 +02:00
Alberto
1b52ecc9ec Merge pull request #2614 from microweb10/issue-2604
Fixes Issue #2604
2018-05-09 11:26:16 +02:00
decabeza
f3ef5ae71e Fixes poll questions answer images absolute path spec 2018-05-03 20:12:44 +02:00
Alberto
a709f846be Merge pull request #2046 from wairbut-m2c/aperez-removable-admin-answer-images
Removable answer's associated images
2018-05-03 17:24:48 +02:00
Julian Herrero
353c808dd2 fix dentation 2018-05-01 00:02:43 +07:00
Alberto
1e8f4c7f32 Merge pull request #2342 from wairbut-m2c/iagirre-budgets-column-show-valuators
Budget: add column show to valuators
2018-04-30 17:49:15 +02:00
Julian Herrero
acedb3ee3a add locales (es) for unfeasible and not selected bugets investments 2018-04-30 18:46:49 +07:00
Julian Herrero
ba588543ed add missing dots (.) to config/locales 2018-04-30 18:41:59 +07:00
Julian Herrero
833670117e add test for not selected bugets investments 2018-04-30 13:59:57 +07:00
Julian Herrero
3a643f3c29 add test for unfeasible bugets investments 2018-04-30 13:55:48 +07:00
Julian Herrero
9a35389222 add locales (en) for unfeasible and not selected bugets investments 2018-04-30 13:49:41 +07:00
Julian Herrero
b7a16c3917 add message views for unfeasible and not selected bugets investments 2018-04-30 13:46:05 +07:00
Alberto García
223c06f588 Merge pull request #2567 from consul/mode-view
Mode view
2018-04-27 19:28:54 +02:00
Alberto García
6a0a710148 Merge pull request #2566 from consul/minor-fixes
Minor fixes
2018-04-27 19:27:34 +02:00
decabeza
02cef6dec5 Fixes missing i18n 2018-04-27 18:24:53 +02:00
decabeza
b93543cbf9 Shows message only if there is questions on legislation debate 2018-04-27 18:24:53 +02:00
decabeza
56f64779ba Fixes actions buttons on admin valuators index table 2018-04-27 18:24:53 +02:00
decabeza
3f7395fa19 Adds message on polls index if there are no open polls 2018-04-27 18:24:17 +02:00
decabeza
32711e0341 Adds map skip checkbox i18n for budget investments 2018-04-27 18:24:17 +02:00
decabeza
725c282ba5 Adds unicode_normalize for alt and title on images 2018-04-27 18:24:17 +02:00
decabeza
9a60f5370d Moves h3 tag outside of table on polls results 2018-04-27 18:24:17 +02:00
decabeza
1f82599380 Adds class on back link to admin budget investments show 2018-04-27 18:24:17 +02:00
decabeza
dba8b6a7c9 Improves i18n of admin budgets 2018-04-27 18:24:17 +02:00
Alberto Calderón Queimadelos
0ec57409d1 Merge pull request #2598 from consul/avoid_dev_seeds_output_in_specs
Avoid db:dev_seed log print when run from its test
2018-04-25 21:40:20 +02:00
Alberto Calderón Queimadelos
f330aea108 Merge pull request #2613 from consul/fixup_investments_map
Fix MapLocation json_data to return mappable ids
2018-04-25 21:15:21 +02:00
Bertocq
a44c830cd4 Fix MapLocation json_data to return mappable ids
Until we correctly make MapLocation relation with mappables a polymorphic
one... we'll need to return the investment_id and proposal_id values.

Right now it was returning the MapLocation ID, and the JS was making a
call searching for an Investment with the MapLocation ID... sometimes
finding a record with same ID but totally NOT the one associated to the
MapLocation.
2018-04-25 20:05:19 +02:00
Alberto Calderón Queimadelos
26f72e437b Merge pull request #2599 from consul/remove_sitemap_generator_output
Remove sitemap generator output when running specs
2018-04-15 12:15:42 +02:00
Bertocq
23b15490ce Remove sitemap generator output when running specs
When running tests there is no need to pollute rspec's output with any
kind of log/info.
2018-04-14 22:26:03 +02:00
Bertocq
fcdc24a78c Avoid db:dev_seed log print when run from its test
The db:dev_seed rake logs info as it progresses as information for the
developer. But that's not needed when ran from its tests file, and it
bloats the travis/rspec output with unnecessary information.

Now the task will always log info unless the rake task receives an
optional argument.
2018-04-14 20:28:43 +02:00
Bertocq
a31b80fd76 Remove duplicated mailer entry 2018-04-13 07:40:09 +02:00
Alberto Calderón Queimadelos
5e7c522cc7 Merge pull request #2592 from consul/investment_valuator_groups_csv_table
Add valuator groups  assigned to investments to admin tables & csv export
2018-04-11 22:52:13 +02:00
Bertocq
33b6fa3a02 Refactor Investment csv download with filters test
There's no need to check again headers in this scenario, previous one
already does it.

Correctly naming variables, as well as using explicit expectations is a
good idea.

Last but not least, expectations where reversed but by luck or lack of
attention where passing.
2018-04-11 21:32:59 +02:00
Bertocq
71003875ae Refactor Investment CSV export download scenario
The created investment didn't had all data to correctly assert each
column values are correctly exported.

The expectations checking if each particular text appears are invalid in
this test. The objective is to check that the downloaded file contents
are exactly as they should be... not particular parts checked in an
independent way as for example "Yes" could appear in two different
columns and just looking if the text appears is not a valid assertion.
2018-04-11 21:32:57 +02:00
Bertocq
aacac71362 Extract Budget Investment to_csv to its own class
The csv generation doesn't seem like a Model concern, at least not taking
into account the amount of lines of the method (36+). Just a simple ruby
class that encapsulates the logic makes it easier to read and maintain as
we increase the columns exported.. also customize in case other forks need
different values.
2018-04-11 21:30:16 +02:00
Bertocq
83f4f4f65c Remove unnecesary parameter at Investment to_csv
If there's only one usage of `to_csv` and the parameter has always the
same value... there's no good reason to bother using an additional argument.
2018-04-11 21:14:13 +02:00
Bertocq
1dc8d29f2d Add Valuator Groups list to investment csv & table
We've added the list of valuator groups assigned to each investment at
 both admin investment list and investment csv exported file
2018-04-11 21:12:46 +02:00