#575: added migration, updated Settings page

This commit is contained in:
Vokhmin Alexey V 2012-09-14 20:12:48 +04:00
parent c690a8446a
commit 01576702a0
6 changed files with 26 additions and 25 deletions

View File

@ -0,0 +1,3 @@
.leftside.w25= f.check_box field
.leftside= f.label field, t("activerecord.attributes.settings.notifier.#{field}")
.both

View File

@ -7,32 +7,16 @@
%br
= form_for @user.notifier, :url => notifiers_settings_path, :html => {:class => :form} do |f|
.leftside.w25= f.check_box :can_notify
.leftside= f.label :can_notify, t('activerecord.attributes.settings.notifier.can_notify')
.both
= render 'notifier', :f => f, :field => :can_notify
%h3= t("layout.settings.notifiers.code_header")
.leftside.w25= f.check_box :new_comment_commit_owner, :class => 'notify_cbx'
.leftside= f.label :new_comment_commit_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_owner')
.both
.leftside.w25= f.check_box :new_comment_commit_repo_owner, :class => 'notify_cbx'
.leftside= f.label :new_comment_commit_repo_owner, t('activerecord.attributes.settings.notifier.new_comment_commit_repo_owner')
.both
.leftside.w25= f.check_box :new_comment_commit_commentor, :class => 'notify_cbx'
.leftside= f.label :new_comment_commit_commentor, t('activerecord.attributes.settings.notifier.new_comment_commit_commentor')
.both
- [: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")
.leftside.w25= f.check_box :new_comment, :class => 'notify_cbx'
.leftside= f.label :new_comment, t('activerecord.attributes.settings.notifier.new_comment')
.both
.leftside.w25= f.check_box :new_comment_reply, :class => 'notify_cbx'
.leftside= f.label :new_comment_reply, t('activerecord.attributes.settings.notifier.new_comment_reply')
.both
.leftside.w25= f.check_box :new_issue, :class => 'notify_cbx'
.leftside= f.label :new_issue, t('activerecord.attributes.settings.notifier.new_issue')
.both
.leftside.w25= f.check_box :issue_assign, :class => 'notify_cbx'
.leftside= f.label :issue_assign, t('activerecord.attributes.settings.notifier.issue_assign')
.both
- [:new_comment, :new_comment_reply, :new_issue, :issue_assign].each do |field|
= render 'notifier', :f => f, :field => field
%h3= t("layout.settings.notifiers.build_list_header")
- [:new_build, :new_associated_build].each do |field|
= render 'notifier', :f => f, :field => field
%br
.leftside.w25

View File

@ -57,6 +57,7 @@ en:
change_email_link: Change email address
code_header: Code
tracker_header: Tracker
build_list_header: Build List
devise:
shared_links:
@ -178,6 +179,8 @@ en:
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
new_build: Notify about my build tasks
new_associated_build: Notify about associated with me build tasks
private_user:
login: Login

View File

@ -57,6 +57,7 @@ ru:
change_email_link: Изменить адрес электронной почты
code_header: Код
tracker_header: Трекер задач
build_list_header: Сборочные задания
devise:
shared_links:
@ -179,6 +180,8 @@ ru:
new_comment_commit_owner: Оповещать о комментариях к моему коммиту
new_comment_commit_repo_owner: Оповещать о комментариях к коммитам в моем репозитории
new_comment_commit_commentor: Оповещать о комментариях к коммиту после моего
new_build: Оповещать о моих сборочных заданиях
new_associated_build: Оповещать о связанных со мной сборочных заданиях
private_user:
login: Логин

View File

@ -0,0 +1,6 @@
class AddBuildListNotificationsToSettingsNotifier < ActiveRecord::Migration
def change
add_column :settings_notifiers, :new_build, :boolean, :default => true
add_column :settings_notifiers, :new_associated_build, :boolean, :default => true
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20120910094748) do
ActiveRecord::Schema.define(:version => 20120914160741) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
@ -388,6 +388,8 @@ ActiveRecord::Schema.define(:version => 20120910094748) do
t.boolean "new_comment_commit_owner", :default => true
t.boolean "new_comment_commit_repo_owner", :default => true
t.boolean "new_comment_commit_commentor", :default => true
t.boolean "new_build", :default => true
t.boolean "new_associated_build", :default => true
end
create_table "subscribes", :force => true do |t|