docbrown/app/views/users/_notifications.html.erb
Mac Siri 9d32af7b6c Implement periodic email digest (#123)
* Create EmailDigest WIP

* Add email_digest_periodic to User model

* Add email digest setting to notification

* Draft thoughts (?)  WIP

* Implement EmailDigest's features

* Remove hard-coded email digest vars

* Create spec for EmailDigest

* Fix something

* Temp work

* Run migration & Yarn

* Move email logic out of EmailDigest

* Improve email logic

* Improve EmailLogic'specs

* Update copy

* Change positive_reactions_count limit

For non-followed articles we should have a higher limit. So this change modifies that.
2018-03-27 13:29:08 -04:00

40 lines
1.6 KiB
Text

<h3>Email Notification Settings</h3>
<%= form_for(@user) do |f| %>
<div class="checkbox-field">
<div class="sub-field">
<%= f.check_box :email_newsletter %>
<%= f.label :email_newsletter, "Send me weekly newsletter emails" %>
</div>
<div class="sub-field">
<%= f.check_box :email_digest_periodic %>
<%= f.label :email_digest_periodic, "Send me a periodic digest of top posts from my tags" %>
</div>
<% if current_user.a_sustaining_member? %>
<div class="sub-field">
<%= f.check_box :email_membership_newsletter %>
<%= f.label :email_membership_newsletter, "Send me sustaining membership newsletter emails" %>
</div>
<% end %>
<div class="sub-field">
<%= f.check_box :email_comment_notifications %>
<%= f.label :email_comment_notifications, "Send me an email when someone replies to me in a comment thread" %>
</div>
<div class="sub-field">
<%= f.check_box :email_follower_notifications %>
<%= f.label :email_follower_notifications, "Send me an email when someone new follows me" %>
</div>
<div class="sub-field">
<%= f.check_box :email_mention_notifications %>
<%= f.label :email_mention_notifications, "Send me an email when someone mentions me" %>
</div>
<div class="sub-field">
<%= f.check_box :email_unread_notifications %>
<%= f.label :email_unread_notifications, "Send me occasional reminders that I have unread notifications on dev.to" %>
</div>
</div>
<div class="field">
<label></label>
<%= f.hidden_field :tab, value: @tab %>
<%= f.submit "SUBMIT", class: "cta" %>
</div>
<% end %>