Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix padding issues in 'Test job' view and track a branch page #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ var TestJobPresenter = React.createClass({

render: function () {
return (
<div>
<div className='row panelized m-t-10'>
<div className='panelized'>
<div className='row m-t-10'>
<ReactCSSTransitionGroup
transitionName="build-react-style"
transitionAppear={true}
Expand All @@ -81,7 +81,7 @@ var TestJobPresenter = React.createClass({
key={2} />
</div>
</div>
<div className='row panelized'>
<div className='row'>
<div className='col-xs-12'>
<TestJobList
test_jobs={this.state.testJobs}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/dashboard/custom-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@
border: 1px solid #e9e9e9;
background-color: #fff;
border-radius: 4px;
padding: 10px;
padding: 10px 20px;

h3 {
margin-top: px;
Expand Down
119 changes: 60 additions & 59 deletions app/views/tracked_branches/new.html.haml
Original file line number Diff line number Diff line change
@@ -1,61 +1,62 @@
.row.m-t-10.panelized
.col-xs-12
.col-xs-12.track-branch-title
%h4
Select a branch to track from the
%strong
#{current_project.owner_and_name}
repository
%span{ data: { toggle: "tooltip",
title: "Change the project's settings if you want to track all new branches and avoid tracking them manually." } }
%i.fa.fa-info-circle
.col-xs-12
.col-sm-12
%br
- if @response_data[:branches].any?
.list-group
- @response_data[:branches].each do |branch|
:ruby
if branch[:cannot_import_message]
url = "#"
klass = "disabled"
method = nil
tooltip_options =
{ data: {toggle: 'tooltip', trigger: 'hover'}, title: branch[:cannot_import_message] }
else
url = project_branches_path(current_project, branch_name: branch[:name])
klass = ""
method = :post
tooltip_options = {}
end
.m-t-10.panelized
.row
.col-xs-12
.track-branch-title
%h4
Select a branch to track from the
%strong
#{current_project.owner_and_name}
repository
%span{ data: { toggle: "tooltip",
title: "Change the project's settings if you want to track all new branches and avoid tracking them manually." } }
%i.fa.fa-info-circle
.col-xs-12
.col-sm-12
%br
- if @response_data[:branches].any?
.list-group
- @response_data[:branches].each do |branch|
:ruby
if branch[:cannot_import_message]
url = "#"
klass = "disabled"
method = nil
tooltip_options =
{ data: {toggle: 'tooltip', trigger: 'hover'}, title: branch[:cannot_import_message] }
else
url = project_branches_path(current_project, branch_name: branch[:name])
klass = ""
method = :post
tooltip_options = {}
end

= link_to url, { method: method,
class: "list-group-item #{klass}" }.merge(tooltip_options) do
.list-group-item-heading
#{branch[:name]}
.list-group-separator
- if current_project.repository_provider == 'github'
- page_manager = GithubPageManager.new(@response_data[:last_response])
- if page_manager.all_pages_number > 1 && (next_page = page_manager.next_page_number)
= link_to "Fetch more...", fetch_branches_project_branches_path(page: next_page),
id: 'fetch_more', class: 'btn btn-default btn-lg btn-block',
data: { disable_with: with_dots('Fetching branches'), remote: true }
= link_to url, { method: method,
class: "list-group-item #{klass}" }.merge(tooltip_options) do
.list-group-item-heading
#{branch[:name]}
.list-group-separator
- if current_project.repository_provider == 'github'
- page_manager = GithubPageManager.new(@response_data[:last_response])
- if page_manager.all_pages_number > 1 && (next_page = page_manager.next_page_number)
= link_to "Fetch more...", fetch_branches_project_branches_path(page: next_page),
id: 'fetch_more', class: 'btn btn-default btn-lg btn-block',
data: { disable_with: with_dots('Fetching branches'), remote: true }

- else
%h2 No branches found! None. Zero. Zilch. Nada.
We were unable to find any branches in the '#{current_project.repository_name}'. That's weird...
- if @branches
- if @branches.empty?
%p
%h2 No branches found! None. Zero. Zilch. Nada.
We were unable to find any branches in the '#{current_project.repository_name}'. That's weird...
- else
%ul.list-group
.branches
- @branches.each do |branch|
%li.list-unstyled
= link_to branch.branch_name,
project_branches_path(current_project,
branch_name: branch.branch_name),
method: :post,
class: 'btn btn-raised btn-default btn-custom btn-block m-b-5'
- else
%h2 No branches found! None. Zero. Zilch. Nada.
We were unable to find any branches in the '#{current_project.repository_name}'. That's weird...
- if @branches
- if @branches.empty?
%p
%h2 No branches found! None. Zero. Zilch. Nada.
We were unable to find any branches in the '#{current_project.repository_name}'. That's weird...
- else
%ul.list-group
.branches
- @branches.each do |branch|
%li.list-unstyled
= link_to branch.branch_name,
project_branches_path(current_project,
branch_name: branch.branch_name),
method: :post,
class: 'btn btn-raised btn-default btn-custom btn-block m-b-5'