Commit Graph

829 Commits

Author SHA1 Message Date
Alberto
3c517462e4 Merge pull request #2760 from wairbut-m2c/backport/user-recommendations
Debates and proposals recommendations for users
2018-07-16 13:54:54 +02:00
Raimond Garcia
f2c780fac6 Merge pull request #2768 from AuiDrome/add_proposal_images_on_dev_seeds
add proposal image on dev_seeds task
2018-07-16 10:35:55 +02:00
Fernando Garcia Samblas
0cf26b8770 remove add_images_to argument spaces
Sorry, at work we have a co-worker (@rochgs) that thanks this "spaced" style
because of his visual handicap. Here you are!! ;)
2018-07-16 08:48:24 +02:00
Angel Perez
0b7967440f Recommendations for users are enabled by default 2018-07-15 21:28:58 -04:00
Angel Perez
fefa225f8a Add new settings for dev seeds for Debates and Proposals recommendations 2018-07-15 21:28:57 -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
Fernando Garcia Samblas
ffbd4a08d8 add proposal image on dev_seeds task 2018-07-16 01:33:25 +02: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
5ce08532cb Update PR with master
Rebase master branch so that this PR can
be updated with the latest changes.
Conflicts has been solved. dev_seeds
has been also adapted to the new format
(it all separated to be easier to manage).
Some specs has been updated to work with
selenium-webkit.
2018-07-12 10:17:25 -04:00
iagirre
5d1b06a3cb New and fresh DB schema 2018-07-12 10:16:48 -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
iagirre
7982574993 Add migration to generate new columns
The migration to generate the columns needed for the feature.
There are three new columns:

moderated: a boolean that, when true, it means a moderator has
hidden a proposal notification. The notification is hidden immediately
and it's shown in the moderators proposal notifications index.

hidden_at: used by acts_as_paranoid to hide the notification from the list.
It's like deleting it, but without deleting definitely from DB.

ignored_at: used to mark as a notification as ignored, so that it will
appear in marked as reviewed and not in the pending list. WARNING! this
doesn't mean that it will disappear from the 'All' filter.
2018-07-02 18:06:19 +02:00
María Checa
7deded142f Add Budget::Investment::Status migration 2018-06-27 18:19:22 +02:00
María Checa
9eefcafcfb Add Budget::Investment::Status to dev_seeds 2018-06-27 16:49:27 +02:00
María Checa
28bb32a085 Add Budget::Investment::Status migration 2018-06-27 16:44:40 +02:00
decabeza
c710e31b4a Replaces header and debates images 2018-06-22 18:00:39 +02:00
Pierre Mesure
1ebcf04186 Adding images and seeds for the homepage 2018-06-15 14:26:29 +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
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
664e77305c Add widget cards to homepage 2018-05-28 18:17:26 +02:00
Raúl Fuentes
bc1b70205b Add default value for the setting on seeds/dev_seeds 2018-05-22 15:03:43 +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
rgarcia
f7486b9238 Add Globalize to Milestones 2018-05-09 16:05:44 +02: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
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
35c156ba7a Create setting to enable/disable attached documents
Add setting to both seed and dev_seeds as well as a rake task to make it
easier to set.
2018-04-10 12:46:09 +02:00
iagirre
21a6d3495a Update PR with master
Rebase master branch so that this PR can
be updated with the latest changes.
Conflicts has been solved and some specs
updated to fit the new changes. dev_seeds
has been also adapted to the new format.
2018-04-09 16:11:06 +02:00
iagirre
b8cc10d218 Fix conflics after rebase 2018-04-09 15:02:35 +02:00
rgarcia
8bb4dde6ac Fix conflicts with fork 2018-04-04 13:19:07 +02:00
rgarcia
00c965b715 Clean up 2018-04-04 13:19:01 +02:00
rgarcia
ab498d6d93 Assign groups to investments 2018-04-03 20:55:44 +02:00
rgarcia
1dbbe331c9 Assign valuators to groups 2018-04-03 20:55:44 +02:00
rgarcia
cddfdf4b84 Add valuator groups 2018-04-03 20:55:44 +02:00
rgarcia
c9cad05a95 Fix dev seed specs 2018-03-23 19:57:51 +01:00
rgarcia
f7bfe5e171 Extend dev seeds to have notifications for all users
Even though an action that triggers a notification is made, the
notification is created in a separate step, reflecting how it is done
in the corresponding controller

https://github.com/AyuntamientoMadrid/consul/blob/master/app/controllers
/comments_controller.rb#L16
2018-03-23 11:48:16 +01:00
rgarcia
09c44ee583 Extend notifications to be marked as read and unread 2018-03-23 11:47:06 +01:00
rgarcia
730072e91e Add max votable headings to groups 2018-03-22 22:24:58 +01:00
Bertocq
a360cf4fbc Remove deprecated internal_comments column from Investments 2018-03-09 11:45:15 +01:00
Bertocq
d44621f761 Relocate spending proposal valuation assigment seed 2018-02-22 11:38:49 +01:00
Bertocq
54e6c5fc5c Split dev_seeds into individual files for sections
Why:

Its a really huge script, and conflicts are hard to resolve on forks,
with indivudal scripts its easier to make custom changes.

How:

Following @mariacheca example using require_relative and a file under
the db/dev_seeds/ folder
2018-02-22 11:04:47 +01:00
Bertocq
12fd0a7cd3 Make newsletter seed file line lenght compliant 2018-02-21 11:47:34 +01:00
Bertocq
4becd0eb35 Change Newsletter's segment_recipient to string
Why:

Newsletter attribute `segment_recipient` is an integer to be used as
enum. There's no advantage to store a number instead of an string if the
ammount of elements in the table is not going to be huge, or we can take
advantage of using an enum.

Also maintaining both Newsletters enum paired with UserSegments::SEGMENTS
would be a maintenance burden.

How:

* Migration to change segment_recipient column from integer to string
* Removing enumeration from Newsletter model class
* Using UserSegments::SEGMENTS instead of Newsletter.segment_recipients
or integer values
2018-02-21 11:46:11 +01:00
María Checa
24bca36639 Merge branch 'master' into admin-newsletter-emails 2018-02-14 16:07:13 +01:00