Commit Graph

896 Commits

Author SHA1 Message Date
Angel Perez
8015596cb8 Replace hardcoded update notice when updating translations with proper I18n 2018-07-26 20:49:12 -04:00
rgarcia
461a172bd2 Refactor translations loading for current locale 2018-07-26 20:49:01 -04:00
rgarcia
feb3df1f93 Initialize I18n.backend translations
We were getting a 500 error because the translations had not been initialized
https://stackoverflow.com/a/4054527
2018-07-26 20:49:00 -04:00
rgarcia
82f496ccfa Fix globalization for information texts
Refactoring and making similar specs to the milestones globalization specs
2018-07-26 20:48:56 -04:00
Angel Perez
5c1e0bd949 Don't use hardcoded locale when appending/creating I18n keys 2018-07-26 19:07:11 -04:00
Angel Perez
a190e3e1e0 Fix exception for undeclared variable on InformationTexts#index action 2018-07-26 19:06:54 -04:00
Angel Perez
f92006b3f3 Extract complex logic from InformationTexts#index into separate private methods 2018-07-26 19:06:37 -04:00
Angel Perez
26965b43ee Clean I18n codebase 2018-07-26 19:06:29 -04:00
Raúl Fuentes
6d6dc32c38 Complete basic I18n backend and frontend 2018-07-26 19:06:19 -04:00
Raúl Fuentes
c18479e3ac Add translations management pages
In the admin section of the application, a new page
has been added so that the admins are able to manage
the selected texts for translate.

The texts have been divided in different "sections",
depending on the nature of themselves (budgets, polls,
proposals, management, etc.). Each section has become a tab
with a form associated to edit all the texts for her.

When a language is added, it's added for ALL the texts in the
application. That means that, if an admin adds french for debates,
the french form will appear for the rest of the texts. That doesn't
mean that they need to fill all the texts, only that the languages
work for all of them instead of individually.
2018-07-26 19:05:58 -04:00
María Checa
9d580e15f5 Adds activity tab for system emails 2018-07-26 17:55:06 +02:00
María Checa
f1e7b634ba Adds moderate actions to proposal system notifications 2018-07-26 17:55:06 +02:00
María Checa
eb8c021451 Adds button to send pending proposal notifications 2018-07-26 17:55:06 +02:00
María Checa
b7a1599fdf Adds logic to send proposal notifications in batches
WIP batches tests
2018-07-26 17:55:06 +02:00
rgarcia
3bc8fce5fa Process newsletters deliveries asynchronously
We were seeing a timeout when queuing the 300.000+ emails to be
delivered

With this commit we are dealing asynchronously with this creations and
responding promptly, to avoid the web timeout of 30 seconds
2018-07-26 17:55:06 +02:00
Alberto
273781430c Merge pull request #2800 from wairbut-m2c/backport-2589-investments_supports_order_filter
Change admin budget investments list order by supports from less to more
2018-07-26 13:43:28 +02:00
María Checa
5dfefbbe2f Change admin budget investments list order by supports from less to more
Sorting by id is in descending order and by title ascending

Backported from AyuntamientoMadrid/consul
2018-07-26 12:24:53 +02:00
María Checa
4d355f3531 Added year to showed creation date and ordered by date DESC
Backported from AyuntamientoMadrid/consul fork
2018-07-26 10:22:42 +02:00
Bertocq
eb0919d978 Add Preview Pending action to Admin System Emails
Some system emails need to be manually reviewed before being sent. This
new action allows admins to see a preview of all Pending to be sent
Proposal Notification Digest messages.
2018-07-25 20:20:33 +02:00
Bertocq
5c726e0949 Add Admin System Emails view & first system email
Admins need to be able to see what a particular System Email looks like
with dummy data.

Also adding the first system email to be managed: the proposal
notification digest.

In case the current admin doesn't have any Notifications from
 ProposalNotifications there will be a crash. We'll solve this in later
 PR's with a system to "inject" sample text in email templates without
 having to generate records in the database.
2018-07-25 20:20:33 +02:00
Bertocq
b9c6da245a Add System emails menu & list to admin panel
We need a section to list all System Emails to view the templates and
preview an example of what would be sent.
2018-07-25 20:19:58 +02:00
Bertocq
f695a7faf3 Add AdminNotification management at admin panel
In the same fashion Newsletters is managed, with the only difference that
the preview is using the notification partial in the same way the index
of notifications.
2018-07-25 18:33:45 +02:00
Alberto
61589122ef Merge pull request #2723 from wairbut-m2c/backport_2400_combine_free_text_search_and_filters
Combine text search and filters for Investments on Admin panel
2018-07-25 14:42:19 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Juan Salvador Pérez García
e5f9cf6710 Fixed #239
Proposals dashboard refactored to dashboard.
Added missing specs for the dashboard.
2018-07-24 15:52:43 +02:00
Angel Perez
4da23716bb Allow admins to moderate investments 2018-07-20 18:42:34 -04:00
Juan Salvador Pérez García
a872c5b5df Fixes #200
Adds settings to complete the polls card and feature view.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
6e75f5b494 Fixes #140
Adds a new setting that allows defining what is considered a successful
proposal.
2018-07-17 17:59:11 +02:00
Juan Salvador Pérez García
3c3f60dfcc Implements #173
Public view for suggested actions as well as resources has been
completelly redesigned.

Private side for this feature has been adapted as well in order to meet
the requirements.
2018-07-17 17:58:22 +02:00
Juan Salvador Pérez García
bafdd697b8 Dashboard controllers have been refactored
Proposal dashboard related controllers have been refactored inside its
own namespace.
2018-07-17 17:57:30 +02:00
Juan Salvador Pérez García
3ee9f9b059 Removed redundant partial
proposal dashboard actions views use shared/errors partial instead of
its current errors partial
2018-07-17 17:53:18 +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
690cdd9b48 Removed blank line
Blank line has been removed
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
c1a9f1d138 Addressed comments from sprint meeting 22/06/2018
New group created in administration menu including dashboard resources/
proposed tasks and pending tasks for the administrator.

Some unused files have been removed.
2018-07-17 17:52:48 +02:00
Juan Salvador Pérez García
e4e0cb65de Implements #142
Dashboard actions can be proposed actions or resources
2018-07-17 17:50:05 +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
iagirre
82cb8d4c52 Changes suggested in PR:
* Delete all things related to banner images and styles (in code)
* Add a new test to check that the banner is showing correctly
* Update the specs accordingly to match the changes

Update dev_seed to set a random background_color and a font_color for banners (and remove everything about image and style)
Add a rake task to migrate the banner style to backgroun_color and font_color (so that the banners have the same colors than before)
2018-07-12 10:17:24 -04:00
iagirre
3690cae458 Apply banner style to the new banners
Banner sections can be saved (one banner can appear in several sections)
If the hex color is changed in the textfield, the color of the color picker changes.
2018-07-12 10:16:47 -04:00
iagirre
6d6da8affc Add form fields to set the colours and the sections for the banner
Add migrations to store the information in the database
2018-07-12 10:16:47 -04: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
iagirre
21b1d00205 Add backend for the moderators
Add new routes for the proposal notifications edition and
abilities to let moderators edit it (mark as ignored, hide, etc.).

The notifications are not flaggable because they doesn't work like that,
but in a similar way. The moderator/administrator is in charge of hidding
them through the UI, so the normal users don't flag it as inappropriate.

New controller Moderation::ProposalNotification to manage the moderators
work.
2018-07-02 18:17:45 +02:00
María Checa
29dadc91ac Change Budget::Investment::Milestones controller
Added `:status_id` to valid params and new method to get all statuses defined for the budget.
2018-06-27 18:19:29 +02:00
María Checa
2cb59260e9 Add Budget::Investment::Statuses controller and routes 2018-06-27 16:44:58 +02:00
Alberto
f9940980b0 Merge pull request #2645 from wairbut-m2c/admin-form-improvements-backport
Admin form improvements
2018-06-07 17:44:38 +02:00
rgarcia
b672a4550d Add option to configure feed items displayed in homepage 2018-05-29 19:58:04 +02:00
rgarcia
7c17eea6a3 Refactor widget feed from activemodel to activecord 2018-05-29 18:26:20 +02:00
rgarcia
ad181b0e10 Add label to cards
Also removes unused fields related to buttons and alignment
2018-05-28 18:17:26 +02:00
rgarcia
5fe0dd46b9 Add homepage configuration for user recomendations 2018-05-28 18:17:26 +02:00
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