From df36f1f47b7c1dcbe6d34fabd83764ae14919e15 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 2 May 2017 17:47:28 -0500 Subject: Add breadcrumb, build header and pipelines submenu to artifacts browser --- app/controllers/projects/artifacts_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/controllers/projects/artifacts_controller.rb') diff --git a/app/controllers/projects/artifacts_controller.rb b/app/controllers/projects/artifacts_controller.rb index 59222637961..a13588b4218 100644 --- a/app/controllers/projects/artifacts_controller.rb +++ b/app/controllers/projects/artifacts_controller.rb @@ -16,7 +16,8 @@ class Projects::ArtifactsController < Projects::ApplicationController end def browse - directory = params[:path] ? "#{params[:path]}/" : '' + @path = params[:path] + directory = @path ? "#{@path}/" : '' @entry = build.artifacts_metadata_entry(directory) render_404 unless @entry.exists? @@ -60,7 +61,10 @@ class Projects::ArtifactsController < Projects::ApplicationController end def build - @build ||= build_from_id || build_from_ref + @build ||= begin + build = build_from_id || build_from_ref + build&.present(current_user: current_user) + end end def build_from_id -- cgit v1.2.1