Commit Graph

11 Commits

Author SHA1 Message Date
decabeza
61ae4d0ba2 Fix indentation on admin newsletters show 2019-05-17 17:22:41 +02:00
decabeza
4296a83025 Removes unncesary div tag on admin newsletters show
This prevent send button renders outside of the layout.
2019-05-17 17:22:37 +02:00
voodoorai2000
7d5b57aee2 Add counter of emails sent to newsletter preview 2018-10-30 17:07:31 +01:00
decabeza
dd98375c67 Unifies styles and views for admin sending of emails section 2018-07-31 12:52:31 +02:00
decabeza
a669bd86a8 Improves layout and i18n for admin newsletters 2018-06-08 18:38:21 +02:00
decabeza
b2015312d8 Moves mailer header and footer to partials
This prevent use the entire HTML layout, an HTML inside another HTML
without using an iframe create some validation errors and break layout
details
2018-06-06 17:33:15 +02: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
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
María Checa
881059811f Added newsletter admin views 2018-02-14 16:05:29 +01:00