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

Commit 6dd1252b authored by jplang's avatar jplang

Always show "Jump to project" drop-down (#24833).

Patch by Go MAEDA.

git-svn-id: https://svn.redmine.org/redmine/trunk@16199 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent cc1e5412
......@@ -358,20 +358,18 @@ module ApplicationHelper
# Renders the project quick-jump box
def render_project_jump_box
projects = projects_for_jump_box(User.current)
if projects.any?
text = @project.try(:name) || l(:label_jump_to_a_project)
trigger = content_tag('span', text, :class => 'drdn-trigger')
q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => projects_path(:format => 'js')})
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') +
content_tag('div', render_projects_for_jump_box(projects, @project), :class => 'drdn-items projects selection') +
content_tag('div', all, :class => 'drdn-items all-projects selection'),
:class => 'drdn-content'
)
content_tag('span', trigger + content, :id => "project-jump", :class => "drdn")
end
text = @project.try(:name) || l(:label_jump_to_a_project)
trigger = content_tag('span', text, :class => 'drdn-trigger')
q = text_field_tag('q', '', :id => 'projects-quick-search', :class => 'autocomplete', :data => {:automcomplete_url => projects_path(:format => 'js')})
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') +
content_tag('div', render_projects_for_jump_box(projects, @project), :class => 'drdn-items projects selection') +
content_tag('div', all, :class => 'drdn-items all-projects selection'),
:class => 'drdn-content'
)
content_tag('span', trigger + content, :id => "project-jump", :class => "drdn")
end
def project_tree_options_for_select(projects, options = {})
......
......@@ -202,6 +202,9 @@ div + .drdn-items {border-top:1px solid #ccc;}
.drdn-items.selection>*.selected:before {
content:"\2713 ";
}
.drdn-items.selection:empty {
border: none;
}
.drdn-items>span {color:#999;}
#project-jump.drdn {width:200px;display:inline-block;}
......
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