diff --git a/app/assets/stylesheets/design/custom.scss b/app/assets/stylesheets/design/custom.scss index 6f0d30434..502162325 100644 --- a/app/assets/stylesheets/design/custom.scss +++ b/app/assets/stylesheets/design/custom.scss @@ -1180,3 +1180,7 @@ table.tablesorter tr td.no_results { text-align: center; } /* end */ + +.label-bootstrap.label-info.font14 a { + color: #FFFFFF; +} \ No newline at end of file diff --git a/app/helpers/pull_request_helper.rb b/app/helpers/pull_request_helper.rb index 746bee5c9..32037d675 100644 --- a/app/helpers/pull_request_helper.rb +++ b/app/helpers/pull_request_helper.rb @@ -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 \ No newline at end of file + + 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