#328: rename field: new_commit to update_code
This commit is contained in:
parent
f064e19249
commit
9ab0e1be6f
|
@ -86,7 +86,7 @@ class UserMailer < ActionMailer::Base
|
|||
set_locale user
|
||||
mail(
|
||||
:to => user.email,
|
||||
:subject => I18n.t('notifications.subjects.new_commit', :project_name => "#{options[:project_owner]}/#{options[:project_name]}")
|
||||
:subject => I18n.t('notifications.subjects.update_code', :project_name => "#{options[:project_owner]}/#{options[:project_name]}")
|
||||
) do |format|
|
||||
format.html { render 'git_delete_branch_notification', :locals => options }
|
||||
end
|
||||
|
@ -96,7 +96,7 @@ class UserMailer < ActionMailer::Base
|
|||
set_locale user
|
||||
mail(
|
||||
:to => user.email,
|
||||
:subject => I18n.t('notifications.subjects.new_commit', :project_name => "#{options[:project_owner]}/#{options[:project_name]}")
|
||||
:subject => I18n.t('notifications.subjects.update_code', :project_name => "#{options[:project_owner]}/#{options[:project_name]}")
|
||||
) do |format|
|
||||
format.html { render 'git_new_push_notification', :locals => options }
|
||||
end
|
||||
|
|
|
@ -2,7 +2,7 @@ json.user do
|
|||
json.(@user, :id)
|
||||
json.notifiers do
|
||||
json.(@user.notifier, :can_notify, :new_comment, :new_comment_reply, :new_issue, :issue_assign, :new_comment_commit_owner, :new_comment_commit_repo_owner, :new_comment_commit_commentor, :new_build, :new_associated_build,
|
||||
:new_commit)
|
||||
:update_code)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
= form_for @user.notifier, :url => notifiers_settings_path, :html => {:class => :form} do |f|
|
||||
= render 'notifier', :f => f, :field => :can_notify
|
||||
%h3= t("layout.settings.notifiers.code_header")
|
||||
- [:new_commit, :new_comment_commit_owner, :new_comment_commit_repo_owner, :new_comment_commit_commentor].each do |field|
|
||||
- [:update_code, :new_comment_commit_owner, :new_comment_commit_repo_owner, :new_comment_commit_commentor].each do |field|
|
||||
= render 'notifier', :f => f, :field => field
|
||||
%h3= t("layout.settings.notifiers.tracker_header")
|
||||
- [:new_comment, :new_comment_reply, :new_issue, :issue_assign].each do |field|
|
||||
|
|
|
@ -188,7 +188,7 @@ en:
|
|||
new_comment_reply: New reply of comment notifications
|
||||
new_issue: New task notifications
|
||||
issue_assign: New task assignment notifications
|
||||
new_commit: Notify about changes of code in my projects
|
||||
update_code: Notify about changes of code in my projects
|
||||
new_comment_commit_owner: Notify about comments to my commit
|
||||
new_comment_commit_repo_owner: Notify about comments to my repository commits
|
||||
new_comment_commit_commentor: Notify about comments after my commit
|
||||
|
|
|
@ -12,7 +12,7 @@ en:
|
|||
|
||||
notifications:
|
||||
subjects:
|
||||
new_commit: "[%{project_name}] Update of project"
|
||||
update_code: "[%{project_name}] Update of project"
|
||||
new_comment_notification: New comment to your task
|
||||
new_commit_comment_notification: New comment to commit
|
||||
new_issue_notification: New task added to project
|
||||
|
|
|
@ -12,7 +12,7 @@ ru:
|
|||
|
||||
notifications:
|
||||
subjects:
|
||||
new_commit: "[%{project_name}] Обновление проекта"
|
||||
update_code: "[%{project_name}] Обновление проекта"
|
||||
new_comment_notification: Новый комментарий к Вашей задаче
|
||||
new_commit_comment_notification: Новый комментарий к коммиту
|
||||
new_issue_notification: Новая задача добавлена к проекту
|
||||
|
|
|
@ -188,7 +188,7 @@ ru:
|
|||
new_comment_reply: Оповещать о новом ответе на мой комментарий
|
||||
new_issue: Оповещать о новых задачах в моих проектах
|
||||
issue_assign: Оповещать, когда на меня выставляют задачу
|
||||
new_commit: Оповещать об изменении кода в моих проектах
|
||||
update_code: Оповещать об изменении кода в моих проектах
|
||||
new_comment_commit_owner: Оповещать о комментариях к моему коммиту
|
||||
new_comment_commit_repo_owner: Оповещать о комментариях к коммитам в моем репозитории
|
||||
new_comment_commit_commentor: Оповещать о комментариях к коммиту после моего
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class AddNewCommitToSettingsNotifier < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :settings_notifiers, :new_commit, :boolean, :default => false
|
||||
add_column :settings_notifiers, :update_code, :boolean, :default => false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -524,7 +524,7 @@ ActiveRecord::Schema.define(:version => 20131126154305) do
|
|||
t.boolean "new_comment_commit_commentor", :default => true
|
||||
t.boolean "new_build", :default => true
|
||||
t.boolean "new_associated_build", :default => true
|
||||
t.boolean "new_commit", :default => false
|
||||
t.boolean "update_code", :default => false
|
||||
end
|
||||
|
||||
create_table "ssh_keys", :force => true do |t|
|
||||
|
|
|
@ -44,7 +44,7 @@ module Modules::Observers::ActivityFeed::Git
|
|||
:kind => kind,
|
||||
:data => options
|
||||
)
|
||||
if recipient.notifier.can_notify && recipient.notifier.new_commit
|
||||
if recipient.notifier.can_notify && recipient.notifier.update_code
|
||||
UserMailer.send(kind, recipient, options).deliver
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue