From 82b5999e32a1697e6c36f6dd2a9d46050c5e9941 Mon Sep 17 00:00:00 2001 From: "konstantin.grabar" Date: Mon, 28 May 2012 14:28:19 +0400 Subject: [PATCH 1/2] [refs #442] Add sidebar --- app/assets/stylesheets/design/custom.scss | 8 ++++++++ app/helpers/application_helper.rb | 2 +- app/views/platforms/base/_sidebar.html.haml | 3 ++- app/views/platforms/platforms/build_all.html.haml | 5 ++++- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index acd75d9f6..481b8855f 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -957,3 +957,11 @@ form.mass_build input[type="checkbox"] { .bottom_20 { margin-bottom: 20px; } + +form.mass_build section.left { + margin-left: 50px; +} + +form.mass_build section.right { + margin-right: 50px; +} diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 74a0c3229..86f9d69cd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -9,7 +9,7 @@ module ApplicationHelper when controller_name == 'build_lists' && ['new', 'create'].include?(action_name) nil when controller_name == 'platforms' && ['build_all', 'mass_builds'].include?(action_name) - nil + 'right slim' when controller_name == 'platforms' && action_name == 'show' 'right bigpadding' when controller_name == 'platforms' && action_name == 'clone' diff --git a/app/views/platforms/base/_sidebar.html.haml b/app/views/platforms/base/_sidebar.html.haml index eaa4c6eeb..cee905a34 100644 --- a/app/views/platforms/base/_sidebar.html.haml +++ b/app/views/platforms/base/_sidebar.html.haml @@ -11,7 +11,8 @@ %li{:class => (contr == :repositories) ? 'active' : ''} = link_to t("layout.repositories.list_header"), platform_repositories_path(@platform) - if can? :mass_builds, @platform - %li= link_to t("layout.platforms.mass_build"), mass_builds_platform_path(@platform) + %li{:class => (contr == :platforms && [:mass_builds, :build_all].include?(act)) ? 'active' : ''} + = link_to t("layout.platforms.mass_build"), mass_builds_platform_path(@platform) - if can? :read, @platform.products.build %li{:class => (contr == :products) ? 'active' : ''} = link_to t("layout.products.list_header"), platform_products_path(@platform) diff --git a/app/views/platforms/platforms/build_all.html.haml b/app/views/platforms/platforms/build_all.html.haml index 682ed72ca..5d55e2e35 100644 --- a/app/views/platforms/platforms/build_all.html.haml +++ b/app/views/platforms/platforms/build_all.html.haml @@ -1,3 +1,6 @@ += render 'submenu' += render 'sidebar' + = form_for :build, :url => build_all_platform_path(@platform), :html => { :class => 'form mass_build', :method => :post } do |f| %section.left %h3= t("layout.mass_builds.repositories") @@ -22,7 +25,7 @@ %br %br -%table.tablesorter.unbordered +%table.tablesorter %thead %tr %th.lpadding16= t('activerecord.attributes.mass_build.name') From ce762be5626dfe8bd4a14a4f9963fb60159c35b9 Mon Sep 17 00:00:00 2001 From: "konstantin.grabar" Date: Mon, 28 May 2012 18:41:51 +0400 Subject: [PATCH 2/2] [refs #442] Add unbordered style to mass builds table --- app/views/platforms/platforms/build_all.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/platforms/platforms/build_all.html.haml b/app/views/platforms/platforms/build_all.html.haml index 5d55e2e35..afdeea268 100644 --- a/app/views/platforms/platforms/build_all.html.haml +++ b/app/views/platforms/platforms/build_all.html.haml @@ -25,7 +25,7 @@ %br %br -%table.tablesorter +%table.tablesorter.unbordered %thead %tr %th.lpadding16= t('activerecord.attributes.mass_build.name')