Makes the project jump box work.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2159 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-12-21 08:03:24 +00:00
parent 1f75a1f957
commit 2891ba2933
3 changed files with 29 additions and 13 deletions
@@ -1,12 +0,0 @@
<% user_projects_by_root = User.current.projects.find(:all).group_by(&:root) %>
<select onchange="if (this.value != '') { window.location = this.value; }">
<option selected="selected"><%= l(:label_jump_to_a_project) %></option>
<option disabled="disabled">---</option>
<% user_projects_by_root.keys.sort.each do |root| %>
<%= content_tag('option', h(root.name), :value => url_for(:controller => 'projects', :action => 'show', :id => root)) %>
<% user_projects_by_root[root].sort.each do |project| %>
<% next if project == root %>
<%= content_tag('option', ('&#187; ' + h(project.name)), :value => url_for(:controller => 'projects', :action => 'show', :id => project)) %>
<% end %>
<% end %>
</select>
+1 -1
View File
@@ -34,7 +34,7 @@
<%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>:
<%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %>
<% end %>
<%= render :partial => 'layouts/project_selector' if User.current.memberships.any? %>
<%= render_project_jump_box %>
</div>
<h1><%= h(@project && !@project.new_record? ? @project.name : Setting.app_title) %></h1>