#751: update link to version of BuildList::Item
This commit is contained in:
parent
5defd009d3
commit
128b4104f1
|
@ -35,6 +35,17 @@ module BuildListsHelper
|
||||||
return advisoriable + nonadvisoriable
|
return advisoriable + nonadvisoriable
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def build_list_item_version_link(item, str_version = false)
|
||||||
|
hash_size=5
|
||||||
|
if item.version =~ /^[\da-z]+$/ && item.name == item.build_list.project.name
|
||||||
|
bl = item.build_list
|
||||||
|
link_to str_version ? "#{shortest_hash_id item.version, hash_size}" : shortest_hash_id(item.version, hash_size),
|
||||||
|
commit_path(bl.project.owner, bl.project, item.version)
|
||||||
|
else
|
||||||
|
''
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def build_list_version_link(bl, str_version = false)
|
def build_list_version_link(bl, str_version = false)
|
||||||
hash_size=5
|
hash_size=5
|
||||||
if bl.commit_hash.present?
|
if bl.commit_hash.present?
|
||||||
|
|
|
@ -153,8 +153,7 @@
|
||||||
%tbody
|
%tbody
|
||||||
%tr{:class => build_list_item_status_color(item.status)}
|
%tr{:class => build_list_item_status_color(item.status)}
|
||||||
%td= item.name
|
%td= item.name
|
||||||
- version = item.name == @build_list.project.name ? build_list_version_link(@build_list, true) : ''
|
%td= build_list_item_version_link item
|
||||||
%td= version
|
|
||||||
%td= item.human_status
|
%td= item.human_status
|
||||||
.both
|
.both
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue