summaryrefslogtreecommitdiff
path: root/app/views/sent_notifications/unsubscribe.html.haml
blob: a286693e2b6baa8bb0c12f35c4497518a2610c5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
- noteable = @sent_notification.noteable
- noteable_type = @sent_notification.noteable_type.titleize.downcase
- noteable_text = show_unsubscribe_title?(noteable) ? %(#{noteable.title} (#{noteable.to_reference})) : %(#{noteable.to_reference})
- show_project_path = can_read_project?(@sent_notification.project)
- project_path = show_project_path ? @sent_notification.project.full_name : _("GitLab / Unsubscribe")
- noteable_url = show_project_path ? url_for([@sent_notification.project, noteable]) : breadcrumb_title_link
- page_title _('Unsubscribe'), noteable_text, noteable_type.pluralize, project_path

%h3.page-title
  = _("Unsubscribe from %{type}") % { type: noteable_type }

%p
  - link_to_noteable_text = link_to(noteable_text, noteable_url)
  = _("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 }

%p
  = link_to _('Unsubscribe'), unsubscribe_sent_notification_path(@sent_notification, force: true),
            class: 'gl-button btn btn-primary gl-mr-3'
  = link_to _('Cancel'), new_user_session_path, class: 'gl-button btn gl-mr-3'