Skip to content

Commit

Permalink
[webui] Breadcrumb use package_name instead of package
Browse files Browse the repository at this point in the history
  • Loading branch information
David Kang committed Jun 20, 2018
1 parent 280918a commit 2e05ec6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/api/app/controllers/webui/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def dependency
def statistics
@arch = params[:arch]
@repository = params[:repository]
@package_name = params[:package]

@statistics = nil
begin
@statistics = Statistic.find_hashed(project: @project, package: params[:package], repository: @repository, arch: @arch)
Expand All @@ -143,6 +145,7 @@ def statistics
def binary
@arch = Architecture.find_by_name(params[:arch]).name
@repository = params[:repository]
@package_name = params[:package]
# Ensure it really is just a file name, no '/..', etc.
@filename = File.basename(params[:filename])

Expand Down
2 changes: 1 addition & 1 deletion src/api/app/helpers/webui/package_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def guess_code_class(filename)
include Webui::ProjectHelper

def package_bread_crumb(*args)
args.insert(0, link_to_if(params['action'] != 'show', @package,
args.insert(0, link_to_if(params['action'] != 'show', @package_name || @package,
controller: :package, action: :show,
project: @project, package: @package))
project_bread_crumb(*args)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:ruby
@pagetitle = "Build Reason for #{@project} / #{@package_name}"
@metarobots = 'index,nofollow'
build_reason_breadcrumb(@project, @package, "Build Reason (#{@repository.name} / #{params[:arch]})")
build_reason_breadcrumb(@project, @package_name, "Build Reason (#{@repository.name} / #{params[:arch]})")

= render partial: 'webui/package/tabs'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:ruby
@pagetitle = "Job history of #{@project} / #{@package_name}"
@metarobots = 'index,nofollow'
job_history_breadcrumb(@project, @package, 'Job history')
job_history_breadcrumb(@project, @package_name, 'Job history')

= render partial: 'webui/package/tabs'

Expand Down

0 comments on commit 2e05ec6

Please sign in to comment.