2016-06-16 21:27:52 -04:00
|
|
|
<div class='container unsubscribe'>
|
2022-06-21 14:49:47 -04:00
|
|
|
<%- if !@found || @different_user %>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2022-06-21 14:49:47 -04:00
|
|
|
<%if !@found %>
|
2016-06-16 21:27:52 -04:00
|
|
|
<p><%= t "unsubscribe.not_found_description" %></p>
|
|
|
|
<%- else %>
|
|
|
|
<p><%= t("unsubscribe.different_user_description").html_safe %></p>
|
|
|
|
<%= form_tag(session_path(id: current_user.username_lower), method: :delete) do %>
|
|
|
|
<%= hidden_field_tag(:return_url, @return_url) %>
|
|
|
|
<%= submit_tag t('unsubscribe.log_out'), class: 'btn btn-danger' %>
|
|
|
|
<%- end%>
|
|
|
|
<%- end %>
|
|
|
|
<%- else %>
|
2014-07-15 17:19:45 -04:00
|
|
|
<br/>
|
2017-06-09 03:27:24 -04:00
|
|
|
<h2><%= t 'unsubscribe.title'%> <%= @user.email %></h2>
|
2016-06-16 21:27:52 -04:00
|
|
|
<br/>
|
|
|
|
<%= form_tag(email_perform_unsubscribe_path(key: params[:key])) do %>
|
|
|
|
<%if @topic %>
|
|
|
|
<% if @watching_topic %>
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<%= check_box_tag 'unwatch_topic', 1, true %>
|
|
|
|
<%= t('unsubscribe.stop_watching_topic', link: render_topic_title(@topic)).html_safe %>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<% else %>
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<%= check_box_tag 'mute_topic', 1, true %>
|
|
|
|
<%= t('unsubscribe.mute_topic', link: render_topic_title(@topic)).html_safe %>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
|
2016-06-16 21:27:52 -04:00
|
|
|
<% if @watched_count %>
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<%= check_box_tag 'unwatch_category' %>
|
2021-07-25 22:19:30 -04:00
|
|
|
<%= t('unsubscribe.unwatch_category', category: category_badge(@topic.category, show_uncategorized: true)).html_safe %>
|
2016-06-16 21:27:52 -04:00
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
2016-06-16 21:57:23 -04:00
|
|
|
<% if @user.user_option.mailing_list_mode && !SiteSetting.disable_mailing_list_mode %>
|
2016-06-16 21:27:52 -04:00
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<%= check_box_tag 'disable_mailing_list' %>
|
|
|
|
<%= t 'unsubscribe.mailing_list_mode' %>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2019-04-17 11:14:40 -04:00
|
|
|
<% if @digest_unsubscribe %>
|
2016-06-16 21:27:52 -04:00
|
|
|
<p>
|
2019-07-30 15:05:08 -04:00
|
|
|
|
2019-04-17 11:14:40 -04:00
|
|
|
<% if @digest_frequencies[:current] %>
|
|
|
|
<h3>
|
2020-07-23 02:20:10 -04:00
|
|
|
<% if @digest_frequencies[:current] == 'never' %>
|
|
|
|
<%= t('unsubscribe.digest_frequency.never_title') %>
|
|
|
|
<% else %>
|
|
|
|
<%= t(
|
|
|
|
'unsubscribe.digest_frequency.title',
|
|
|
|
frequency: t("unsubscribe.digest_frequency.#{@digest_frequencies[:current]}")
|
|
|
|
) %>
|
|
|
|
<% end %>
|
2019-04-17 11:14:40 -04:00
|
|
|
</h3>
|
|
|
|
<br/>
|
|
|
|
<% end %>
|
2019-07-30 15:05:08 -04:00
|
|
|
|
2019-04-17 11:14:40 -04:00
|
|
|
<label><%= t 'unsubscribe.digest_frequency.select_title' %></label>
|
2019-07-30 15:05:08 -04:00
|
|
|
<%=
|
|
|
|
select_tag :digest_after_minutes,
|
|
|
|
options_for_select(@digest_frequencies[:frequencies], @digest_frequencies[:selected]),
|
|
|
|
class: 'combobox'
|
2019-04-17 11:14:40 -04:00
|
|
|
%>
|
2016-06-16 21:27:52 -04:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
2022-06-21 14:49:47 -04:00
|
|
|
<%= server_plugin_outlet "unsubscribe_options" %>
|
|
|
|
|
2020-07-23 02:20:10 -04:00
|
|
|
<% unless @unsubscribed_from_all %>
|
|
|
|
<p>
|
|
|
|
<label>
|
|
|
|
<%= check_box_tag 'unsubscribe_all', 1, @type=="all" %>
|
|
|
|
<%= t 'unsubscribe.all', sitename: SiteSetting.title %>
|
|
|
|
</label>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2014-07-15 17:19:45 -04:00
|
|
|
|
2016-06-16 21:27:52 -04:00
|
|
|
<br/>
|
2019-04-17 11:14:40 -04:00
|
|
|
<% text = @type=='digest' ? t('unsubscribe.submit') : t('unsubscribe.title') %>
|
|
|
|
<%= submit_tag text, class: 'btn btn-danger' %>
|
2014-07-15 17:19:45 -04:00
|
|
|
<%- end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
|
2014-07-15 17:19:45 -04:00
|
|
|
<%- end %>
|
2013-02-05 14:16:51 -05:00
|
|
|
|
|
|
|
</div>
|