Merge commit 'master' into discussions
Conflicts: app/assets/stylesheets/sections/notes.scss app/contexts/notes/load_context.rb app/models/project.rb app/observers/note_observer.rb app/roles/votes.rb app/views/commit/show.html.haml app/views/merge_requests/_show.html.haml app/views/merge_requests/diffs.js.haml app/views/merge_requests/show.js.haml app/views/notes/_note.html.haml features/steps/project/project_merge_requests.rb spec/models/note_spec.rb
This commit is contained in:
commit
3022786948
930 changed files with 80374 additions and 103682 deletions
|
@ -1,11 +1,12 @@
|
|||
class Notify < ActionMailer::Base
|
||||
include Resque::Mailer
|
||||
|
||||
add_template_helper ApplicationHelper
|
||||
add_template_helper GitlabMarkdownHelper
|
||||
|
||||
default_url_options[:host] = Gitlab.config.gitlab.host
|
||||
default_url_options[:protocol] = Gitlab.config.gitlab.protocol
|
||||
default_url_options[:port] = Gitlab.config.gitlab.port if Gitlab.config.gitlab_on_non_standard_port?
|
||||
default_url_options[:script_name] = Gitlab.config.gitlab.relative_url_root
|
||||
|
||||
default from: Gitlab.config.gitlab.email_from
|
||||
|
||||
|
@ -87,7 +88,7 @@ class Notify < ActionMailer::Base
|
|||
def note_wall_email(recipient_id, note_id)
|
||||
@note = Note.find(note_id)
|
||||
@project = @note.project
|
||||
mail(to: recipient(recipient_id), subject: subject)
|
||||
mail(to: recipient(recipient_id), subject: subject("note on wall"))
|
||||
end
|
||||
|
||||
|
||||
|
@ -147,12 +148,15 @@ class Notify < ActionMailer::Base
|
|||
# >> @project = Project.last
|
||||
# => #<Project id: 1, name: "Ruby on Rails", path: "ruby_on_rails", ...>
|
||||
# >> subject('Lorem ipsum')
|
||||
# => "GitLab | Lorem ipsum | Ruby on Rails"
|
||||
# => "GitLab | Ruby on Rails | Lorem ipsum "
|
||||
#
|
||||
# # Accepts multiple arguments
|
||||
# >> subject('Lorem ipsum', 'Dolor sit amet')
|
||||
# => "GitLab | Lorem ipsum | Dolor sit amet"
|
||||
def subject(*extra)
|
||||
"GitLab | " << extra.join(' | ') << (@project ? " | #{@project.name}" : "")
|
||||
subject = "GitLab"
|
||||
subject << (@project ? " | #{@project.name_with_namespace}" : "")
|
||||
subject << " | " + extra.join(' | ') if extra.present?
|
||||
subject
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue