Commit Graph

5383 Commits

Author SHA1 Message Date
decabeza
4fbc10d85e Fixes budgets ui for all phases 2018-03-14 15:01:56 +01:00
Alberto García
527e680461 Merge branch 'master' into legislation-proposals 2018-03-09 13:32:03 +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
Alberto Calderón Queimadelos
a55218ad9f Merge pull request #2443 from consul/fix_currency_locale
Use user locale instead of default locale to format currencies
2018-03-08 18:03:52 +01:00
Alberto García
8c6c567c76 Merge pull request #2525 from consul/social-share
Fixes social share buttons
2018-03-08 17:46:24 +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
0bc0a2b1e8 Makes smaller text on participation not allowed div 2018-03-08 11:50:30 +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
decabeza
0e9190bc43 Adds heading link on different heading message 2018-03-08 11:50:09 +01:00
decabeza
ef53cd0f15 Clean css and views of custom content 2018-03-08 11:30:46 +01:00
decabeza
d4b88f1fae Adds description for social share buttons 2018-03-07 17:24:30 +01:00
decabeza
e0480675ed Replaces hardcoded social share buttons tag with correct partial 2018-03-07 17:21:59 +01:00
decabeza
1ab4458785 Adds description to legislation process share buttons 2018-03-07 17:19:01 +01:00
decabeza
ee7ca37d18 Removes unused css 2018-03-07 17:18:27 +01:00
decabeza
d679c1eb79 Removes sandbox folder 2018-03-07 17:18:10 +01:00
decabeza
995449d733 Adds share buttons and refactors processes header 2018-03-07 17:16:54 +01:00
decabeza
5b1ac0a6ce Adds correct url on budget investment twitter share 2018-03-07 17:16:43 +01:00
Bertocq
0516bc3e91 Prevent valuators from editing finished valuation
Valuators should not be able to edit a finished valuation (only admins
should).

The valuation form is only shown to the valuator if he has that ability
(we've previously modified app/models/abilities/valuator.rb to be able
to rely on `valuate` over an investment to check that)

If the valuator can't see the form, we present him just the data in
plain text.
2018-03-06 20:18:05 +01:00
Bertocq
d9a8474793 Refactor Group partial to be easier to read 2018-03-02 09:17:26 +01:00
Bertocq
7c02f9c82e Fix missing I18n.t usage 2018-03-02 09:17:21 +01:00
Raúl Fuentes
78fc4010d0 fixed the style 2018-03-02 09:17:08 +01:00
Raúl Fuentes
6d8d44a5e3 Added interface and methods for edit the name of a Budget::Group if the budget is still inthe drafting phase 2018-03-02 09:16:57 +01:00
Bertocq
6b41b6487b Add UserSegments#user_segment_emails helper method
Why:

Both Newsletters and Email Downloads need the same logic: To extract the
emails from all the users in the segment that have newsletter flag
active, removing all empty email values.

How:

1- UserSegments#user_segment_emails holds that repeated logic and is used
on both Newsletter & EmailDownload.

2- Rename Newsletter#list_of_recipients to list_of_recipient_emails as
it is more descriptive. There is no need to pass entire Users around,
only the emails are needed at Mailer#newsletter method.

3- Cleanup Newsletter#list_of_recipient_emails model spec scenario
2018-03-01 20:59:20 +01:00
Alberto Calderón Queimadelos
0acb4988f0 Merge pull request #2490 from consul/documents-tab
Documents list
2018-02-28 17:14:58 +01:00
decabeza
1546f67367 Removes document tab on legislation proposals 2018-02-28 16:21:08 +01:00
decabeza
7a888b71fd Removes duplicate heading info, fixes headings structure 2018-02-28 16:10:14 +01:00
decabeza
46f21330bd Removes document tab on budgets investments 2018-02-28 15:23:39 +01:00
decabeza
5b7a5a2b4b Removes document tab on proposals 2018-02-28 15:23:32 +01:00
decabeza
5c0a10699a Refactors documents partials and reorganices css 2018-02-28 15:22:33 +01:00
Bertocq
24aa157998 Fix invalid Newsletter recipients count to 0
When a newsletter doesn't have a valid user segment for the recipients
list, the number of users should be 0.
2018-02-21 11:47:24 +01:00
Bertocq
f34d6c1c1d Prevent invalid newsletters from being sent
Why:

Newsletters without a valid user segment can't be sent since there is no
recipient user email list.

How:

* Hiding the send button at the form
* Preventing an invalid newsletter from being delivered at the controller
2018-02-21 11:47:16 +01:00
Bertocq
38f7a222f5 Add error message for invalid Newsletter user segment
Instead of the name of the User Segment we'll display an error message
2018-02-21 11:46:30 +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
Bertocq
f873bff5c6 Fix admin menu controller name conditionals 2018-02-20 22:33:01 +01:00
María Checa
1c458d4be3 Added emails download views 2018-02-20 22:33:01 +01:00
Bertocq
1c653a7096 Improve admin menu active item conditionals 2018-02-20 18:50:39 +01:00
María Checa
017c242085 Merge pull request #2462 from consul/admin-newsletter-emails
Admin newsletter emails
2018-02-20 16:17:37 +01:00
decabeza
1cc799ef11 Adds links to milestone description 2018-02-14 18:13:46 +01:00
decabeza
a950bb03a7 Removes unnecessary p tag on investment partial 2018-02-14 18:04:17 +01:00
decabeza
990dc072be Refactors custom page view and include specs 2018-02-14 17:52:10 +01:00
decabeza
f7c7f0201a Fixes heading structure and i18n format on legislation processes 2018-02-14 17:06:26 +01:00
María Checa
24bca36639 Merge branch 'master' into admin-newsletter-emails 2018-02-14 16:07:13 +01:00
María Checa
881059811f Added newsletter admin views 2018-02-14 16:05:29 +01:00
decabeza
c0c4d9e01f Fixes back link to on how to use help page 2018-02-14 16:00:01 +01:00
Raimond Garcia
8bec36500a Merge pull request #2385 from wairbut-m2c/2363-alert-delete-investment-project
Add alert message when a user deletes an investment project from "My activity"
2018-02-13 14:06:08 +01:00
María Checa
20173f9870 Added newsletter mailer method and view 2018-02-13 13:12:00 +01:00
Bertocq
b3b28e21d0 Fix translation indentation on investments partial 2018-02-10 20:44:02 +01:00
Bertocq
86a60a8b7c Fix space & comma typo 2018-02-10 19:15:00 +01:00
Bertocq
a46e9f756a Fix end's indentations at budget index page 2018-02-10 18:23:38 +01:00
Bertocq
9f47bce7f5 Improve budget index info page with classes 2018-02-10 18:22:45 +01:00