2016-09-16 11:08:09 -04:00
- noteable = @sent_notification.noteable
2017-05-29 16:18:09 -04:00
- noteable_type = @sent_notification.noteable_type.titleize.downcase
2019-05-09 09:09:04 -04:00
- noteable_text = show_unsubscribe_title?(noteable) ? %(#{noteable.title} (#{noteable.to_reference})) : %(#{noteable.to_reference})
2020-01-02 16:07:38 -05:00
- show_project_path = can_read_project?(@sent_notification.project)
- project_path = show_project_path ? @sent_notification.project.full_name : _("GitLab / Unsubscribe")
2020-07-27 08:09:50 -04:00
- noteable_url = show_project_path ? url_for([@sent_notification.project, noteable]) : breadcrumb_title_link
2020-01-02 16:07:38 -05:00
- page_title _('Unsubscribe'), noteable_text, noteable_type.pluralize, project_path
2016-09-16 11:08:09 -04:00
2022-06-08 17:08:52 -04:00
%h1.page-title.gl-font-size-h-display
2019-01-22 11:46:25 -05:00
= _("Unsubscribe from %{type}") % { type: noteable_type }
2016-09-20 03:52:06 -04:00
%p
2020-01-02 16:07:38 -05:00
- link_to_noteable_text = link_to(noteable_text, noteable_url)
2019-01-22 11:46:25 -05:00
= _("Are you sure you want to unsubscribe from the %{type}: %{link_to_noteable_text}?").html_safe % { type: noteable_type, link_to_noteable_text: link_to_noteable_text }
2016-09-16 11:08:09 -04:00
%p
2019-01-22 11:46:25 -05:00
= link_to _('Unsubscribe'), unsubscribe_sent_notification_path(@sent_notification, force: true),
2021-01-27 16:09:12 -05:00
class: 'gl-button btn btn-confirm gl-mr-3'
2020-10-20 11:08:57 -04:00
= link_to _('Cancel'), new_user_session_path, class: 'gl-button btn gl-mr-3'