diff --git a/src/api/app/assets/stylesheets/webui/breadcrumbs-component.scss b/src/api/app/assets/stylesheets/webui/breadcrumbs-component.scss index 3ff6435c63c..c3ee0bc0fdf 100644 --- a/src/api/app/assets/stylesheets/webui/breadcrumbs-component.scss +++ b/src/api/app/assets/stylesheets/webui/breadcrumbs-component.scss @@ -4,7 +4,7 @@ ol.breadcrumb { & li { font-size: 0.9rem; - &.active { + .active, &.active { color: var(--breadcrumbs-item-text-color); font-weight: bold; } @@ -13,4 +13,4 @@ ol.breadcrumb { color: var(--breadcrumbs-item-text-color); } } -} \ No newline at end of file +} diff --git a/src/api/app/controllers/webui/packages/binaries_controller.rb b/src/api/app/controllers/webui/packages/binaries_controller.rb index af1a722aeb1..692ae802ae5 100644 --- a/src/api/app/controllers/webui/packages/binaries_controller.rb +++ b/src/api/app/controllers/webui/packages/binaries_controller.rb @@ -12,6 +12,7 @@ class BinariesController < Webui::WebuiController before_action :set_project before_action :set_package + before_action :set_multibuild_flavor before_action :set_repository before_action :set_architecture, only: %i[show dependency filelist] before_action :set_dependant_project, only: :dependency @@ -117,6 +118,10 @@ def set_filename @filename = File.basename(params[:binary_filename] || params[:filename]) end + def set_multibuild_flavor + @multibuild_flavor = @package_name.gsub(/.*:/, '') if @package_name.present? && @package_name.include?(':') + end + # Get an URL to a binary produced by the build. # In the published repo for everyone, in the backend directly only for logged in users. def download_url_for_binary(architecture_name:, file_name:) diff --git a/src/api/app/views/webui/package/_breadcrumb_items.html.haml b/src/api/app/views/webui/package/_breadcrumb_items.html.haml index 2a80bfd922a..5709f6eda5a 100644 --- a/src/api/app/views/webui/package/_breadcrumb_items.html.haml +++ b/src/api/app/views/webui/package/_breadcrumb_items.html.haml @@ -7,7 +7,11 @@ - else %li.breadcrumb-item.text-word-break-all %i.fa.fa-archive - = link_to(@package, package_show_path(@project, @package)) + = precede link_to(@package, package_show_path(@project, @package)) do + - if @multibuild_flavor.present? + %span.active= ":#{@multibuild_flavor}" + - else + = nil - if current_page?(package_view_revisions_path(@project, @package)) %li.breadcrumb-item.active{ 'aria-current' => 'page' } Revisions