#881: add "use_save_to_repository" into BuildList

This commit is contained in:
Vokhmin Alexey V 2013-02-01 14:00:56 +04:00
parent 3f3edfe1d9
commit e9d666877c
7 changed files with 16 additions and 2 deletions

View File

@ -9,10 +9,13 @@ $(document).ready(function() {
var build_platform = $('#build_for_pl_' + platform_id);
var all_repositories = $('.all_platforms input');
all_repositories.removeAttr('checked');
var use_save_to_repository = $('#build_list_use_save_to_repository');
if (build_platform.size() == 0) {
all_repositories.removeAttr('disabled');
use_save_to_repository.removeAttr('disabled');
} else {
use_save_to_repository.attr('disabled', 'disabled');
all_repositories.attr('disabled', 'disabled');
var parent = build_platform.parent();
parent.find('input').removeAttr('disabled');

View File

@ -45,7 +45,7 @@ class BuildList < ActiveRecord::Base
attr_accessible :include_repos, :auto_publish, :build_for_platform_id, :commit_hash,
:arch_id, :project_id, :save_to_repository_id, :update_type,
:save_to_platform_id, :project_version
:save_to_platform_id, :project_version, :use_save_to_repository
LIVE_TIME = 4.week # for unpublished
MAX_LIVE_TIME = 3.month # for published

View File

@ -13,6 +13,9 @@
%section.right
%h3= t("activerecord.attributes.build_list.save_to_repository")
.lineForm= f.select :save_to_repository_id, @project.repositories.collect{|r| ["#{r.platform.name}/#{r.name}", r.id, {:publish_without_qa => r.publish_without_qa? ? 1 : 0, :platform_id => r.platform.id}]}
.both
= f.check_box :use_save_to_repository
= f.label :use_save_to_repository
%h3= t("activerecord.attributes.build_list.project_version")
.lineForm= f.select :project_version, versions_for_group_select(@project), :selected => params[:build_list].try(:fetch, :project_version) || @project.default_branch
%h3= t("activerecord.attributes.build_list.arch")

View File

@ -20,6 +20,7 @@ en:
include_repos: Included repositories
created_at: Created on
save_to_repository: Save to repository
use_save_to_repository: Use repository on building
build_for_platform: Build for platform
update_type: Update type
auto_publish: Automated publising

View File

@ -20,6 +20,7 @@ ru:
include_repos: Подключаемые репозитории
created_at: Создан
save_to_repository: Сохранить в репозиторий
use_save_to_repository: Использовать репозиторий при сборке
build_for_platform: Собрано для платформы
update_type: Критичность обновления
auto_publish: Автоматическая публикация

View File

@ -0,0 +1,5 @@
class AddUsePersonalRepositoryToBuildList < ActiveRecord::Migration
def change
add_column :build_lists, :use_save_to_repository, :boolean
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 => 20130129145833) do
ActiveRecord::Schema.define(:version => 20130201094007) do
create_table "activity_feeds", :force => true do |t|
t.integer "user_id", :null => false
@ -133,6 +133,7 @@ ActiveRecord::Schema.define(:version => 20130129145833) do
t.boolean "new_core", :default => true
t.string "last_published_commit_hash"
t.integer "container_status"
t.boolean "use_save_to_repository"
end
add_index "build_lists", ["advisory_id"], :name => "index_build_lists_on_advisory_id"