Commit Graph

991 Commits

Author SHA1 Message Date
Juan Salvador Pérez García
d0ec3331ce Fixed issue with i18ntasks specs 2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
caffd97cc8 Implements #182
Implements 182. resources are shown as cards in dashboard progress view.
Implements #182

Implements 182. resources are shown as cards in dashboard progress view.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
921d567110 Implements #175
General menu has been refactored to look like the mockups.
The progress menu has been refactored as well.
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
084e9855e4 Fixed some failing specs 2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
d2a05ee779 Dashboard proposal menu redesign
Dashboard proposal menu has been redesigned to look like the available
mock-ups.
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
8bb3d5b3ab frozen_string_literal removed
frozen_string_literal magic comment has been removed until a decission
is taken regarding to its convenience.
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
f9a085a400 Implements graph for dashboard
Implements graph secion for dashboard.

Dashboard related actions have been agrupated inside a menu in the admin
section.

Minor bugfixes.
2018-07-17 17:53:18 +02:00
Juan Salvador Pérez García
1464bddfa8 Fixes #134
Adds an administration interface for the proposal dashboard actions.
2018-07-17 17:48:46 +02:00
Juan Salvador Pérez García
212c088d35 Implements #144
Creates the basic layout for the dashboard
2018-07-17 17:47:40 +02:00
iagirre
90f8ad2663 Fixed some code that crashed in Travis build and added some test to check the functionality 2018-07-15 17:35:30 -04:00
iagirre
7a7ae5fa2e The admin menu is shown in the management section if the user who logged in is an admin 2018-07-15 17:32:30 -04:00
iagirre
0d9da5398b Fix banners in user pages
Banners were not been shown in certain pages; now
they are.

Spec to check if the banner is been shown correctly
added. Before it was in admins specs, now it has it's
own spec out of admins folder.
2018-07-12 10:17:25 -04:00
rgarcia
88cde6d018 Deal gracefully with hidden followable in my activity
We were seeing an exception when a user was following a proposal and
that proposal becomes hidden

With this commit we are skipping this proposals and hopefully fixing
this exception

We are also adjusting the count of followed proposals, without
including hidden proposals. It might be cleaner, to remove a `Follow`
when its `Followable` becomes hidden. But then we should probably
activate the `Follow` again if the `Followable` becomes non-hidden…

For now this commit should suffice 😌
2018-07-10 17:50:51 +02:00
decabeza
16ff5c4400 Hides sidebar menus if officer has no shifts assigned 2018-07-04 17:22:03 +02:00
Raúl Fuentes
df899cde6e Fixed html, now it reflects the current search also added serach by name or id to the Budget::Invesment search function 2018-07-04 11:55:13 +02:00
Alberto
ff4c72987f Merge pull request #2716 from consul/admin-booths-menu
Adds ballot booths menu on admin
2018-07-03 11:20:42 +02:00
decabeza
0a58e72edb Adds ballot booths menu on admin 2018-07-02 17:57:27 +02:00
decabeza
57a0aaba97 Reorganizes manager menu and creates helper 2018-07-02 17:41:22 +02:00
decabeza
b3f41eb626 Reorders admin menu sections 2018-06-08 18:26:59 +02:00
Alberto
f345786cc0 Merge pull request #2622 from consul/selected-investments-map
Adds message to selected budget investments
2018-06-06 19:21:24 +02:00
decabeza
0bf31bde6c Updates all active to is-active classes 2018-06-06 12:02:13 +02:00
Alberto
a05f6ac61a Merge pull request #2641 from consul/homepage
Add customization of homepage from admin section
2018-06-01 19:18:44 +02:00
rgarcia
b672a4550d Add option to configure feed items displayed in homepage 2018-05-29 19:58:04 +02:00
decabeza
316c816836 Expands cards if feed processes is not enabled 2018-05-28 18:52:59 +02:00
decabeza
7732a6704c Adds styles and i18n for homepage 2018-05-28 18:17:26 +02:00
decabeza
50fd540797 Adds styles and missing i18n for admin homepage 2018-05-28 18:17:26 +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
decabeza
f1e722ac5c Adds message to selected budget investments 2018-05-10 14:54:34 +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
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 García
223c06f588 Merge pull request #2567 from consul/mode-view
Mode view
2018-04-27 19:28:54 +02:00
Bertocq
b364fc475e Move assigned_valuators from helper to model
There's no good reason to call assigned_valuators(investment) when the
logic can be at the model.

Also removed the valuator_groups texts to be added in an independent
method
2018-04-11 21:07:01 +02:00
Raimond Garcia
1692abc54a Merge pull request #2374 from wairbut-m2c/upload_documents_feature
Upload documents feature
2018-04-05 19:39:12 +02:00
decabeza
ef00eaa765 Adds missing content to budget investments mode view
This feature was already on Madrid fork and missing on backport
2018-04-05 14:53:22 +02:00
rgarcia
39c6ac4a91 Display message in budget's index when there are no budgets
When there are no budgets we were seeing an exception in the budgets’
index

There are two parts to take into account here:
1) Making sure there is a current_budget present, otherwise we display
the “no budgets” message

2) The map helper is called from the controller, so we need to make
sure current_budget is present there too

Note: We could have added a bunch of `try` statements in the budgets’s
index, instead of using a conditional, however there are quite a few
`current_budget` calls so it seems more appropriate to use a conditional
2018-04-05 14:25:32 +02:00
rgarcia
00c965b715 Clean up 2018-04-04 13:19:01 +02:00
rgarcia
7e839e7815 Filter by valuator group 2018-04-03 20:56:31 +02:00
decabeza
c4dc7bc831 Adds view mode on debates 2018-04-02 17:28:39 +02:00
decabeza
bdedb023d1 Adds view mode on proposals 2018-04-02 17:27:52 +02:00
María Checa
cd1a0548ba Add map_location#json_data method 2018-03-27 15:17:31 +02:00
Raimond Garcia
c1d7378c92 Merge pull request #2504 from consul/budget_group_name_edit
Allow Budget Group names to be edited
2018-03-22 22:12:04 +01:00
Alberto García
eba4a3c6cb Merge pull request #2528 from consul/budgets-message
Heading link on budgets message
2018-03-09 13:25:39 +01:00
Bertocq
6e843730b0 Replace format_price for Budget#formatted_amount
ApplicationHelper#format_price and Budget#formatted_amount has the same
objective and code, but the Budget#formatted_amount method also uses the
currency of the Budget to correctly give currencies format.

By replacing usage of format_price with formatted_amount we can remove
format_price and have a single location for currency format logic.
2018-03-08 13:26:36 +01:00
decabeza
d70c46e578 Extract BudgetHeadingsHelper#heading_link & use it
Why:

The logic to construct the link to a heading (if it exists) is in three
different places, this is a clear candidate for a helper method.

How:

Just checking at the helper method if `assigned_heading` and `budget`
has values and composing the link if so.
2018-03-08 11:50:23 +01:00
Bertocq
b72e43168b Use user locale instead of default locale to format currencies 2018-03-08 10:20:05 +01:00