disable creation of dependent projects for builds from RELS

This commit is contained in:
Vokhmin Alexey V 2014-06-18 21:48:18 +04:00
parent 16fd0a106b
commit 4601de81e4
2 changed files with 6 additions and 1 deletions

View File

@ -14,6 +14,11 @@ module BuildListsHelper
end
end
def can_run_dependent_build_lists?(build_list)
build_list.save_to_platform.main? &&
build_list.save_to_platform.distrib_type == 'mdv'
end
def availables_main_platforms
Platform.availables_main_platforms current_user, current_ability
end

View File

@ -220,7 +220,7 @@
'ng-show' => 'build_list.can_create_container'
- if can? :create, @build_list
= link_to t('layout.build_lists.recreate_build_list'), new_project_build_list_path(@build_list.project, build_list_id: @build_list.id), class: 'button'
- if @build_list.save_to_platform.main?
- if can_run_dependent_build_lists?(@build_list)
= link_to t('layout.build_lists.run_build_lists'),
project_build_lists_path(@build_list.project, origin: @build_list.id),
method: :post,