#90: style changes for header, increase performanse for #autocomplete_base_project action
This commit is contained in:
parent
dfbf8a8d58
commit
0299c069c6
|
@ -1333,10 +1333,10 @@ hr.bootstrap {
|
|||
max-height: 280px;
|
||||
}
|
||||
|
||||
.label-bootstrap.label-info.font14 a {
|
||||
color: #FFFFFF;
|
||||
.label-bootstrap.label-info.font14 {
|
||||
padding: 4px;
|
||||
a { color: #FFFFFF; }
|
||||
}
|
||||
|
||||
.line_numbers a {
|
||||
color: #999999;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue