[refs #90] link to refs

This commit is contained in:
Alexander Machehin 2012-07-17 22:40:48 +06:00
parent 966368a660
commit dc521f5844
2 changed files with 15 additions and 2 deletions

View File

@ -1180,3 +1180,7 @@ table.tablesorter tr td.no_results {
text-align: center;
}
/* end */
.label-bootstrap.label-info.font14 a {
color: #FFFFFF;
}

View File

@ -32,6 +32,15 @@ module PullRequestHelper
#helper for helpers
def show_ref pull, which, limit = 30
"#{pull.send("#{which}_project").owner.uname.truncate limit}: #{pull.send("#{which}_ref").truncate limit}"
project, ref = pull.send("#{which}_project"), pull.send("#{which}_ref")
name = "#{project.owner.uname.truncate limit}: #{ref.truncate limit}"
link_to name, ref_path(project, ref)
end
end
def ref_path project, ref
return tree_path(project, ref) if project.branches_and_tags.include? ref
return commit_path(project, ref) if project.git_repository.commit ref
'#'
end
end