Commit eaad236b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove project-issuable-filter from admin builds page :)

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 92586360
...@@ -29,17 +29,6 @@ ...@@ -29,17 +29,6 @@
} }
} }
.project-issuable-filter {
.controls {
float: right;
margin-top: 11px;
}
.nav-links {
text-align: left;
}
}
.issuable-details { .issuable-details {
section { section {
.issuable-discussion { .issuable-discussion {
......
.project-issuable-filter .top-area
.controls
.pull-left.hidden-xs
- if @all_builds.running_or_pending.any?
= link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
%ul.nav-links %ul.nav-links
%li{class: ('active' if @scope.nil?)} %li{class: ('active' if @scope.nil?)}
= link_to admin_builds_path do = link_to admin_builds_path do
...@@ -20,7 +15,11 @@ ...@@ -20,7 +15,11 @@
Finished Finished
%span.badge.js-running-count= number_with_delimiter(@all_builds.finished.count(:id)) %span.badge.js-running-count= number_with_delimiter(@all_builds.finished.count(:id))
.gray-content-block .nav-controls
- if @all_builds.running_or_pending.any?
= link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
.gray-content-block.second-block
#{(@scope || 'running').capitalize} builds #{(@scope || 'running').capitalize} builds
%ul.content-list %ul.content-list
......
...@@ -18,7 +18,7 @@ describe 'Admin Builds' do ...@@ -18,7 +18,7 @@ describe 'Admin Builds' do
visit admin_builds_path visit admin_builds_path
expect(page).to have_selector('.project-issuable-filter li.active', text: 'All') expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page.all('.build-link').size).to eq(4) expect(page.all('.build-link').size).to eq(4)
expect(page).to have_link 'Cancel all' expect(page).to have_link 'Cancel all'
end end
...@@ -28,7 +28,7 @@ describe 'Admin Builds' do ...@@ -28,7 +28,7 @@ describe 'Admin Builds' do
it 'shows a message' do it 'shows a message' do
visit admin_builds_path visit admin_builds_path
expect(page).to have_selector('.project-issuable-filter li.active', text: 'All') expect(page).to have_selector('.nav-links li.active', text: 'All')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No builds to show'
expect(page).not_to have_link 'Cancel all' expect(page).not_to have_link 'Cancel all'
end end
...@@ -44,7 +44,7 @@ describe 'Admin Builds' do ...@@ -44,7 +44,7 @@ describe 'Admin Builds' do
visit admin_builds_path(scope: :running) visit admin_builds_path(scope: :running)
expect(page).to have_selector('.project-issuable-filter li.active', text: 'Running') expect(page).to have_selector('.nav-links li.active', text: 'Running')
expect(page.find('.build-link')).to have_content(build1.id) expect(page.find('.build-link')).to have_content(build1.id)
expect(page.find('.build-link')).not_to have_content(build2.id) expect(page.find('.build-link')).not_to have_content(build2.id)
expect(page.find('.build-link')).not_to have_content(build3.id) expect(page.find('.build-link')).not_to have_content(build3.id)
...@@ -58,7 +58,7 @@ describe 'Admin Builds' do ...@@ -58,7 +58,7 @@ describe 'Admin Builds' do
visit admin_builds_path(scope: :running) visit admin_builds_path(scope: :running)
expect(page).to have_selector('.project-issuable-filter li.active', text: 'Running') expect(page).to have_selector('.nav-links li.active', text: 'Running')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No builds to show'
expect(page).not_to have_link 'Cancel all' expect(page).not_to have_link 'Cancel all'
end end
...@@ -74,7 +74,7 @@ describe 'Admin Builds' do ...@@ -74,7 +74,7 @@ describe 'Admin Builds' do
visit admin_builds_path(scope: :finished) visit admin_builds_path(scope: :finished)
expect(page).to have_selector('.project-issuable-filter li.active', text: 'Finished') expect(page).to have_selector('.nav-links li.active', text: 'Finished')
expect(page.find('.build-link')).not_to have_content(build1.id) expect(page.find('.build-link')).not_to have_content(build1.id)
expect(page.find('.build-link')).not_to have_content(build2.id) expect(page.find('.build-link')).not_to have_content(build2.id)
expect(page.find('.build-link')).to have_content(build3.id) expect(page.find('.build-link')).to have_content(build3.id)
...@@ -88,7 +88,7 @@ describe 'Admin Builds' do ...@@ -88,7 +88,7 @@ describe 'Admin Builds' do
visit admin_builds_path(scope: :finished) visit admin_builds_path(scope: :finished)
expect(page).to have_selector('.project-issuable-filter li.active', text: 'Finished') expect(page).to have_selector('.nav-links li.active', text: 'Finished')
expect(page).to have_content 'No builds to show' expect(page).to have_content 'No builds to show'
expect(page).to have_link 'Cancel all' expect(page).to have_link 'Cancel all'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment