diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-19 19:14:46 +0300 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-19 19:14:46 +0300 |
commit | d927336403a92d340d7e5b2d2328c5a0e029d666 (patch) | |
tree | 53089a4875c6a3599e246fe182305a5d4a186a24 /app/views | |
parent | 85fba09b67c88e50d1567f6452673a5144a68433 (diff) | |
parent | 72d84e48511fcf88b1d9efb622eb37cdff95aa1c (diff) |
Merge branch '21444-pipeliens-new-mr' into 'master'
Add pipelines tab to new MR
#### What does this MR do?
Adds pipelines tab to new MRs
#### Screenshots (if relevant)
![Screen_Shot_2016-10-10_at_10.23.27_AM](/uploads/6c3f8f2be0cf9ba7cc78f6d918307ec0/Screen_Shot_2016-10-10_at_10.23.27_AM.png)
![Screen_Shot_2016-10-11_at_8.59.45_AM](/uploads/e67577d92327eafef6f04073f3d94212/Screen_Shot_2016-10-11_at_8.59.45_AM.png)
#### What are the relevant issue numbers?
Closes #21444
See merge request !6238
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/merge_requests/_new_submit.html.haml | 12 | ||||
-rw-r--r-- | app/views/projects/merge_requests/_show.html.haml | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/app/views/projects/merge_requests/_new_submit.html.haml b/app/views/projects/merge_requests/_new_submit.html.haml index da6927879a4..9c6f562f7db 100644 --- a/app/views/projects/merge_requests/_new_submit.html.haml +++ b/app/views/projects/merge_requests/_new_submit.html.haml @@ -29,7 +29,11 @@ = link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do Commits %span.badge= @commits.size - - if @pipeline + - if @pipelines.any? + %li.builds-tab + = link_to url_for(params), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do + Pipelines + %span.badge= @pipelines.size %li.builds-tab = link_to url_for(params), data: {target: 'div#builds', action: 'builds', toggle: 'tab'} do Builds @@ -44,9 +48,11 @@ = render "projects/merge_requests/show/commits" #diffs.diffs.tab-pane - # This tab is always loaded via AJAX - - if @pipeline + - if @pipelines.any? #builds.builds.tab-pane = render "projects/merge_requests/show/builds" + #pipelines.pipelines.tab-pane + = render "projects/merge_requests/show/pipelines" .mr-loading-status = spinner @@ -59,5 +65,5 @@ :javascript var merge_request = new MergeRequest({ action: "#{(@show_changes_tab ? 'new/diffs' : 'new')}", - buildsLoaded: "#{@pipeline ? 'true' : 'false'}" + buildsLoaded: "#{@pipelines.any? ? 'true' : 'false'}" }); diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml index 5c41db36e44..cd98aaf8d75 100644 --- a/app/views/projects/merge_requests/_show.html.haml +++ b/app/views/projects/merge_requests/_show.html.haml @@ -61,7 +61,7 @@ %li.pipelines-tab = link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#pipelines', action: 'pipelines', toggle: 'tab' } do Pipelines - %span.badge= @merge_request.all_pipelines.size + %span.badge= @pipelines.size %li.builds-tab = link_to builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: { target: '#builds', action: 'builds', toggle: 'tab' } do Builds |