Commit Graph

9172 Commits

Author SHA1 Message Date
rgarcia
0e097973cc Add widget feeds to homepage
Note there is some funkiness going on with class loadings
Had to create a `feed` and `widget_feed` table even though in this
first version the Widget::Feed includes only uses ActiveModel instead
of ActiveRecord, otherwise some specs failed

We’ll figure it out and clean up 😌
2018-05-28 18:17:26 +02:00
rgarcia
c7f85c4173 Add widget header to homepage 2018-05-28 18:17:26 +02:00
rgarcia
664e77305c Add widget cards to homepage 2018-05-28 18:17:26 +02:00
rgarcia
85c08da7a6 Add homepage admin section 2018-05-28 18:17:26 +02:00
Angel Perez
9575aa5a42 Fix failing specs for skipping invalid map markers 2018-05-28 11:44:53 -04:00
Angel Perez
dbed904a4e Fix typo: toogle -> toggle 2018-05-28 11:44:53 -04:00
rgarcia
994e15666e Skip invalid map markers
Why:
Sometimes the latitude or longitude it passed to the map as *********
instead of the actual latitude or longitud. The asterisks are not a
string, breaking the whole array
https://github.com/consul/consul/issues/2380

What:
This commits skips invalid markers and displays the rest

How:
- Substituting the mysterious asterisks for null
(cleanInvestmentCoordinates)

- Validating the coordinates are numbers before trying to pain
them(validCoordinates)

- Adding a numeric function to validate the latitude and longitude
(isNumeric)
https://stackoverflow.com/questions/9716468/is-there-any-function-like-i
snumeric-in-javascript-to-validate-numbers#answer-9716488
2018-05-28 11:44:53 -04:00
iagirre
af867028a7 Add imagemagick package to Docker configuration
Add imagemagick package to the Docker configuration so that
it's installed along with the others at the moment of configuring it.
2018-05-28 16:56:52 +02:00
iagirre
2821985552 Change 'Calculate Winners button' to budget_investments index.
Move the button so that it appears in the Winners tab of the
budget_investments index.

When the budget is in "Balloting projects", "Reviewing Ballots"
or "Finished budget" phases, the button will appear as a button
(clickable). If there are no winners calculated yet, the text
will be "Calculate winner investments"; if there are, the text
will be "Recalculate winner investments".

If the budget is in another phase, the button will be
disabled and a message will appear: 'The budget has to stay on
phase "Balloting projects", "Reviewing Ballots" or
"Finished budget" in order to calculate winners projects'
2018-05-28 15:12:28 +02:00
Raimond Garcia
06772a7b87 Merge pull request #2649 from consul/release-0.15
Release v0.15
2018-05-25 19:03:34 +02:00
rgarcia
32bf83f3ae Update version number for consul.json 2018-05-25 17:50:06 +02:00
rgarcia
ea4eaeb687 Add module name to CHANGELOG items 2018-05-25 17:49:38 +02:00
Adan Amarillas
361518b57c Modify tests to reflect the new navigation on admin configuration settings 2018-05-24 14:49:31 -07:00
Adan Amarillas
1d974c41e3 Add missing i18n keys to locales 2018-05-24 12:27:07 -07:00
Adan Amarillas
60bc3f663a Make tabs i18n-friendly 2018-05-24 09:57:28 -07:00
Adan Amarillas
2c5cefcfdd Adjust tests to new navigation. Add id tag to map tab so it can be found by id 2018-05-24 09:55:51 -07:00
Adan Amarillas
7f0bfd44b7 Split configuration settings into tabs 2018-05-24 09:55:51 -07:00
Adan Amarillas
b59af89c09 Add 'settings' link to side menu on Admin's panel. 2018-05-24 09:55:51 -07:00
Raimond Garcia
1c4dec1dd5 Merge pull request #2399 from wairbut-m2c/2291_add_setting_to_skip_user_verification
Added setting on admin to skip user verification
2018-05-24 13:46:08 +02:00
rgarcia
2647534e1c Update CHANGELOG for release 0.15 2018-05-23 23:45:02 +02:00
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
Raúl Fuentes
83ca0656b4 Add test for all functinality
new setting set to nil on test to prevent prevent unforeseen
consequences on testing environment
2018-05-22 15:41:10 +02:00
Raúl Fuentes
bc1b70205b Add default value for the setting on seeds/dev_seeds 2018-05-22 15:03:43 +02:00
Raúl Fuentes
dddc381ee2 Add translations for the settings menu 2018-05-22 15:02:35 +02:00
Raúl Fuentes
376ce443ef Add logic to user verification
changed functions on verification.rb, the first thing they do is
return true whene skip_user_verification is active.
changed show_welcome_screen? on user.rb, now its shows the welcome
page even with te option active.
changed welcome.html.erb, now if the user see this view and the
option is activated, all 4 checks are green, not only 2.
2018-05-22 15:02:35 +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