BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
ce12749a
Unverified
Commit
ce12749a
authored
Sep 20, 2016
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve the Unsubscribe confirmation page
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
c61a54f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
unsubscribe.html.haml
app/views/sent_notifications/unsubscribe.html.haml
+9
-5
unsubscribe_links_spec.rb
spec/features/unsubscribe_links_spec.rb
+2
-2
No files found.
app/views/sent_notifications/unsubscribe.html.haml
View file @
ce12749a
-
noteable
=
@sent_notification
.
noteable
-
noteable_type
=
@sent_notification
.
noteable_type
.
humanize
(
capitalize:
false
)
-
noteable_text
=
%(#{noteable_type} "#{noteable.title}" (#{noteable.to_reference}))
-
title
=
"Unsubscribe from
#{
noteable_text
}
"
-
noteable_text
=
%(#{noteable.title} (#{noteable.to_reference}))
-
page_title
titl
e
-
page_title
"Unsubscribe"
,
noteable_text
,
@sent_notification
.
noteable_type
.
humanize
.
pluralize
,
@sent_notification
.
project
.
name_with_namespac
e
%h3
.page-title
=
title
%p
=
"Are you sure you want to unsubscribe from
#{
noteable_text
}
?"
%h3
.page-title
Unsubscribe from
#{
noteable_type
}
#{
noteable_text
}
%p
=
succeed
'?'
do
Are you sure you want to unsubscribe from
#{
noteable_type
}
=
link_to
noteable_text
,
url_for
([
@sent_notification
.
project
.
namespace
.
becomes
(
Namespace
),
@sent_notification
.
project
,
noteable
])
%p
=
link_to
'Unsubscribe'
,
unsubscribe_sent_notification_path
(
@sent_notification
,
force:
true
),
...
...
spec/features/unsubscribe_links_spec.rb
View file @
ce12749a
...
...
@@ -24,8 +24,8 @@ describe 'Unsubscribe links', feature: true do
visit
body_link
expect
(
current_path
).
to
eq
unsubscribe_sent_notification_path
(
SentNotification
.
last
)
expect
(
page
).
to
have_text
(
%(Unsubscribe from issue
"#{issue.title}"
(#{issue.to_reference}))
)
expect
(
page
).
to
have_text
(
%(Are you sure you want to unsubscribe from issue
"#{issue.title}"
(#{issue.to_reference})?)
)
expect
(
page
).
to
have_text
(
%(Unsubscribe from issue
#{issue.title}
(#{issue.to_reference}))
)
expect
(
page
).
to
have_text
(
%(Are you sure you want to unsubscribe from issue
#{issue.title}
(#{issue.to_reference})?)
)
expect
(
issue
.
subscribed?
(
recipient
)).
to
be_truthy
click_link
'Unsubscribe'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment