[refs #674] fix undefined method 'last_published_commit_hash' for product build list
This commit is contained in:
parent
c025bec679
commit
42e76f5fa6
|
@ -50,6 +50,15 @@ module BuildListsHelper
|
|||
end
|
||||
end
|
||||
|
||||
def product_build_list_version_link(bl, str_version = false)
|
||||
if bl.commit_hash.present?
|
||||
link_to str_version ? "#{shortest_hash_id bl.commit_hash} ( #{bl.project_version} )" : shortest_hash_id(bl.commit_hash),
|
||||
commit_path(bl.project.owner, bl.project, bl.commit_hash)
|
||||
else
|
||||
bl.project_version
|
||||
end
|
||||
end
|
||||
|
||||
def container_url
|
||||
"http://#{request.host_with_port}/downloads#{@build_list.container_path}".html_safe
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
= render 'show_field', :key => :project, :value => link_to(pbl.project.name_with_owner, project_path(pbl.project))
|
||||
|
||||
= render 'show_field', :key => :project_version, :value => build_list_version_link(pbl, true)
|
||||
= render 'show_field', :key => :project_version, :value => product_build_list_version_link(pbl, true)
|
||||
|
||||
= render 'show_field', :key => :arch, :value => pbl.arch.name
|
||||
- [:main_script, :params, :time_living].each do |el|
|
||||
|
@ -35,4 +35,4 @@
|
|||
:javascript
|
||||
$(function(){
|
||||
$('article .all').addClass('bigpadding');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -28,7 +28,9 @@ module Modules
|
|||
end
|
||||
|
||||
def set_last_published_commit
|
||||
self.last_published_commit_hash = self.last_published.try :commit_hash
|
||||
if self.respond_to? :last_published_commit_hash
|
||||
self.last_published_commit_hash = self.last_published.try :commit_hash
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue