-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move 'Branch Existing Package' to its own page
- Loading branch information
Dany Marcoux
committed
May 19, 2020
1 parent
f58f6fc
commit faa6dcf
Showing
12 changed files
with
79 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 11 additions & 1 deletion
12
src/api/app/controllers/webui/packages/branches_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 14 additions & 8 deletions
22
src/api/app/views/webui/packages/branches/_breadcrumb_items.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,18 @@ | ||
= render partial: 'webui/project/breadcrumb_items' | ||
|
||
%li.breadcrumb-item.text-word-break-all | ||
- if flipper_responsive? | ||
%i.fa.fa-archive | ||
= link_to(@package, package_show_path(@project, @package)) | ||
- else | ||
= link_to truncate(@package.to_s, length: 50), package_show_path(@project, @package) | ||
|
||
- if current_page?(new_package_branches_path(package_name: @package, project: @project)) | ||
-# The package doesn't exist when the user is selecting which package to branch into | ||
their project, so we don't check other paths below to avoid exceptions | ||
- if current_page?(project_new_packages_branch_path(@project)) | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
Branch Package | ||
- else | ||
%li.breadcrumb-item.text-word-break-all | ||
- if flipper_responsive? | ||
%i.fa.fa-archive | ||
= link_to(@package, package_show_path(@project, @package)) | ||
- else | ||
= link_to truncate(@package.to_s, length: 50), package_show_path(@project, @package) | ||
|
||
- if current_page?(new_package_branches_path(package_name: @package, project: @project)) | ||
%li.breadcrumb-item.active{ 'aria-current' => 'page' } | ||
Branch Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
- @pagetitle = "Branch Package Into #{@project}" | ||
|
||
.row | ||
.col | ||
.card | ||
= render partial: 'webui/project/tabs', locals: { project: @project } | ||
.card-body | ||
.row | ||
.col-12 | ||
%h3= @pagetitle | ||
.col-12.col-md-8 | ||
%p | ||
By branching a package from another project, you add the package and its files to your project in a transparent way. | ||
Changes of the files in the original project will also change the files in the branched package in your project. | ||
You can add patches to the branched package without affecting the original package. | ||
- unless @remote_projects.empty? | ||
%p | ||
Branches also work across interconnected OBS instances. This OBS instance has | ||
#{pluralize(@remote_projects.count, 'interconnect')}. | ||
%ul.list-inline | ||
- @remote_projects.each do |_id, name, title| | ||
%li.list-inline-item | ||
= link_to("#{name}: #{title}", project_show_path(project: name)) | ||
.col-12.col-md-9.col-lg-6 | ||
= form_tag(packages_branches_path) do | ||
= render partial: 'webui/shared/autocomplete', locals: { html_id: 'linked_project', label: 'Original project name', | ||
data: { source: autocomplete_projects_path } } | ||
= render partial: 'webui/shared/autocomplete', locals: { html_id: 'linked_package', label: 'Original package name', | ||
data: { source: autocomplete_packages_path } } | ||
= hidden_field_tag 'target_project', @project | ||
= render partial: 'webui/shared/package_branch_form', locals: { show_project_field: false, target_project: @project, | ||
package: nil, revision: nil } | ||
= submit_tag('Branch', class: 'btn btn-primary px-4 mt-3') |
32 changes: 0 additions & 32 deletions
32
src/api/app/views/webui/project/_new_package_branch_modal.html.haml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters