Merge remote-tracking branch 'origin/90-pull' into 90-pull

This commit is contained in:
Alexander Machehin 2012-09-26 15:27:54 +06:00
commit dbf1a5f8ca
3 changed files with 7 additions and 7 deletions

View File

@ -1333,10 +1333,11 @@ hr.bootstrap {
max-height: 280px;
}
.label-bootstrap.label-info.font14 a {
color: #FFFFFF;
.label-bootstrap.label-info.font14 {
padding: 4px;
line-height: 1.8;
a { color: #FFFFFF; }
}
.line_numbers a {
color: #999999;
}

View File

@ -90,10 +90,9 @@ class Projects::PullRequestsController < Projects::BaseController
def autocomplete_base_project
#Maybe slow? ILIKE?
items = Project.accessible_by(current_ability, :membered)
items << @project.root
items = Project.accessible_by(current_ability, :membered).search(params[:term])
items = items | [@project.root]
items.select! {|e| Regexp.new(params[:term].downcase).match(e.name.downcase) && e.repo.branches.count > 0}
items.uniq!
render :json => json_for_autocomplete_base(items)
end

View File

@ -26,7 +26,7 @@ module PullRequestHelper
#helper for helpers
def show_ref pull, which, limit = 30
project, ref = pull.send("#{which}_project"), pull.send("#{which}_ref")
link_to "#{project.owner.uname.truncate limit}: #{ref.truncate limit}", ref_path(project, ref)
link_to "#{project.owner.uname.truncate limit}/#{project.name.truncate limit}: #{ref.truncate limit}", ref_path(project, ref)
end
def ref_path project, ref