GitLab steht Mittwoch, den 23. September, zwischen 10:00 und 12:00 Uhr aufgrund von Wartungsarbeiten nicht zur Verfügung.

Commit 4ec6c392 authored by jplang's avatar jplang

Preserve jump param when searching for projects.

git-svn-id: https://svn.redmine.org/redmine/trunk@16551 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 9c9ba3cf
......@@ -356,11 +356,12 @@ module ApplicationHelper
end
def render_projects_for_jump_box(projects, selected=nil)
jump = params[:jump].presence || current_menu_item
s = ''.html_safe
project_tree(projects) do |project, level|
padding = level * 16
text = content_tag('span', project.name, :style => "padding-left:#{padding}px;")
s << link_to(text, project_path(project, :jump => current_menu_item), :title => project.name, :class => (project == selected ? 'selected' : nil))
s << link_to(text, project_path(project, :jump => jump), :title => project.name, :class => (project == selected ? 'selected' : nil))
end
s
end
......@@ -369,8 +370,10 @@ module ApplicationHelper
def render_project_jump_box
projects = projects_for_jump_box(User.current)
text = @project.try(:name) || l(:label_jump_to_a_project)
url = autocomplete_projects_path(:format => 'js', :jump => current_menu_item)
trigger = content_tag('span', text, :class => 'drdn-trigger')
q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => autocomplete_projects_path(:format => 'js')}, :autocomplete => 'off')
q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => url}, :autocomplete => 'off')
all = link_to(l(:label_project_all), projects_path(:jump => current_menu_item), :class => (@project.nil? && controller.class.main_menu ? 'selected' : nil))
content = content_tag('div',
content_tag('div', q, :class => 'quick-search') +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment