#40: small refactoring of DOM model

This commit is contained in:
Vokhmin Alexey V 2013-03-22 18:29:18 +04:00
parent 580068f93d
commit 817715b9c4
2 changed files with 11 additions and 10 deletions

View File

@ -982,7 +982,7 @@ table.diff {
} }
/* Mass build forms */ /* Mass build forms */
.mass-build-actions form input { .mass-build-actions a.button {
margin-bottom: 5px; margin-bottom: 5px;
} }

View File

@ -45,17 +45,18 @@
=link_to_list @platform, mass_build, 'failed_builds_list' =link_to_list @platform, mass_build, 'failed_builds_list'
%td.right.mass-build-actions %td.right.mass-build-actions
- if can?(:publish, mass_build) - if can?(:publish, mass_build)
- url = publish_platform_mass_build_path(@platform, mass_build.id)
- unless mass_build.auto_publish? - unless mass_build.auto_publish?
= form_for :build, :url => url do |f| = link_to t('layout.mass_builds.publish_success'),
= f.submit t("layout.mass_builds.publish_success") publish_platform_mass_build_path(@platform, mass_build.id),
= form_for :build, :url => url do |f| :method => :post, :confirm => t("layout.confirm"), :class => 'button'
= hidden_field_tag "build-status", 'test_failed', :name => "status" = link_to t('layout.mass_builds.publish_test_failed'),
= f.submit t("layout.mass_builds.publish_test_failed") publish_platform_mass_build_path(@platform, mass_build.id, :status => 'test_failed'),
:method => :post, :confirm => t("layout.confirm"), :class => 'button'
- if can?(:cancel, mass_build) - if can?(:cancel, mass_build)
= form_for :build, :url => cancel_platform_mass_build_path(@platform, mass_build.id) do |f| = link_to t('layout.cancel'),
= f.submit t('layout.cancel'), :confirm => t('layout.mass_builds.cancel_confirm') cancel_platform_mass_build_path(@platform, mass_build.id),
:method => :post, :class => 'button',
:confirm => t('layout.mass_builds.cancel_confirm')
%td %td
%a.toggle_btn{:href => "#toggle_#{ mass_build.id }", :'data-target' => "#toggle_#{ mass_build.id }"}= t("layout.mass_builds.extended_data") %a.toggle_btn{:href => "#toggle_#{ mass_build.id }", :'data-target' => "#toggle_#{ mass_build.id }"}= t("layout.mass_builds.extended_data")
.toggle{:id => "toggle_#{ mass_build.id }"} .toggle{:id => "toggle_#{ mass_build.id }"}