<%- if @not_found || @different_user %> <%if @not_found%>

<%= t "unsubscribe.not_found_description" %>

<%- else %>

<%= t("unsubscribe.different_user_description").html_safe %>

<%= 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 %>

<%= t 'unsubscribe.title'%> <%= @user.email %>


<%= form_tag(email_perform_unsubscribe_path(key: params[:key])) do %> <%if @topic %> <% if @watching_topic %>

<% else %>

<% end %> <% if @watched_count %>

<% end %> <% end %> <% if @user.user_option.mailing_list_mode && !SiteSetting.disable_mailing_list_mode %>

<% end %> <% if @digest_unsubscribe %>

<% if @digest_frequencies[:current] %>

<% 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 %>


<% end %> <%= select_tag :digest_after_minutes, options_for_select(@digest_frequencies[:frequencies], @digest_frequencies[:selected]), class: 'combobox' %>

<% end %> <% unless @unsubscribed_from_all %>

<% end %>
<% text = @type=='digest' ? t('unsubscribe.submit') : t('unsubscribe.title') %> <%= submit_tag text, class: 'btn btn-danger' %> <%- end %> <%- end %>