Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0f1351ad
Commit
0f1351ad
authored
Aug 11, 2014
by
Jan-Willem van der Meer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unsubscribe link
parent
aa31260d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
6 deletions
+16
-6
app/mailers/emails/admin_notification.rb
app/mailers/emails/admin_notification.rb
+3
-1
app/views/notify/send_admin_notification.html.haml
app/views/notify/send_admin_notification.html.haml
+7
-1
app/views/notify/send_admin_notification.text.haml
app/views/notify/send_admin_notification.text.haml
+6
-1
app/views/public/unsubscribes/show.html.haml
app/views/public/unsubscribes/show.html.haml
+0
-3
No files found.
app/mailers/emails/admin_notification.rb
View file @
0f1351ad
module
Emails
module
Emails
module
AdminNotification
module
AdminNotification
def
send_admin_notification
(
user_id
,
subject
,
body
)
def
send_admin_notification
(
user_id
,
subject
,
body
)
email
=
recipient
(
user_id
)
@unsubscribe_url
=
public_unsubscribe_url
(
email:
email
)
@body
=
body
@body
=
body
mail
to:
recipient
(
user_id
)
,
subject:
subject
mail
to:
email
,
subject:
subject
end
end
end
end
end
end
\ No newline at end of file
app/views/notify/send_admin_notification.html.haml
View file @
0f1351ad
=
simple_format
@body
=
simple_format
@body
\ No newline at end of file
\----
%p
Don't want to receive updates from GitLab administrators?
=
link_to
'Unsubscribe'
,
@unsubscribe_url
\ No newline at end of file
app/views/notify/send_admin_notification.text.haml
View file @
0f1351ad
=
h
@body
=
h
@body
\ No newline at end of file
\-----
Don't want to receive updates from GitLab administrators?
==
Unsubscribe here:
#{
@unsubscribe_url
}
\ No newline at end of file
app/views/public/unsubscribes/show.html.haml
View file @
0f1351ad
%h3
.page-title
Unsubscribe from Admin notifications
%h3
.page-title
Unsubscribe from Admin notifications
%p
Don't want to receive any updates from your system administrator.
By clicking the confirmation button you'll no longer receive these notifications
%hr
%hr
=
form_tag
public_unsubscribe_path
(
@email
)
do
=
form_tag
public_unsubscribe_path
(
@email
)
do
...
...
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