Commit Graph

1614 Commits

Author SHA1 Message Date
Alberto
65e4435822 Merge pull request #2137 from wairbut-m2c/iagirre-admin-menu-in-management
Add admin menu in management view (if user is admin)
2018-07-27 12:35:07 +02:00
Alberto
fb19aafee7 Merge pull request #2778 from wairbut-m2c/backport/investments-moderation
Allow budget investments to be moderated
2018-07-27 12:34:17 +02: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
Bertocq
4a5235f96f Allow notifications with explicit/unexistent links
Notifications usually link to the associated notifiable, but the new
AdminNotifications have a link attribute that may be empty or contain an
external or internal url.
2018-07-25 18:31:41 +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
María Checa
8c69871cfa Add logic to show only winner investments if budget is finished
Backported from AyuntamientoMadrid/consul
2018-07-24 11:33:38 +02:00
Angel Perez
4da23716bb Allow admins to moderate investments 2018-07-20 18:42:34 -04:00
Angel Perez
1990092fdf Allow moderators to hide inappropriate investments 2018-07-20 18:42:33 -04:00
Angel Perez
7bb1da1804 Adapt backend to enable flagging/unflagging investments 2018-07-20 18:42:33 -04:00
Angel Perez
8ef3e81e03 Adapt public views for flagging/unflagging investments 2018-07-20 18:42:33 -04:00
Alberto
81b102f002 Merge pull request #2577 from consul/random-order
Fix random order for budget investments
2018-07-20 18:31:37 +02:00
María Checa
eccf7de54c Update version number for consul.json 2018-07-20 12:54:51 +02:00
Angel Perez
a143fa447b Ensure recommendations are only shown when enabled 2018-07-15 21:28:58 -04:00
Angel Perez
463c753880 Recommendations are automatically disabled if dismissed by user 2018-07-15 21:28:58 -04:00
Angel Perez
a58f6a2662 Enable 'Recommended proposals' setting for users 2018-07-15 21:28:57 -04:00
Angel Perez
522c206f6d Enable 'Recommended debates' setting for users 2018-07-15 21:28:57 -04:00
decabeza
bdb3f30e40 Adds recommendations on proposals index 2018-07-15 21:28:57 -04:00
decabeza
36a5ff39b8 Adds recommendations on debates index 2018-07-15 21:28:57 -04:00
iagirre
6e238ae252 Changed redirection when signing out from management section 2018-07-15 17:35:30 -04:00
iagirre
2fafceb81d Errors after running Travis fixed 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
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
Raimond Garcia
3e4d095e6f Merge pull request #2719 from javierv/2718-fix_flaky_milestone_spec
Fix flaky spec: Budget Investments Show milestones
2018-07-12 16:07:48 +02: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
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
Javier Martín
f2ef27d3ae Always set Globalize.locale after I18n.locale.
The test "Budget Investments Show milestones" was failing in certain
cases where `Globalize.locale` had been changed in a previous test.

Since having different values in `Globalize.locale` and `I18n.locale`
has proven to be an issue on the test enviroment, this commit also
changes application code in order to avoid similar situations on
production.

See issue #2718.
2018-07-03 00:52:20 +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
Bertocq
3e75bd4dfd Fix Valuation Investment index heading filters
Why:

Heading filter where not being correctly displayed

How:

Increasing scenario to cover all possible combinations, and fixing the
heading_filters method of the Valuation Budget Investment Controller to
correctly:
  * Find how many investments the valuator can access
  * Count investments for each heading
2018-06-27 14:30:09 +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
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
rgarcia
7c17eea6a3 Refactor widget feed from activemodel to activecord 2018-05-29 18:26:20 +02:00
María Checa
1169c10907 Add condition to show only selected investments in publishing_prices phase 2018-05-29 08:40:32 -04:00
rgarcia
ad181b0e10 Add label to cards
Also removes unused fields related to buttons and alignment
2018-05-28 18:17:26 +02:00