#757: hide "publish" button when extra build lists have not been published

This commit is contained in:
Vokhmin Alexey V 2013-02-22 16:04:03 +04:00
parent c5d0944ebf
commit d4e2366499
1 changed files with 5 additions and 5 deletions

View File

@ -153,12 +153,12 @@
= submit_tag t("layout.publish_again"), :confirm => t("layout.publish_again_warning"), :name => 'publish'
- elsif @build_list.can_publish?(true)
- if !@build_list.extra_build_lists_published?
- confirm = t('layout.build_lists.publish_with_extra_fail')
- elsif @build_list.tests_failed?
- confirm = t('layout.build_lists.tests_failed')
.flash_notify
.alert.alert-error= t('layout.build_lists.publish_with_extra_fail')
.both
- else
- confirm = t('layout.confirm')
= submit_tag t("layout.publish"), :confirm => confirm, :name => 'publish'
- confirm = @build_list.tests_failed? ? t('layout.build_lists.tests_failed') : t('layout.confirm')
= submit_tag t("layout.publish"), :confirm => confirm, :name => 'publish'
- if @build_list.can_reject_publish? && can?(:reject_publish, @build_list)
= submit_tag t("layout.reject_publish"), :confirm => t("layout.confirm"), :name => 'reject_publish'
- if @build_list.can_create_container? && can?(:create_container, @build_list)