From 817715b9c44adb254068009a22e933fa2a4dec26 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 22 Mar 2013 18:29:18 +0400 Subject: [PATCH] #40: small refactoring of DOM model --- app/assets/stylesheets/design/custom.scss | 2 +- .../platforms/mass_builds/index.html.haml | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 96a2997bc..3596c1973 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -982,7 +982,7 @@ table.diff { } /* Mass build forms */ -.mass-build-actions form input { +.mass-build-actions a.button { margin-bottom: 5px; } diff --git a/app/views/platforms/mass_builds/index.html.haml b/app/views/platforms/mass_builds/index.html.haml index 0a3309580..a5276ea0e 100644 --- a/app/views/platforms/mass_builds/index.html.haml +++ b/app/views/platforms/mass_builds/index.html.haml @@ -45,17 +45,18 @@ =link_to_list @platform, mass_build, 'failed_builds_list' %td.right.mass-build-actions - if can?(:publish, mass_build) - - url = publish_platform_mass_build_path(@platform, mass_build.id) - unless mass_build.auto_publish? - = form_for :build, :url => url do |f| - = f.submit t("layout.mass_builds.publish_success") - = form_for :build, :url => url do |f| - = hidden_field_tag "build-status", 'test_failed', :name => "status" - = f.submit t("layout.mass_builds.publish_test_failed") - + = link_to t('layout.mass_builds.publish_success'), + publish_platform_mass_build_path(@platform, mass_build.id), + :method => :post, :confirm => t("layout.confirm"), :class => 'button' + = link_to 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) - = form_for :build, :url => cancel_platform_mass_build_path(@platform, mass_build.id) do |f| - = f.submit t('layout.cancel'), :confirm => t('layout.mass_builds.cancel_confirm') + = link_to t('layout.cancel'), + cancel_platform_mass_build_path(@platform, mass_build.id), + :method => :post, :class => 'button', + :confirm => t('layout.mass_builds.cancel_confirm') %td %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 }"}