From 2d62a719d0574ab7d0aef04c5cd9d0853e514d23 Mon Sep 17 00:00:00 2001 From: Andriy Dyadyura Date: Wed, 23 Dec 2015 16:54:52 +0100 Subject: new tabs for builds --- app/views/admin/builds/index.html.haml | 12 ++++++------ app/views/projects/builds/index.html.haml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/views/admin/builds/index.html.haml b/app/views/admin/builds/index.html.haml index 55da06a7fe9..672b23bbd1c 100644 --- a/app/views/admin/builds/index.html.haml +++ b/app/views/admin/builds/index.html.haml @@ -5,8 +5,13 @@ = link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post %ul.center-top-menu - %li{class: ('active' if @scope.nil?)} + %li{class: ('active' if @scope == 'all')} = link_to admin_builds_path do + All + %span.badge.js-totalbuilds-count= @all_builds.count(:id) + + %li{class: ('active' if @scope.nil?)} + = link_to admin_builds_path(scope: :running) do Running %span.badge.js-running-count= @all_builds.running_or_pending.count(:id) @@ -15,11 +20,6 @@ Finished %span.badge.js-running-count= @all_builds.finished.count(:id) - %li{class: ('active' if @scope == 'all')} - = link_to admin_builds_path(scope: :all) do - All - %span.badge.js-totalbuilds-count= @all_builds.count(:id) - .gray-content-block #{(@scope || 'running').capitalize} builds diff --git a/app/views/projects/builds/index.html.haml b/app/views/projects/builds/index.html.haml index 1a26908ab11..effc3b08df1 100644 --- a/app/views/projects/builds/index.html.haml +++ b/app/views/projects/builds/index.html.haml @@ -11,6 +11,12 @@ %ul.center-top-menu %li{class: ('active' if @scope.nil?)} = link_to project_builds_path(@project) do + All + %span.badge.js-totalbuilds-count + = number_with_delimiter(@all_builds.count(:id)) + + %li{class: ('active' if @scope == 'running')} + = link_to project_builds_path(@project, scope: :running) do Running %span.badge.js-running-count = number_with_delimiter(@all_builds.running_or_pending.count(:id)) @@ -21,12 +27,6 @@ %span.badge.js-running-count = number_with_delimiter(@all_builds.finished.count(:id)) - %li{class: ('active' if @scope == 'all')} - = link_to project_builds_path(@project, scope: :all) do - All - %span.badge.js-totalbuilds-count - = number_with_delimiter(@all_builds.count(:id)) - .gray-content-block #{(@scope || 'running').capitalize} builds from this project -- cgit v1.2.1