Commit 2e42c5b1 authored by Frédéric Caplette's avatar Frédéric Caplette Committed by Nicolò Maria Mezzopera

Link Pipeline Editor button to open in correct branch

When previewing a gitlab config file in the repository view,
you can click on the "Pipeline Editor" button to open it in
the Pipeline editor section. If you were previewing the file
in a branch other than `main`, then it would not carry over
when landing in the section. This commit changes that.

Changelog: changed
parent 7b825459
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
= edit_blob_button(@project, @ref, @path, blob: blob) = edit_blob_button(@project, @ref, @path, blob: blob)
= ide_edit_button(@project, @ref, @path, blob: blob) = ide_edit_button(@project, @ref, @path, blob: blob)
- if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default - if can_view_pipeline_editor?(@project) && @path == @project.ci_config_path_or_default
= link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project), class: "btn gl-button btn-confirm-secondary gl-ml-3" = link_to "Pipeline Editor", project_ci_pipeline_editor_path(@project, branch_name: @ref), class: "btn gl-button btn-confirm-secondary gl-ml-3"
.btn-group{ role: "group", class: ("gl-ml-3" if current_user) }> .btn-group{ role: "group", class: ("gl-ml-3" if current_user) }>
= render_if_exists 'projects/blob/header_file_locks_link' = render_if_exists 'projects/blob/header_file_locks_link'
- if current_user - if current_user
......
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